sdl (master post 3.1 preview) Merge commit 'e4f454091a943345938608570b104400f62fd625'
This commit is contained in:
16
external/sdl/SDL/test/testscale.c
vendored
16
external/sdl/SDL/test/testscale.c
vendored
@@ -11,16 +11,16 @@
|
||||
*/
|
||||
/* Simple program: Move N sprites around on the screen as fast as possible */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#include <emscripten/emscripten.h>
|
||||
#endif
|
||||
|
||||
#include <SDL3/SDL_test_common.h>
|
||||
#include <SDL3/SDL_main.h>
|
||||
#include "testutils.h"
|
||||
|
||||
#ifdef SDL_PLATFORM_EMSCRIPTEN
|
||||
#include <emscripten/emscripten.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
static SDLTest_CommonState *state;
|
||||
|
||||
typedef struct
|
||||
@@ -92,7 +92,7 @@ static void loop(void)
|
||||
}
|
||||
Draw(&drawstates[i]);
|
||||
}
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#ifdef SDL_PLATFORM_EMSCRIPTEN
|
||||
if (done) {
|
||||
emscripten_cancel_main_loop();
|
||||
}
|
||||
@@ -146,7 +146,7 @@ int main(int argc, char *argv[])
|
||||
then = SDL_GetTicks();
|
||||
done = 0;
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#ifdef SDL_PLATFORM_EMSCRIPTEN
|
||||
emscripten_set_main_loop(loop, 0, 1);
|
||||
#else
|
||||
while (!done) {
|
||||
|
||||
Reference in New Issue
Block a user