Skip to content

Commit

Permalink
Use SDL macros for return values
Browse files Browse the repository at this point in the history
  • Loading branch information
foxtacles authored and madebr committed Jun 25, 2024
1 parent 880ae98 commit f87c1a0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ISLE/isleapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ int SDL_AppInit(void** appstate, int argc, char** argv)
"\"LEGO® Island\" failed to start. Please quit all other applications and try again.",
NULL
);
return -1;
return SDL_APP_FAILURE;
}

// [library:window]
Expand All @@ -268,18 +268,18 @@ int SDL_AppInit(void** appstate, int argc, char** argv)
"\"LEGO® Island\" failed to start. Please quit all other applications and try again.",
NULL
);
return -1;
return SDL_APP_FAILURE;
}

// Get reference to window
*appstate = g_isle->GetWindowHandle();
return 0;
return SDL_APP_CONTINUE;
}

int SDL_AppIterate(void* appstate)
{
if (g_closed) {
return 1;
return SDL_APP_SUCCESS;
}

g_isle->Tick();
Expand All @@ -293,7 +293,7 @@ int SDL_AppIterate(void* appstate)
}

if (g_closed) {
return 1;
return SDL_APP_SUCCESS;
}

if (g_mousedown && g_mousemoved && g_isle) {
Expand All @@ -305,13 +305,13 @@ int SDL_AppIterate(void* appstate)
}
}

return 0;
return SDL_APP_CONTINUE;
}

int SDL_AppEvent(void* appstate, const SDL_Event* event)
{
if (!g_isle) {
return 0;
return SDL_APP_CONTINUE;
}

// [library:window]
Expand Down Expand Up @@ -391,7 +391,7 @@ int SDL_AppEvent(void* appstate, const SDL_Event* event)
break;
}

return 0;
return SDL_APP_CONTINUE;
}

void SDL_AppQuit(void* appstate)
Expand Down

0 comments on commit f87c1a0

Please sign in to comment.