mirror of https://github.com/snes9xgit/snes9x.git
Win32: use SetWindowLongPtr instead of SetWindowLong (DaMan)
This commit is contained in:
parent
1d140638da
commit
43e04cddc7
|
@ -838,7 +838,7 @@ InputCust * GetInputCustom(HWND hwnd)
|
||||||
|
|
||||||
void SetInputCustom(HWND hwnd, InputCust *icp)
|
void SetInputCustom(HWND hwnd, InputCust *icp)
|
||||||
{
|
{
|
||||||
SetWindowLong(hwnd, 0, (LONG)icp);
|
SetWindowLongPtr(hwnd, 0, (LONG)icp);
|
||||||
}
|
}
|
||||||
|
|
||||||
LRESULT InputCustom_OnPaint(InputCust *ccp, WPARAM wParam, LPARAM lParam)
|
LRESULT InputCustom_OnPaint(InputCust *ccp, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
|
@ -586,13 +586,13 @@ void ToggleFullScreen ()
|
||||||
SaveMainWinPos();
|
SaveMainWinPos();
|
||||||
if(GetMenu(GUI.hWnd)!=NULL)
|
if(GetMenu(GUI.hWnd)!=NULL)
|
||||||
SetMenu(GUI.hWnd,NULL);
|
SetMenu(GUI.hWnd,NULL);
|
||||||
SetWindowLong (GUI.hWnd, GWL_STYLE, WS_POPUP|WS_VISIBLE);
|
SetWindowLongPtr (GUI.hWnd, GWL_STYLE, WS_POPUP|WS_VISIBLE);
|
||||||
hm = MonitorFromWindow(GUI.hWnd,MONITOR_DEFAULTTONEAREST);
|
hm = MonitorFromWindow(GUI.hWnd,MONITOR_DEFAULTTONEAREST);
|
||||||
mi.cbSize = sizeof(mi);
|
mi.cbSize = sizeof(mi);
|
||||||
GetMonitorInfo(hm,&mi);
|
GetMonitorInfo(hm,&mi);
|
||||||
SetWindowPos (GUI.hWnd, HWND_TOP, mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right - mi.rcMonitor.left, mi.rcMonitor.bottom - mi.rcMonitor.top, SWP_DRAWFRAME|SWP_FRAMECHANGED);
|
SetWindowPos (GUI.hWnd, HWND_TOP, mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right - mi.rcMonitor.left, mi.rcMonitor.bottom - mi.rcMonitor.top, SWP_DRAWFRAME|SWP_FRAMECHANGED);
|
||||||
} else {
|
} else {
|
||||||
SetWindowLong( GUI.hWnd, GWL_STYLE, WS_POPUPWINDOW|WS_CAPTION|
|
SetWindowLongPtr( GUI.hWnd, GWL_STYLE, WS_POPUPWINDOW|WS_CAPTION|
|
||||||
WS_THICKFRAME|WS_VISIBLE|WS_MINIMIZEBOX|WS_MAXIMIZEBOX);
|
WS_THICKFRAME|WS_VISIBLE|WS_MINIMIZEBOX|WS_MAXIMIZEBOX);
|
||||||
SetMenu(GUI.hWnd,GUI.hMenu);
|
SetMenu(GUI.hWnd,GUI.hMenu);
|
||||||
SetWindowPos (GUI.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_DRAWFRAME|SWP_FRAMECHANGED);
|
SetWindowPos (GUI.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_DRAWFRAME|SWP_FRAMECHANGED);
|
||||||
|
@ -604,13 +604,13 @@ void ToggleFullScreen ()
|
||||||
SaveMainWinPos();
|
SaveMainWinPos();
|
||||||
if(GetMenu(GUI.hWnd)!=NULL)
|
if(GetMenu(GUI.hWnd)!=NULL)
|
||||||
SetMenu(GUI.hWnd,NULL);
|
SetMenu(GUI.hWnd,NULL);
|
||||||
SetWindowLong (GUI.hWnd, GWL_STYLE, WS_POPUP|WS_VISIBLE);
|
SetWindowLongPtr (GUI.hWnd, GWL_STYLE, WS_POPUP|WS_VISIBLE);
|
||||||
SetWindowPos (GUI.hWnd, HWND_TOPMOST, 0, 0, GUI.FullscreenMode.width, GUI.FullscreenMode.height, SWP_DRAWFRAME|SWP_FRAMECHANGED);
|
SetWindowPos (GUI.hWnd, HWND_TOPMOST, 0, 0, GUI.FullscreenMode.width, GUI.FullscreenMode.height, SWP_DRAWFRAME|SWP_FRAMECHANGED);
|
||||||
if(!S9xDisplayOutput->SetFullscreen(true))
|
if(!S9xDisplayOutput->SetFullscreen(true))
|
||||||
GUI.FullScreen = false;
|
GUI.FullScreen = false;
|
||||||
}
|
}
|
||||||
if(!GUI.FullScreen) {
|
if(!GUI.FullScreen) {
|
||||||
SetWindowLong( GUI.hWnd, GWL_STYLE, WS_POPUPWINDOW|WS_CAPTION|
|
SetWindowLongPtr( GUI.hWnd, GWL_STYLE, WS_POPUPWINDOW|WS_CAPTION|
|
||||||
WS_THICKFRAME|WS_VISIBLE|WS_MINIMIZEBOX|WS_MAXIMIZEBOX);
|
WS_THICKFRAME|WS_VISIBLE|WS_MINIMIZEBOX|WS_MAXIMIZEBOX);
|
||||||
SetMenu(GUI.hWnd,GUI.hMenu);
|
SetMenu(GUI.hWnd,GUI.hMenu);
|
||||||
S9xDisplayOutput->SetFullscreen(false);
|
S9xDisplayOutput->SetFullscreen(false);
|
||||||
|
|
|
@ -10080,9 +10080,9 @@ INT_PTR CALLBACK DlgCheatSearchAdd(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP
|
||||||
memset(buf,0,sizeof(TCHAR) * 12);
|
memset(buf,0,sizeof(TCHAR) * 12);
|
||||||
_stprintf(buf, TEXT("%u"), new_cheat->saved_val);
|
_stprintf(buf, TEXT("%u"), new_cheat->saved_val);
|
||||||
SetDlgItemText(hDlg, IDC_NC_PREVVAL, buf);
|
SetDlgItemText(hDlg, IDC_NC_PREVVAL, buf);
|
||||||
SetWindowLong(GetDlgItem(hDlg, IDC_NC_NEWVAL), GWL_STYLE, ES_NUMBER |GetWindowLong(GetDlgItem(hDlg, IDC_NC_NEWVAL),GWL_STYLE));
|
SetWindowLongPtr(GetDlgItem(hDlg, IDC_NC_NEWVAL), GWL_STYLE, ES_NUMBER |GetWindowLong(GetDlgItem(hDlg, IDC_NC_NEWVAL),GWL_STYLE));
|
||||||
SetWindowLong(GetDlgItem(hDlg, IDC_NC_CURRVAL), GWL_STYLE, ES_NUMBER |GetWindowLong(GetDlgItem(hDlg, IDC_NC_CURRVAL),GWL_STYLE));
|
SetWindowLongPtr(GetDlgItem(hDlg, IDC_NC_CURRVAL), GWL_STYLE, ES_NUMBER |GetWindowLong(GetDlgItem(hDlg, IDC_NC_CURRVAL),GWL_STYLE));
|
||||||
SetWindowLong(GetDlgItem(hDlg, IDC_NC_PREVVAL), GWL_STYLE, ES_NUMBER |GetWindowLong(GetDlgItem(hDlg, IDC_NC_PREVVAL),GWL_STYLE));
|
SetWindowLongPtr(GetDlgItem(hDlg, IDC_NC_PREVVAL), GWL_STYLE, ES_NUMBER |GetWindowLong(GetDlgItem(hDlg, IDC_NC_PREVVAL),GWL_STYLE));
|
||||||
if(new_cheat->size==1)
|
if(new_cheat->size==1)
|
||||||
{
|
{
|
||||||
SendDlgItemMessage(hDlg, IDC_NC_CURRVAL,EM_SETLIMITTEXT, 3, 0);
|
SendDlgItemMessage(hDlg, IDC_NC_CURRVAL,EM_SETLIMITTEXT, 3, 0);
|
||||||
|
|
Loading…
Reference in New Issue