diff --git a/src/drivers/win/cdlogger.cpp b/src/drivers/win/cdlogger.cpp index 0fadc143..805a2233 100644 --- a/src/drivers/win/cdlogger.cpp +++ b/src/drivers/win/cdlogger.cpp @@ -60,6 +60,8 @@ BOOL CALLBACK CDLoggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara break; }; 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); hCDLogger = hwndDlg; codecount = datacount = 0; diff --git a/src/drivers/win/cheat.cpp b/src/drivers/win/cheat.cpp index 1b3c69bb..8008c043 100644 --- a/src/drivers/win/cheat.cpp +++ b/src/drivers/win/cheat.cpp @@ -151,6 +151,8 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l switch (uMsg) { 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); //setup font @@ -551,6 +553,8 @@ BOOL CALLBACK GGConvCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) }; case WM_INITDIALOG: //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); break; case WM_CREATE: diff --git a/src/drivers/win/config.cpp b/src/drivers/win/config.cpp index c327c8d3..0851e63f 100644 --- a/src/drivers/win/config.cpp +++ b/src/drivers/win/config.cpp @@ -37,6 +37,10 @@ extern CFGSTRUCT NetplayConfig[]; extern CFGSTRUCT InputConfig[]; extern CFGSTRUCT HotkeyConfig[]; extern int autoHoldKey, autoHoldClearKey; +extern int EnableAutosave; +extern int AFon, AFoff, AutoFireOffset; +extern int DesynchAutoFire; +extern bool lagCounterDisplay; extern uint8 gNoBGFillColor; @@ -55,10 +59,7 @@ extern int Tracer_wndx, Tracer_wndy; extern int CDLogger_wndx, CDLogger_wndy; extern int GGConv_wndx, GGConv_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 static CFGSTRUCT fceuconfig[] = { diff --git a/src/drivers/win/debugger.cpp b/src/drivers/win/debugger.cpp index 5888bce6..3ecfa630 100644 --- a/src/drivers/win/debugger.cpp +++ b/src/drivers/win/debugger.cpp @@ -887,7 +887,8 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara switch(uMsg) { case WM_INITDIALOG: { 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); GetWindowRect(hwndDlg,&currDebuggerRect); diff --git a/src/drivers/win/memwatch.cpp b/src/drivers/win/memwatch.cpp index 30780344..d92bd7a3 100644 --- a/src/drivers/win/memwatch.cpp +++ b/src/drivers/win/memwatch.cpp @@ -655,6 +655,8 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA }; 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); hdc = GetDC(hwndDlg); SelectObject (hdc, debugSystem->hFixedFont); diff --git a/src/drivers/win/monitor.cpp b/src/drivers/win/monitor.cpp index d093d6c0..a158fab1 100644 --- a/src/drivers/win/monitor.cpp +++ b/src/drivers/win/monitor.cpp @@ -231,6 +231,8 @@ BOOL CALLBACK MonitorCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam }; 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); monitor_open = 1; // CenterWindow(hwndDlg); diff --git a/src/drivers/win/ntview.cpp b/src/drivers/win/ntview.cpp index bafc9c53..162e289d 100644 --- a/src/drivers/win/ntview.cpp +++ b/src/drivers/win/ntview.cpp @@ -420,6 +420,8 @@ BOOL CALLBACK NTViewCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) switch(uMsg) { 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); //prepare the bitmap attributes diff --git a/src/drivers/win/ppuview.cpp b/src/drivers/win/ppuview.cpp index 2acc791e..f0641094 100644 --- a/src/drivers/win/ppuview.cpp +++ b/src/drivers/win/ppuview.cpp @@ -197,6 +197,8 @@ BOOL CALLBACK PPUViewCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam switch(uMsg) { 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); //prepare the bitmap attributes diff --git a/src/drivers/win/res.rc b/src/drivers/win/res.rc index 89f30ad0..cbec2276 100644 --- a/src/drivers/win/res.rc +++ b/src/drivers/win/res.rc @@ -1007,13 +1007,13 @@ BEGIN PUSHBUTTON "Add To Cheat List",IDC_BTN_ADD_TO_CHEATS,108,58,68,14,WS_DISABLED END -MONITOR DIALOGEX 0, 0, 392, 343 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU +MONITOR DIALOGEX 0, 0, 316, 343 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "RAM Filter" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - GROUPBOX "Rules",-1,7,7,365,182 - GROUPBOX "Results",-1,10,193,363,135 + GROUPBOX "Rules",-1,7,7,295,182 + GROUPBOX "Results",-1,10,193,292,135 LTEXT "1st rule",-1,16,20,40,8 LTEXT "2nd rule",-1,16,36,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",3023,240,68,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 LTEXT "6th rule",-1,16,105,40,8 COMBOBOX 3005,66,102,135,122,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP @@ -1394,7 +1394,7 @@ BEGIN "MONITOR", DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 385 + RIGHTMARGIN, 312 TOPMARGIN, 7 BOTTOMMARGIN, 336 END diff --git a/src/drivers/win/tasedit.cpp b/src/drivers/win/tasedit.cpp index f2e4bff7..25864349 100644 --- a/src/drivers/win/tasedit.cpp +++ b/src/drivers/win/tasedit.cpp @@ -625,6 +625,8 @@ BOOL CALLBACK WndprocTasEdit(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar switch(uMsg) { 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); hwndList = GetDlgItem(hwndDlg,IDC_LIST1); diff --git a/src/drivers/win/tracer.cpp b/src/drivers/win/tracer.cpp index b97e9c05..4153fd2a 100644 --- a/src/drivers/win/tracer.cpp +++ b/src/drivers/win/tracer.cpp @@ -79,6 +79,8 @@ BOOL CALLBACK TracerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) break; }; 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); hTracer = hwndDlg; diff --git a/src/drivers/win/window.cpp b/src/drivers/win/window.cpp index 2c1892e5..1b570f6f 100644 --- a/src/drivers/win/window.cpp +++ b/src/drivers/win/window.cpp @@ -1409,7 +1409,8 @@ int CreateMainWindow() UpdateRMenu(recentmenu, recent_files, MENU_RECENT_FILES, MENU_FIRST_RECENT_FILE); updateGameDependentMenus(0); - + if (MainWindow_wndx==-32000) MainWindow_wndx=0; //Just in case + if (MainWindow_wndy==-32000) MainWindow_wndy=0; hAppWnd = CreateWindowEx( 0, "FCEULTRA",