mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
isleapp: Show error dialog if NOCD.si fails to load
This commit is contained in:
parent
4ccd2501d0
commit
1964e8e72c
@ -73,6 +73,7 @@ MxS32 g_reqEnableRMDevice = FALSE;
|
|||||||
// STRING: ISLE 0x4101dc
|
// STRING: ISLE 0x4101dc
|
||||||
#define WINDOW_TITLE "LEGO®"
|
#define WINDOW_TITLE "LEGO®"
|
||||||
|
|
||||||
|
SDL_AppResult g_closeResult = SDL_APP_SUCCESS;
|
||||||
SDL_Window* window;
|
SDL_Window* window;
|
||||||
|
|
||||||
// FUNCTION: ISLE 0x401000
|
// FUNCTION: ISLE 0x401000
|
||||||
@ -286,7 +287,7 @@ SDL_AppResult SDL_AppInit(void** appstate, int argc, char** argv)
|
|||||||
SDL_AppResult SDL_AppIterate(void* appstate)
|
SDL_AppResult SDL_AppIterate(void* appstate)
|
||||||
{
|
{
|
||||||
if (g_closed) {
|
if (g_closed) {
|
||||||
return SDL_APP_SUCCESS;
|
return g_closeResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_isle->Tick();
|
g_isle->Tick();
|
||||||
@ -739,6 +740,15 @@ inline void IsleApp::Tick()
|
|||||||
if (!stream) {
|
if (!stream) {
|
||||||
stream = Streamer()->Open("\\lego\\scripts\\nocd", MxStreamer::e_diskStream);
|
stream = Streamer()->Open("\\lego\\scripts\\nocd", MxStreamer::e_diskStream);
|
||||||
if (!stream) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user