mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-26 01:17:55 -05:00
Merge pull request #6 from foxtacles/wm_syscommand
Use Windows-defined type constants in WM_SYSCOMMAND
This commit is contained in:
commit
73a13f0b67
1 changed files with 4 additions and 4 deletions
|
@ -324,18 +324,18 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
case WM_ENTERMENULOOP:
|
case WM_ENTERMENULOOP:
|
||||||
return DefWindowProcA(hWnd,WM_ENTERMENULOOP,wParam,lParam);
|
return DefWindowProcA(hWnd,WM_ENTERMENULOOP,wParam,lParam);
|
||||||
case WM_SYSCOMMAND:
|
case WM_SYSCOMMAND:
|
||||||
if (wParam == 0xf140) {
|
if (wParam == SC_SCREENSAVE) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (wParam == 0xf060 && g_closed == 0) {
|
if (wParam == SC_CLOSE && g_closed == 0) {
|
||||||
if (g_isle) {
|
if (g_isle) {
|
||||||
if (g_rmDisabled) {
|
if (g_rmDisabled) {
|
||||||
ShowWindow(g_isle->m_windowHandle, SW_RESTORE);
|
ShowWindow(g_isle->m_windowHandle, SW_RESTORE);
|
||||||
}
|
}
|
||||||
PostMessageA(g_isle->m_windowHandle, 0x10, 0, 0);
|
PostMessageA(g_isle->m_windowHandle, WM_CLOSE, 0, 0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else if (g_isle && g_isle->m_fullScreen && (wParam == 0xf010 || wParam == 0xf100)) {
|
} else if (g_isle && g_isle->m_fullScreen && (wParam == SC_MOVE || wParam == SC_KEYMENU)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return DefWindowProcA(hWnd,WM_SYSCOMMAND,wParam,lParam);
|
return DefWindowProcA(hWnd,WM_SYSCOMMAND,wParam,lParam);
|
||||||
|
|
Loading…
Reference in a new issue