From 1964e8e72c2e39642cc057a04c00e8845a411d2c Mon Sep 17 00:00:00 2001 From: AllMeatball <181806857+AllMeatball@users.noreply.github.com> Date: Fri, 16 May 2025 00:05:11 -0500 Subject: [PATCH] isleapp: Show error dialog if NOCD.si fails to load --- ISLE/isleapp.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ISLE/isleapp.cpp b/ISLE/isleapp.cpp index ae034a2e..1cde90c5 100644 --- a/ISLE/isleapp.cpp +++ b/ISLE/isleapp.cpp @@ -73,6 +73,7 @@ MxS32 g_reqEnableRMDevice = FALSE; // STRING: ISLE 0x4101dc #define WINDOW_TITLE "LEGO®" +SDL_AppResult g_closeResult = SDL_APP_SUCCESS; SDL_Window* window; // FUNCTION: ISLE 0x401000 @@ -286,7 +287,7 @@ SDL_AppResult SDL_AppInit(void** appstate, int argc, char** argv) SDL_AppResult SDL_AppIterate(void* appstate) { if (g_closed) { - return SDL_APP_SUCCESS; + return g_closeResult; } g_isle->Tick(); @@ -739,6 +740,15 @@ inline void IsleApp::Tick() if (!stream) { stream = Streamer()->Open("\\lego\\scripts\\nocd", MxStreamer::e_diskStream); if (!stream) { + SDL_ShowSimpleMessageBox( + SDL_MESSAGEBOX_ERROR, + "LEGO® Island Error", + "\"LEGO® Island\" failed to start.\nPlease quit all other applications and try again." + "\nFailed to load NOCD.si", + NULL + ); + g_closed = TRUE; + g_closeResult = SDL_APP_FAILURE; return; }