From 7aa45cc9d6e2373537b5f496d7c69642b858ff7a Mon Sep 17 00:00:00 2001 From: elasota Date: Fri, 16 Oct 2020 20:08:08 -0400 Subject: [PATCH] No loading screen on desktop --- GpApp/Main.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/GpApp/Main.cpp b/GpApp/Main.cpp index 8c6215e..7e5a4c9 100644 --- a/GpApp/Main.cpp +++ b/GpApp/Main.cpp @@ -362,6 +362,10 @@ void StepLoadScreen(int steps) void InitLoadingWindow() { + // Only phones are slow enough for this to matter + if (!thisMac.isTouchscreen) + return; + static const int kLoadScreenHeight = 32; static const int kLoadScreenWidth = 256; @@ -478,9 +482,12 @@ int gpAppMain() InitSrcRects(); CreateOffscreens(); StepLoadScreen(2); - PortabilityLayer::WindowManager::GetInstance()->FlickerWindowOut(loadScreenWindow, 32); - PortabilityLayer::WindowManager::GetInstance()->DestroyWindow(loadScreenWindow); - PLSysCalls::Sleep(15); + if (loadScreenWindow) + { + PortabilityLayer::WindowManager::GetInstance()->FlickerWindowOut(loadScreenWindow, 32); + PortabilityLayer::WindowManager::GetInstance()->DestroyWindow(loadScreenWindow); + PLSysCalls::Sleep(15); + } OpenMainWindow();