mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-16 09:48:26 +00:00
Tests: Use the main callback code macros
This commit is contained in:
parent
7d81e9d46c
commit
06aa02453a
7 changed files with 68 additions and 64 deletions
|
@ -22,6 +22,10 @@
|
|||
/* Ported from original test/common.c file. */
|
||||
#include <SDL3/SDL_test.h>
|
||||
|
||||
#define SDL_MAIN_NOIMPL
|
||||
#define SDL_MAIN_USE_CALLBACKS
|
||||
#include <SDL3/SDL_main.h>
|
||||
|
||||
static const char *common_usage[] = {
|
||||
"[-h | --help]",
|
||||
"[--trackmem]",
|
||||
|
@ -2400,19 +2404,19 @@ int SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const SDL_Event
|
|||
}
|
||||
break;
|
||||
case SDLK_ESCAPE:
|
||||
return 1;
|
||||
return SDL_MAIN_CALLBACK_EXIT_SUCCESS;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SDL_EVENT_QUIT:
|
||||
return 1;
|
||||
return SDL_MAIN_CALLBACK_EXIT_SUCCESS;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0; /* keep going */
|
||||
return SDL_MAIN_CALLBACK_CONTINUE;
|
||||
}
|
||||
|
||||
void SDLTest_CommonEvent(SDLTest_CommonState *state, SDL_Event *event, int *done)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue