Skip to content

Commit

Permalink
Added new startup keys for engine:
Browse files Browse the repository at this point in the history
-nosplash - removes the splash screen at engine launch.
-splashnotop - allow to hide the splash screen by another window
  • Loading branch information
ShokerStlk authored and Xottab-DUTY committed Jan 15, 2018
1 parent d48ff90 commit 03e0948
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions src/xrEngine/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,11 @@ void Startup()
g_SpatialSpace = new ISpatial_DB("Spatial obj");
g_SpatialSpacePhysic = new ISpatial_DB("Spatial phys");
// Destroy LOGO
DestroyWindow(logoWindow);
logoWindow = nullptr;
if (logoWindow != nullptr)
{
DestroyWindow(logoWindow);
logoWindow = nullptr;
}
// Main cycle
Memory.mem_usage();
Device.Run();
Expand Down Expand Up @@ -320,18 +323,21 @@ int RunApplication(pcstr commandLine)
}
#endif
//SetThreadAffinityMask(GetCurrentThread(), 1);
logoWindow = CreateDialog(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_STARTUP), nullptr, LogoWndProc);
HWND logoPicture = GetDlgItem(logoWindow, IDC_STATIC_LOGO);
RECT logoRect;
GetWindowRect(logoPicture, &logoRect);
if (strstr(commandLine, "-nosplash") == 0)
{
logoWindow = CreateDialog(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_STARTUP), nullptr, LogoWndProc);
HWND logoPicture = GetDlgItem(logoWindow, IDC_STATIC_LOGO);
RECT logoRect;
GetWindowRect(logoPicture, &logoRect);
#ifndef DEBUG
HWND prevWindow = HWND_TOPMOST;
HWND prevWindow = (strstr(commandLine, "-splashnotop") == NULL) ? HWND_TOPMOST : HWND_NOTOPMOST;
#else
HWND prevWindow = HWND_NOTOPMOST;
HWND prevWindow = HWND_NOTOPMOST;
#endif
SetWindowPos(logoWindow, prevWindow, 0, 0, logoRect.right - logoRect.left, logoRect.bottom - logoRect.top,
SWP_NOMOVE | SWP_SHOWWINDOW);
UpdateWindow(logoWindow);
SetWindowPos(logoWindow, prevWindow, 0, 0, logoRect.right - logoRect.left, logoRect.bottom - logoRect.top,
SWP_NOMOVE | SWP_SHOWWINDOW);
UpdateWindow(logoWindow);
}
*g_sLaunchOnExit_app = 0;
*g_sLaunchOnExit_params = 0;

Expand Down

0 comments on commit 03e0948

Please sign in to comment.