mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-20 15:51:07 +01:00
test: Change LoadContext() return value type from int to bool
It should be then consistent with SDL_SetError().
This commit is contained in:
@@ -33,7 +33,7 @@ static SDL_GLContext context;
|
||||
static GL_Context ctx;
|
||||
static bool suspend_when_occluded;
|
||||
|
||||
static int LoadContext(GL_Context *data)
|
||||
static bool LoadContext(GL_Context *data)
|
||||
{
|
||||
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||
#define __SDL_NOGETPROCADDR__
|
||||
@@ -55,7 +55,7 @@ static int LoadContext(GL_Context *data)
|
||||
|
||||
#include "../src/render/opengl/SDL_glfuncs.h"
|
||||
#undef SDL_PROC
|
||||
return 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
|
||||
@@ -284,7 +284,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
/* Important: call this *after* creating the context */
|
||||
if (LoadContext(&ctx) < 0) {
|
||||
if (!LoadContext(&ctx)) {
|
||||
SDL_Log("Could not load GL functions\n");
|
||||
quit(2);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user