forked from Green-Sky/tomato
update sdl Merge commit '644725478f4de0f074a6834e8423ac36dce3974f'
This commit is contained in:
17
external/sdl/SDL/test/testwm.c
vendored
17
external/sdl/SDL/test/testwm.c
vendored
@ -10,8 +10,6 @@
|
||||
freely.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#include <emscripten/emscripten.h>
|
||||
#endif
|
||||
@ -42,17 +40,6 @@ static SDL_Cursor *cursor = NULL;
|
||||
static SDL_bool relative_mode = SDL_FALSE;
|
||||
static const SDL_DisplayMode *highlighted_mode = NULL;
|
||||
|
||||
/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
|
||||
static void
|
||||
quit(int rc)
|
||||
{
|
||||
SDLTest_CommonQuit(state);
|
||||
/* Let 'main()' return normally */
|
||||
if (rc != 0) {
|
||||
exit(rc);
|
||||
}
|
||||
}
|
||||
|
||||
/* Draws the modes menu, and stores the mode index under the mouse in highlighted_mode */
|
||||
static void
|
||||
draw_modes_menu(SDL_Window *window, SDL_Renderer *renderer, SDL_FRect viewport)
|
||||
@ -298,7 +285,7 @@ int main(int argc, char *argv[])
|
||||
#endif
|
||||
SDL_DestroyCursor(cursor);
|
||||
|
||||
quit(0);
|
||||
/* keep the compiler happy ... */
|
||||
SDLTest_CleanupTextDrawing();
|
||||
SDLTest_CommonQuit(state);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user