void main_fullscr() { if (!(temp.rflags & (RF_GDI|RF_OVR|RF_CLIP))) sprintf(statusline, "only for overlay/gdi modes"), statcnt = 30; else { conf.fullscr ^= 1; apply_video(); } }
void main_selectfilter() { sound_stop(); int index = DialogBoxParam(hIn, MAKEINTRESOURCE(IDD_FILTER_DIALOG), wnd, filterdlg, 0); eat(); sound_play(); if (index < 0) return; conf.render = index; sprintf(statusline, "Video: %s", renders[index].name); statcnt = 50; apply_video(); eat(); }
void mon_scr(char alt) { temp.scale = temp.mon_scale; apply_video(); memcpy(save_buf, rbuf, rb2_offs); paint_scr(alt); flip(); if (conf.noflic) flip(); memcpy(rbuf, save_buf, rb2_offs); while (!process_msgs()) Sleep(20); temp.rflags = RF_MONITOR; temp.mon_scale = temp.scale; temp.scale = 1; set_video(); }
void main_selectdriver() { if (!(temp.rflags & RF_DRIVER)) { strcpy(statusline, "Not available for this filter"); statcnt = 50; return; } sound_stop(); int index = DialogBoxParam(hIn, MAKEINTRESOURCE(IDD_FILTER_DIALOG), wnd, filterdlg, 1); eat(); sound_play(); if (index < 0) return; conf.driver = index; sprintf(statusline, "Render to: %s", drivers[index].name); statcnt = 50; apply_video(); eat(); }
void showhelppp(const char *anchor = 0) //Alone Coder 0.36.6 { if (!hMSHTML) hMSHTML = LoadLibrary("MSHTML.DLL"); if (!hURLMON) hURLMON = LoadLibrary("URLMON.DLL"); tShowHTMLDialog Show = hMSHTML? (tShowHTMLDialog)GetProcAddress(hMSHTML, "ShowHTMLDialog") : 0; tCreateURLMoniker CreateMoniker = hURLMON? (tCreateURLMoniker)GetProcAddress(hURLMON, "CreateURLMoniker") : 0; HWND fgwin = GetForegroundWindow(); if (!Show || !CreateMoniker) { MessageBox(fgwin, "Install IE4.0 or higher to view help", 0, MB_ICONERROR); return; } char dst[0x200]; GetTempPath(sizeof dst, dst); strcat(dst, "us_help.htm"); FILE *ff = fopen(helpname, "rb"), *gg = fopen(dst, "wb"); if (!ff || !gg) return; for (;;) { int x = getc(ff); if (x == EOF) break; if (x == '{') { char tag[0x100]; int r = 0; while (r < sizeof(tag)-1 && !feof(ff) && (x = getc(ff)) != '}') tag[r++] = x; tag[r] = 0; if (tag[0] == '?') { RECT rc; GetWindowRect(fgwin, &rc); if (tag[1] == 'x') fprintf(gg, "%d", rc.right-rc.left-20); if (tag[1] == 'y') fprintf(gg, "%d", rc.bottom-rc.top-20); } else { char res[0x100]; GetPrivateProfileString("SYSTEM.KEYS", tag, "not defined", res, sizeof res, ininame); char *comment = strchr(res, ';'); if (comment) *comment = 0; int len; //Alone Coder 0.36.7 for (/*int*/ len = strlen(res); len && res[len-1] == ' '; res[--len] = 0); for (len = 0; res[len]; len++) if (res[len] == ' ') res[len] = '-'; fprintf(gg, "%s", res); } } else putc(x, gg); } fclose(ff), fclose(gg); char url[0x200]; sprintf(url, "file://%s%s%s", dst, anchor?"#":nil, anchor?anchor:nil); WCHAR urlw[0x200]; MultiByteToWideChar(AreFileApisANSI()? CP_ACP : CP_OEMCP, MB_USEGLYPHCHARS, url, -1, urlw, _countof(urlw)); IMoniker *pmk = 0; CreateMoniker(0, urlw, &pmk); if (pmk) { bool restore_video = false; if (!(temp.rflags & (RF_GDI | RF_CLIP | RF_OVR | RF_16 | RF_32))) { temp.rflags = temp.rflags | RF_GDI; set_video(); restore_video = true; } Show(fgwin, pmk, 0,0,0); pmk->Release(); #if 0 if (dbgbreak) { temp.rflags = RF_MONITOR; set_video(); } else #endif { if (restore_video) apply_video(); } } DeleteFile(dst); }