From 9184431b2fc2812417fb0670100c5d0b62c84ee3 Mon Sep 17 00:00:00 2001 From: a dinosaur Date: Mon, 7 Oct 2024 22:51:37 +1100 Subject: [PATCH] fix for 3.1.3 ABI preview --- Lesson10.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Lesson10.c b/Lesson10.c index 04b7acc..ca71966 100644 --- a/Lesson10.c +++ b/Lesson10.c @@ -300,14 +300,14 @@ static void KillGLWindow(APPSTATE *state) // Restore windowed state & cursor visibility if (state->fullscreen) { - SDL_SetWindowFullscreen(state->win, SDL_FALSE); + SDL_SetWindowFullscreen(state->win, false); SDL_ShowCursor(); } // Release and delete rendering context if (state->ctx) { - if (SDL_GL_MakeCurrent(state->win, NULL) == SDL_FALSE) + if (!SDL_GL_MakeCurrent(state->win, NULL)) { SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_INFORMATION, "SHUTDOWN ERROR", "Release Of RC Failed.", NULL); } @@ -341,7 +341,7 @@ static bool CreateGLWindow(APPSTATE *state, char *title, int width, int height, // Try entering fullscreen mode if requested if (fullscreenflag) { - if (!SDL_SetWindowFullscreen(state->win, SDL_TRUE)) + if (!SDL_SetWindowFullscreen(state->win, true)) { // If mode switching fails, ask the user to quit or use to windowed mode int bttnid = ShowYesNoMessageBox(state->win, BTTN_YES, "NeHe GL", @@ -469,7 +469,7 @@ SDL_AppResult SDL_AppIterate(void *appstate) SDL_GL_SwapWindow(state->win); // Swap buffers (double buffering) // Handle keyboard input - const SDL_bool *keys = SDL_GetKeyboardState(NULL); + const bool *keys = SDL_GetKeyboardState(NULL); if (keys[SDL_SCANCODE_PAGEUP]) { @@ -540,7 +540,7 @@ SDL_AppResult SDL_AppIterate(void *appstate) SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[]) { - if (SDL_Init(SDL_INIT_VIDEO) == SDL_FALSE) + if (!SDL_Init(SDL_INIT_VIDEO)) { return SDL_APP_FAILURE; } @@ -589,7 +589,7 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[]) return SDL_APP_CONTINUE; } -void SDL_AppQuit(void *appstate) +void SDL_AppQuit(void *appstate, SDL_AppResult result) { if (appstate) {