-32000 protection to x,y remembered dialogs. Ram filter - skinnier + minimize button

This commit is contained in:
adelikat 2008-08-07 05:25:14 +00:00
parent 10073cb929
commit c2bbfe2670
12 changed files with 33 additions and 12 deletions

View File

@ -60,6 +60,8 @@ BOOL CALLBACK CDLoggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
break; break;
}; };
case WM_INITDIALOG: case WM_INITDIALOG:
if (CDLogger_wndx==-32000) CDLogger_wndx=0; //Just in case
if (CDLogger_wndy==-32000) CDLogger_wndy=0;
SetWindowPos(hwndDlg,0,CDLogger_wndx,CDLogger_wndy,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER); SetWindowPos(hwndDlg,0,CDLogger_wndx,CDLogger_wndy,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER);
hCDLogger = hwndDlg; hCDLogger = hwndDlg;
codecount = datacount = 0; codecount = datacount = 0;

View File

@ -151,6 +151,8 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
switch (uMsg) { switch (uMsg) {
case WM_INITDIALOG: case WM_INITDIALOG:
if (ChtPosX==-32000) ChtPosX=0; //Just in case
if (ChtPosY==-32000) ChtPosY=0;
SetWindowPos(hwndDlg,0,ChtPosX,ChtPosY,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER); SetWindowPos(hwndDlg,0,ChtPosX,ChtPosY,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER);
//setup font //setup font
@ -551,6 +553,8 @@ BOOL CALLBACK GGConvCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
}; };
case WM_INITDIALOG: case WM_INITDIALOG:
//todo: set text limits //todo: set text limits
if (GGConv_wndx==-32000) GGConv_wndx=0; //Just in case
if (GGConv_wndy==-32000) GGConv_wndy=0;
SetWindowPos(hwndDlg,0,GGConv_wndx,GGConv_wndy,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER); SetWindowPos(hwndDlg,0,GGConv_wndx,GGConv_wndy,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER);
break; break;
case WM_CREATE: case WM_CREATE:

View File

