Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
center splash
  • Loading branch information
erepb committed Feb 2, 2026
commit b6484f811dd61ac9445be2d70a10e0b655078354
18 changes: 13 additions & 5 deletions src/xrEngine/x_ray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ float discord_update_rate = .5f;
bool use_reshade = false;
extern bool init_reshade();
extern void unregister_reshade();
extern void GetMonitorResolution(u32& horizontal, u32& vertical);

//ImGui
#pragma comment(lib, "imgui.lib")
Expand Down Expand Up @@ -973,6 +974,13 @@ int APIENTRY WinMain_impl(HINSTANCE hInstance,
HWND logoPicture = GetDlgItem(logoWindow, IDC_STATIC_LOGO);
RECT logoRect;
GetWindowRect(logoPicture, &logoRect);
int splashW = logoRect.right - logoRect.left;
int splashH = logoRect.bottom - logoRect.top;

u32 screenW, screenH;
GetMonitorResolution(screenW, screenH);
int x = (screenW - splashW) / 2;
int y = (screenH - splashH) / 2;

SetWindowPos(
logoWindow,
Expand All @@ -981,11 +989,11 @@ int APIENTRY WinMain_impl(HINSTANCE hInstance,
#else
HWND_NOTOPMOST,
#endif // NDEBUG
0,
0,
logoRect.right - logoRect.left,
logoRect.bottom - logoRect.top,
SWP_NOMOVE | SWP_SHOWWINDOW // | SWP_NOSIZE
x,
y,
splashW,
splashH,
SWP_SHOWWINDOW
);

UpdateWindow(logoWindow);
Expand Down