Added window bounds checking to all WM_MOVE entries due to a bug report and example fceux.cfg file from Gil_ at the nesdev IRC. Win32 only.
This commit is contained in:
parent
088c065c9d
commit
9c5a81471e
|
@ -1,3 +1,4 @@
|
|||
02-feb-2010 - ugetab - Win32 - Added window positions bounds checks. Accounts for -32000 positions & less out-of-range too
|
||||
08-jan-2010 - rheiny - Win32 - Trace Logger - Trace logger now logs the values of the stack pointer register
|
||||
31-dec-2009 - prg318 - added gtk gui
|
||||
08-dec-2009 - Zeromus - Fix Name Table Viewer - Fix for use with New PPU
|
||||
|
|
|
@ -97,6 +97,15 @@ BOOL CALLBACK CDLoggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
GetWindowRect(hwndDlg,&wrect);
|
||||
CDLogger_wndx = wrect.left;
|
||||
CDLogger_wndy = wrect.top;
|
||||
|
||||
#ifdef WIN32
|
||||
if (wrect.right < 59) {
|
||||
CDLogger_wndx = 0;
|
||||
}
|
||||
if (CDLogger_wndy < -18) {
|
||||
CDLogger_wndy = -18;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
};
|
||||
case WM_INITDIALOG:
|
||||
|
|
|
@ -244,6 +244,15 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
GetWindowRect(hwndDlg,&wrect);
|
||||
ChtPosX = wrect.left;
|
||||
ChtPosY = wrect.top;
|
||||
|
||||
#ifdef WIN32
|
||||
if (wrect.right < 59) {
|
||||
ChtPosX = 0;
|
||||
}
|
||||
if (ChtPosY < -18) {
|
||||
ChtPosY = -18;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
case WM_VSCROLL:
|
||||
|
@ -623,6 +632,15 @@ BOOL CALLBACK GGConvCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
GetWindowRect(hwndDlg,&wrect);
|
||||
GGConv_wndx = wrect.left;
|
||||
GGConv_wndy = wrect.top;
|
||||
|
||||
#ifdef WIN32
|
||||
if (wrect.right < 59) {
|
||||
GGConv_wndx = 0;
|
||||
}
|
||||
if (GGConv_wndy < -18) {
|
||||
GGConv_wndy = -18;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
};
|
||||
case WM_INITDIALOG:
|
||||
|
|
|
@ -317,6 +317,29 @@ void SaveConfig(const char *filename)
|
|||
}
|
||||
//-----------------------------------
|
||||
|
||||
//ugetab: window positions could use some bounds checking.
|
||||
// MemView_wndx and MemView_wndy verified to sometimes end up -32000
|
||||
//CDLogger_wndx
|
||||
//CDLogger_wndy
|
||||
//GGConv_wndx
|
||||
//GGConv_wndy
|
||||
//MainWindow_wndx
|
||||
//MainWindow_wndy
|
||||
//MemFind_wndx
|
||||
//MemFind_wndy
|
||||
//MemView_wndx
|
||||
//MemView_wndy
|
||||
//MemWatch_wndx
|
||||
//MemWatch_wndy
|
||||
//Monitor_wndx
|
||||
//Monitor_wndy
|
||||
//TasEdit_wndx
|
||||
//TasEdit_wndy
|
||||
//Tracer_wndx
|
||||
//Tracer_wndy
|
||||
|
||||
//-----------------------------------
|
||||
|
||||
SaveFCEUConfig(filename,fceuconfig);
|
||||
}
|
||||
|
||||
|
|
|
@ -1083,6 +1083,15 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
GetWindowRect(hwndDlg,&wrect);
|
||||
DbgPosX = wrect.left;
|
||||
DbgPosY = wrect.top;
|
||||
|
||||
#ifdef WIN32
|
||||
if (wrect.right < 59) {
|
||||
DbgPosX = 59 - DbgSizeX;
|
||||
}
|
||||
if (DbgPosY < -18) {
|
||||
DbgPosY = -18;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
//adelikat: Buttons that don't need a rom loaded to do something, such as autoload
|
||||
|
|
|
@ -86,6 +86,16 @@ BOOL CALLBACK LogCon(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
GetWindowRect(hwndDlg,&wrect); //Remember X,Y coordinates
|
||||
MLogPosX = wrect.left;
|
||||
MLogPosY = wrect.top;
|
||||
|
||||
#ifdef WIN32
|
||||
if (wrect.right < 59) {
|
||||
MLogPosX = 0;
|
||||
}
|
||||
if (MLogPosY < -18) {
|
||||
MLogPosY = -18;
|
||||
}
|
||||
#endif
|
||||
|
||||
break;
|
||||
case WM_COMMAND:
|
||||
if(HIWORD(wParam)==BN_CLICKED)
|
||||
|
|
|
@ -1596,6 +1596,16 @@ LRESULT CALLBACK MemViewCallB(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
|||
GetWindowRect(hwnd,&wrect);
|
||||
MemView_wndx = wrect.left;
|
||||
MemView_wndy = wrect.top;
|
||||
|
||||
#ifdef WIN32
|
||||
if (wrect.right < 59) {
|
||||
MemView_wndx = 59 - MemViewSizeX;
|
||||
}
|
||||
if (MemView_wndy < -18) {
|
||||
MemView_wndy = -18;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1694,6 +1704,16 @@ BOOL CALLBACK MemFindCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
GetWindowRect(hwndDlg,&wrect);
|
||||
MemFind_wndx = wrect.left;
|
||||
MemFind_wndy = wrect.top;
|
||||
|
||||
#ifdef WIN32
|
||||
if (wrect.right < 59) {
|
||||
MemFind_wndx = 0;
|
||||
}
|
||||
if (MemFind_wndy < -18) {
|
||||
MemFind_wndy = -18;
|
||||
}
|
||||
#endif
|
||||
|
||||
break;
|
||||
}
|
||||
case WM_RBUTTONDBLCLK:
|
||||
|
|
|
@ -724,6 +724,16 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
|
|||
GetWindowRect(hwndDlg,&wrect);
|
||||
MemWatch_wndx = wrect.left;
|
||||
MemWatch_wndy = wrect.top;
|
||||
|
||||
#ifdef WIN32
|
||||
if (wrect.right < 59) {
|
||||
MemWatch_wndx = 0;
|
||||
}
|
||||
if (MemWatch_wndy < -18) {
|
||||
MemWatch_wndy = -18;
|
||||
}
|
||||
#endif
|
||||
|
||||
break;
|
||||
};
|
||||
|
||||
|
|
|
@ -227,6 +227,16 @@ BOOL CALLBACK MonitorCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
GetWindowRect(hwndDlg,&wrect);
|
||||
Monitor_wndx = wrect.left;
|
||||
Monitor_wndy = wrect.top;
|
||||
|
||||
#ifdef WIN32
|
||||
if (wrect.right < 59) {
|
||||
Monitor_wndx = 0;
|
||||
}
|
||||
if (Monitor_wndy < -18) {
|
||||
Monitor_wndy = -18;
|
||||
}
|
||||
#endif
|
||||
|
||||
break;
|
||||
};
|
||||
|
||||
|
|
|
@ -424,6 +424,16 @@ BOOL CALLBACK NTViewCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
GetWindowRect(hwndDlg,&wrect);
|
||||
NTViewPosX = wrect.left;
|
||||
NTViewPosY = wrect.top;
|
||||
|
||||
#ifdef WIN32
|
||||
if (wrect.right < 59) {
|
||||
NTViewPosX = 0;
|
||||
}
|
||||
if (NTViewPosY < -18) {
|
||||
NTViewPosY = -18;
|
||||
}
|
||||
#endif
|
||||
|
||||
break;
|
||||
case WM_RBUTTONDBLCLK:
|
||||
case WM_RBUTTONDOWN:
|
||||
|
|
|
@ -270,6 +270,16 @@ BOOL CALLBACK PPUViewCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
GetWindowRect(hwndDlg,&wrect);
|
||||
PPUViewPosX = wrect.left;
|
||||
PPUViewPosY = wrect.top;
|
||||
|
||||
#ifdef WIN32
|
||||
if (wrect.right < 59) {
|
||||
PPUViewPosX = 0;
|
||||
}
|
||||
if (PPUViewPosY < -18) {
|
||||
PPUViewPosY = -18;
|
||||
}
|
||||
#endif
|
||||
|
||||
break;
|
||||
case WM_RBUTTONDBLCLK:
|
||||
case WM_RBUTTONDOWN:
|
||||
|
|
|
@ -830,6 +830,16 @@ LRESULT CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
GetWindowRect(hDlg,&wrect);
|
||||
ramw_x = wrect.left;
|
||||
ramw_y = wrect.top;
|
||||
|
||||
#ifdef WIN32
|
||||
if (wrect.right < 59) {
|
||||
ramw_x = 0;
|
||||
}
|
||||
if (ramw_y < -18) {
|
||||
ramw_y = -18;
|
||||
}
|
||||
#endif
|
||||
|
||||
//regSetDwordValue(RAMWX, ramw_x); TODO
|
||||
//regSetDwordValue(RAMWY, ramw_y); TODO
|
||||
} break;
|
||||
|
|
|
@ -401,6 +401,15 @@ BOOL CALLBACK ReplayMetadataDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
|
|||
GetWindowRect(hwndDlg,&wrect);
|
||||
MetaPosX = wrect.left;
|
||||
MetaPosY = wrect.top;
|
||||
|
||||
#ifdef WIN32
|
||||
if (wrect.right < 59) {
|
||||
MetaPosX = 0;
|
||||
}
|
||||
if (MetaPosY < -18) {
|
||||
MetaPosY = -18;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
|
|
|
@ -1021,6 +1021,16 @@ BOOL CALLBACK WndprocTasEdit(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
|
|||
GetWindowRect(hwndDlg,&wrect);
|
||||
TasEdit_wndx = wrect.left;
|
||||
TasEdit_wndy = wrect.top;
|
||||
|
||||
#ifdef WIN32
|
||||
if (wrect.right < 59) {
|
||||
TasEdit_wndx = 0;
|
||||
}
|
||||
if (TasEdit_wndy < -18) {
|
||||
TasEdit_wndy = -18;
|
||||
}
|
||||
#endif
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -875,6 +875,16 @@ BOOL CALLBACK TextHookerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|
|||
GetWindowRect(hwndDlg,&wrect);
|
||||
TextHookerPosX = wrect.left;
|
||||
TextHookerPosY = wrect.top;
|
||||
|
||||
#ifdef WIN32
|
||||
if (wrect.right < 59) {
|
||||
TextHookerPosX = 0;
|
||||
}
|
||||
if (TextHookerPosY < -18) {
|
||||
TextHookerPosY = -18;
|
||||
}
|
||||
#endif
|
||||
|
||||
break;
|
||||
case WM_RBUTTONDBLCLK:
|
||||
sprintf(str,"aaaa");
|
||||
|
|
|
@ -90,6 +90,16 @@ BOOL CALLBACK TracerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
GetWindowRect(hwndDlg,&wrect);
|
||||
Tracer_wndx = wrect.left;
|
||||
Tracer_wndy = wrect.top;
|
||||
|
||||
#ifdef WIN32
|
||||
if (wrect.right < 59) {
|
||||
Tracer_wndx = 0;
|
||||
}
|
||||
if (Tracer_wndy < -18) {
|
||||
Tracer_wndy = -18;
|
||||
}
|
||||
#endif
|
||||
|
||||
break;
|
||||
};
|
||||
case WM_INITDIALOG:
|
||||
|
|
|
@ -1196,6 +1196,16 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
|||
GetWindowRect(hWnd,&wrect);
|
||||
MainWindow_wndx = wrect.left;
|
||||
MainWindow_wndy = wrect.top;
|
||||
|
||||
#ifdef WIN32
|
||||
if (wrect.right < 59) {
|
||||
MainWindow_wndx = 0;
|
||||
}
|
||||
if (MainWindow_wndy < -18) {
|
||||
MainWindow_wndy = -18;
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
case WM_MOUSEMOVE:
|
||||
|
|
Loading…
Reference in New Issue