mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-08 12:28:14 +00:00
Tests: Use the main callback code macros
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user