@ -37,6 +37,10 @@ extern CFGSTRUCT NetplayConfig[];
extern CFGSTRUCT InputConfig[]; extern CFGSTRUCT InputConfig[];
extern CFGSTRUCT HotkeyConfig[]; extern CFGSTRUCT HotkeyConfig[];
extern int autoHoldKey, autoHoldClearKey; extern int autoHoldKey, autoHoldClearKey;
extern int EnableAutosave;
extern int AFon, AFoff, AutoFireOffset;
extern int DesynchAutoFire;
extern bool lagCounterDisplay;
extern uint8 gNoBGFillColor; extern uint8 gNoBGFillColor;
@ -55,10 +59,7 @@ extern int Tracer_wndx, Tracer_wndy;
extern int CDLogger_wndx, CDLogger_wndy; extern int CDLogger_wndx, CDLogger_wndy;
extern int GGConv_wndx, GGConv_wndy; extern int GGConv_wndx, GGConv_wndy;
extern int TasEdit_wndx, TasEdit_wndy; extern int TasEdit_wndx, TasEdit_wndy;
extern int EnableAutosave;
extern int AFon, AFoff, AutoFireOffset;
extern int DesynchAutoFire;
extern bool lagCounterDisplay;
//Structure that contains configuration information //Structure that contains configuration information
static CFGSTRUCT fceuconfig[] = { static CFGSTRUCT fceuconfig[] = {

View File

@ -887,7 +887,8 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
switch(uMsg) { switch(uMsg) {
case WM_INITDIALOG: { case WM_INITDIALOG: {
extern int loadDebugDataFailed; extern int loadDebugDataFailed;
if (DbgPosX==-32000) DbgPosX=0; //Just in case
if (DbgPosX==-32000) DbgPosX=0;
SetWindowPos(hwndDlg,0,DbgPosX,DbgPosY,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER); SetWindowPos(hwndDlg,0,DbgPosX,DbgPosY,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER);
GetWindowRect(hwndDlg,&currDebuggerRect); GetWindowRect(hwndDlg,&currDebuggerRect);

View File

@ -655,6 +655,8 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
}; };
case WM_INITDIALOG: case WM_INITDIALOG:
if (MemWatch_wndx==-32000) MemWatch_wndx=0; //Just in case
if (MemWatch_wndy==-32000) MemWatch_wndx=0; //-32000 bugs can happen as it is a special windows value
SetWindowPos(hwndDlg,0,MemWatch_wndx,MemWatch_wndy,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER); SetWindowPos(hwndDlg,0,MemWatch_wndx,MemWatch_wndy,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER);
hdc = GetDC(hwndDlg); hdc = GetDC(hwndDlg);
SelectObject (hdc, debugSystem->hFixedFont); SelectObject (hdc, debugSystem->hFixedFont);

View File

@ -231,6 +231,8 @@ BOOL CALLBACK MonitorCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
}; };
case WM_INITDIALOG: case WM_INITDIALOG:
if (Monitor_wndx==-32000) Monitor_wndx=0; //Just in case
if (Monitor_wndy==-32000) Monitor_wndy=0;
SetWindowPos(hwndDlg,0,Monitor_wndx,Monitor_wndy,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER); SetWindowPos(hwndDlg,0,Monitor_wndx,Monitor_wndy,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER);
monitor_open = 1; monitor_open = 1;
// CenterWindow(hwndDlg); // CenterWindow(hwndDlg);

View File

@ -420,6 +420,8 @@ BOOL CALLBACK NTViewCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
switch(uMsg) { switch(uMsg) {
case WM_INITDIALOG: case WM_INITDIALOG:
if (NTViewPosX==-32000) NTViewPosX=0; //Just in case
if (NTViewPosY==-32000) NTViewPosY=0;
SetWindowPos(hwndDlg,0,NTViewPosX,NTViewPosY,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER); SetWindowPos(hwndDlg,0,NTViewPosX,NTViewPosY,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER);
//prepare the bitmap attributes //prepare the bitmap attributes

View File

@ -197,6 +197,8 @@ BOOL CALLBACK PPUViewCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
switch(uMsg) { switch(uMsg) {
case WM_INITDIALOG: case WM_INITDIALOG:
if (PPUViewPosX==-32000) PPUViewPosX=0; //Just in case
if (PPUViewPosY==-32000) PPUViewPosY=0;
SetWindowPos(hwndDlg,0,PPUViewPosX,PPUViewPosY,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER); SetWindowPos(hwndDlg,0,PPUViewPosX,PPUViewPosY,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER);
//prepare the bitmap attributes //prepare the bitmap attributes

View File

@ -1007,13 +1007,13 @@ BEGIN
PUSHBUTTON "Add To Cheat List",IDC_BTN_ADD_TO_CHEATS,108,58,68,14,WS_DISABLED PUSHBUTTON "Add To Cheat List",IDC_BTN_ADD_TO_CHEATS,108,58,68,14,WS_DISABLED
END END
MONITOR DIALOGEX 0, 0, 392, 343 MONITOR DIALOGEX 0, 0, 316, 343
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "RAM Filter" CAPTION "RAM Filter"
FONT 8, "MS Shell Dlg", 400, 0, 0x1 FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN BEGIN
GROUPBOX "Rules",-1,7,7,365,182 GROUPBOX "Rules",-1,7,7,295,182
GROUPBOX "Results",-1,10,193,363,135 GROUPBOX "Results",-1,10,193,292,135
LTEXT "1st rule",-1,16,20,40,8 LTEXT "1st rule",-1,16,20,40,8
LTEXT "2nd rule",-1,16,36,40,8 LTEXT "2nd rule",-1,16,36,40,8
LTEXT "3rd rule",-1,16,55,40,8 LTEXT "3rd rule",-1,16,55,40,8
@ -1033,7 +1033,7 @@ BEGIN
PUSHBUTTON "Apply rule",3022,240,50,50,14 PUSHBUTTON "Apply rule",3022,240,50,50,14
PUSHBUTTON "Apply rule",3023,240,68,50,14 PUSHBUTTON "Apply rule",3023,240,68,50,14
PUSHBUTTON "Apply rule",3024,240,84,50,14 PUSHBUTTON "Apply rule",3024,240,84,50,14
LISTBOX 3100,19,206,349,102,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP LISTBOX 3100,18,206,272,102,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Apply rule",3020,240,17,50,14 PUSHBUTTON "Apply rule",3020,240,17,50,14
LTEXT "6th rule",-1,16,105,40,8 LTEXT "6th rule",-1,16,105,40,8
COMBOBOX 3005,66,102,135,122,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX 3005,66,102,135,122,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
@ -1394,7 +1394,7 @@ BEGIN
"MONITOR", DIALOG "MONITOR", DIALOG
BEGIN BEGIN
LEFTMARGIN, 7 LEFTMARGIN, 7
RIGHTMARGIN, 385 RIGHTMARGIN, 312
TOPMARGIN, 7 TOPMARGIN, 7
BOTTOMMARGIN, 336 BOTTOMMARGIN, 336
END END

View File

@ -625,6 +625,8 @@ BOOL CALLBACK WndprocTasEdit(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
switch(uMsg) switch(uMsg)
{ {
case WM_INITDIALOG: case WM_INITDIALOG:
if (TasEdit_wndx==-32000) TasEdit_wndx=0; //Just in case
if (TasEdit_wndy==-32000) TasEdit_wndy=0;
SetWindowPos(hwndDlg,0,TasEdit_wndx,TasEdit_wndy,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER); SetWindowPos(hwndDlg,0,TasEdit_wndx,TasEdit_wndy,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER);
hwndList = GetDlgItem(hwndDlg,IDC_LIST1); hwndList = GetDlgItem(hwndDlg,IDC_LIST1);

View File

@ -79,6 +79,8 @@ BOOL CALLBACK TracerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
break; break;
}; };
case WM_INITDIALOG: case WM_INITDIALOG:
if (Tracer_wndx==-32000) Tracer_wndx=0; //Just in case
if (Tracer_wndy==-32000) Tracer_wndy=0;
SetWindowPos(hwndDlg,0,Tracer_wndx,Tracer_wndy,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER); SetWindowPos(hwndDlg,0,Tracer_wndx,Tracer_wndy,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER);
hTracer = hwndDlg; hTracer = hwndDlg;

View File

@ -1409,7 +1409,8 @@ int CreateMainWindow()
UpdateRMenu(recentmenu, recent_files, MENU_RECENT_FILES, MENU_FIRST_RECENT_FILE); UpdateRMenu(recentmenu, recent_files, MENU_RECENT_FILES, MENU_FIRST_RECENT_FILE);
updateGameDependentMenus(0); updateGameDependentMenus(0);
if (MainWindow_wndx==-32000) MainWindow_wndx=0; //Just in case
if (MainWindow_wndy==-32000) MainWindow_wndy=0;
hAppWnd = CreateWindowEx( hAppWnd = CreateWindowEx(
0, 0,
"FCEULTRA", "FCEULTRA",