mirror of
https://github.com/isledecomp/isle-portable.git
synced 2025-09-27 14:42:51 -04:00
Use SDL macros for return values
This commit is contained in:
parent
880ae98f0b
commit
f87c1a0b6f
@ -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.",
|
"\"LEGO® Island\" failed to start. Please quit all other applications and try again.",
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
return -1;
|
return SDL_APP_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// [library:window]
|
// [library:window]
|
||||||
@ -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.",
|
"\"LEGO® Island\" failed to start. Please quit all other applications and try again.",
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
return -1;
|
return SDL_APP_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get reference to window
|
// Get reference to window
|
||||||
*appstate = g_isle->GetWindowHandle();
|
*appstate = g_isle->GetWindowHandle();
|
||||||
return 0;
|
return SDL_APP_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int SDL_AppIterate(void* appstate)
|
int SDL_AppIterate(void* appstate)
|
||||||
{
|
{
|
||||||
if (g_closed) {
|
if (g_closed) {
|
||||||
return 1;
|
return SDL_APP_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_isle->Tick();
|
g_isle->Tick();
|
||||||
@ -293,7 +293,7 @@ int SDL_AppIterate(void* appstate)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (g_closed) {
|
if (g_closed) {
|
||||||
return 1;
|
return SDL_APP_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_mousedown && g_mousemoved && g_isle) {
|
if (g_mousedown && g_mousemoved && g_isle) {
|
||||||
@ -305,13 +305,13 @@ int SDL_AppIterate(void* appstate)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return SDL_APP_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int SDL_AppEvent(void* appstate, const SDL_Event* event)
|
int SDL_AppEvent(void* appstate, const SDL_Event* event)
|
||||||
{
|
{
|
||||||
if (!g_isle) {
|
if (!g_isle) {
|
||||||
return 0;
|
return SDL_APP_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// [library:window]
|
// [library:window]
|
||||||
@ -391,7 +391,7 @@ int SDL_AppEvent(void* appstate, const SDL_Event* event)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return SDL_APP_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDL_AppQuit(void* appstate)
|
void SDL_AppQuit(void* appstate)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user