implemented WM_DISPLAYCHANGE code

This commit is contained in:
itsmattkc
2023-04-29 20:37:12 -07:00
parent 812ac70957
commit 23f2bf5e03
4 changed files with 51 additions and 14 deletions

View File

@@ -9,6 +9,10 @@ const char *WINDOW_TITLE = "LEGO
unsigned char g_mousedown = 0;
unsigned char g_mousemoved = 0;
int _DAT_00410050 = 0;
int _DAT_00410054 = 1;
int g_targetWidth = 640;
int g_targetHeight = 480;
unsigned int g_targetDepth = 16;
int _DAT_00410064 = 0;
int _DAT_004101bc = 200;
long g_lastFrameTime = 0;

View File

@@ -10,6 +10,10 @@ extern const char *WINDOW_TITLE;
extern unsigned char g_mousedown;
extern unsigned char g_mousemoved;
extern int _DAT_00410050;
extern int _DAT_00410054;
extern int g_targetWidth;
extern int g_targetHeight;
extern unsigned int g_targetDepth;
extern int _DAT_00410064;
extern int _DAT_004101bc;
extern long g_lastFrameTime;

View File

@@ -355,31 +355,27 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
return DefWindowProcA(hWnd, WM_NCPAINT, wParam, lParam);
case WM_DISPLAYCHANGE:
/* FIXME: Untangle
if (g_isle && VideoManager() && g_isle->m_fullScreen && ((pLVar7 = VideoManager(), *(int *)(pLVar7 + 0x74) != 0 && (pLVar7 = VideoManager(), *(int *)(*(int *)(pLVar7 + 0x74) + 0x880) != 0))) {
if (g_isle && VideoManager() && g_isle->m_fullScreen && VideoManager()->m_unk74 && VideoManager()->m_unk74[0x220]) {
if (_DAT_00410054 == 0) {
unsigned char bVar1 = FALSE;
if (LOWORD(lParam) == _DAT_00410058 && HIWORD(lParam) == _DAT_0041005c && _DAT_00410060 == wParam) {
bVar1 = TRUE;
unsigned char valid = FALSE;
if (LOWORD(lParam) == g_targetWidth && HIWORD(lParam) == g_targetHeight && g_targetDepth == wParam) {
valid = TRUE;
}
if (_DAT_00410050 == 0) {
if (!bVar1) {
if (!valid) {
_DAT_00410050 = 1;
Lego()->vtable38();
VideoManager()->DisableRMDevice();
}
}
else if (bVar1) {
} else if (valid) {
_DAT_00410064 = 1;
}
}
else {
} else {
_DAT_00410054 = 0;
_DAT_00410060 = wParam;
g_targetDepth = wParam;
}
}*/
return DefWindowProcA(hWnd,WM_DISPLAYCHANGE,wParam,lParam);
}
return DefWindowProcA(hWnd, WM_DISPLAYCHANGE, wParam, lParam);
case WM_SETCURSOR:
case WM_KEYDOWN:
case WM_MOUSEMOVE: