Skip to content

Commit 4a82776

Browse files
committed
Fix splash screen hiding certain windows (fixes #2819)
1 parent 56fbfc3 commit 4a82776

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Client/loader/Dialogs.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ void ShowSplash(HINSTANCE hInstance)
288288
splashWindowClass.lpfnWndProc = DefWindowProc;
289289
splashWindowClass.hInstance = hInstance;
290290
splashWindowClass.hCursor = LoadCursor(NULL, IDC_ARROW);
291+
splashWindowClass.hIcon = LoadIconA(GetModuleHandle(nullptr), MAKEINTRESOURCE(110)); // IDI_ICON1 from Launcher
291292
splashWindowClass.lpszClassName = TEXT("SplashWindow");
292293
RegisterClass(&splashWindowClass);
293294
}
@@ -298,8 +299,8 @@ void ShowSplash(HINSTANCE hInstance)
298299
}
299300
else
300301
{
301-
WindowScope window(CreateWindowEx(WS_EX_LAYERED | WS_EX_TOPMOST | WS_EX_TOOLWINDOW, splashWindowClass.lpszClassName, NULL, WS_POPUP | WS_VISIBLE,
302-
0, 0, 0, 0, NULL, NULL, hInstance, NULL));
302+
WindowScope window(CreateWindowEx(WS_EX_LAYERED, splashWindowClass.lpszClassName, "Multi Theft Auto Launcher", WS_POPUP | WS_VISIBLE, 0, 0, 0, 0,
303+
NULL, NULL, hInstance, NULL));
303304

304305
if (!window.handle)
305306
return;
@@ -341,6 +342,9 @@ void ShowSplash(HINSTANCE hInstance)
341342
splashWindow = window.Release();
342343
}
343344

345+
SetForegroundWindow(splashWindow);
346+
SetWindowPos(splashWindow, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
347+
344348
// Drain messages to allow for repaint in case picture bits were lost during previous operations
345349
MSG msg;
346350
while (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE))

0 commit comments

Comments
 (0)