mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-26 17:51:16 +00:00
Another accuracy fix for WndProc
This commit is contained in:
parent
5d7d621c81
commit
dab606ece9
@ -24,6 +24,10 @@
|
|||||||
|
|
||||||
#include <dsound.h>
|
#include <dsound.h>
|
||||||
|
|
||||||
|
// Might be static functions of IsleApp
|
||||||
|
BOOL FindExistingInstance(void);
|
||||||
|
BOOL StartDirectSound(void);
|
||||||
|
|
||||||
// FUNCTION: ISLE 0x401000
|
// FUNCTION: ISLE 0x401000
|
||||||
IsleApp::IsleApp()
|
IsleApp::IsleApp()
|
||||||
{
|
{
|
||||||
@ -169,9 +173,6 @@ void IsleApp::SetupVideoFlags(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL FindExistingInstance(void);
|
|
||||||
BOOL StartDirectSound(void);
|
|
||||||
|
|
||||||
// FUNCTION: ISLE 0x401610
|
// FUNCTION: ISLE 0x401610
|
||||||
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
|
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
|
||||||
{
|
{
|
||||||
@ -421,15 +422,6 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
|
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
|
||||||
case WM_SETCURSOR:
|
|
||||||
if (g_isle) {
|
|
||||||
HCURSOR hCursor = g_isle->m_cursorCurrent;
|
|
||||||
if (hCursor == g_isle->m_cursorBusy || hCursor == g_isle->m_cursorNo || !hCursor) {
|
|
||||||
SetCursor(hCursor);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case WM_KEYDOWN:
|
case WM_KEYDOWN:
|
||||||
// While this probably should be (HIWORD(lParam) & KF_REPEAT), this seems
|
// While this probably should be (HIWORD(lParam) & KF_REPEAT), this seems
|
||||||
// to be what the assembly is actually doing
|
// to be what the assembly is actually doing
|
||||||
@ -460,6 +452,13 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case WM_SETCURSOR:
|
||||||
|
if (g_isle && (g_isle->m_cursorCurrent == g_isle->m_cursorBusy ||
|
||||||
|
g_isle->m_cursorCurrent == g_isle->m_cursorNo || !g_isle->m_cursorCurrent)) {
|
||||||
|
SetCursor(g_isle->m_cursorCurrent);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
|
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
@ -815,10 +814,8 @@ inline void IsleApp::Tick(BOOL sleepIfNotNextFrame)
|
|||||||
}
|
}
|
||||||
this->m_gameStarted = 1;
|
this->m_gameStarted = 1;
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
else if (sleepIfNotNextFrame != 0)
|
||||||
if (sleepIfNotNextFrame != 0)
|
|
||||||
Sleep(0);
|
Sleep(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user