Define SDL_PLATFORM_* macros instead of underscored ones (#8875)

This commit is contained in:
Anonymous Maarten authored and GitHub committed 2024-01-24 01:40:51 +00:00
1 parent ceccf24519
commit 31d133db40
208 files changed
+1293 -1138

No files matched your search

+7 -7
View File
@@ -14,14 +14,14 @@
/* Sample program: Draw a Chess Board by using SDL_CreateSoftwareRenderer API */
#ifdef __EMSCRIPTEN__
#include <emscripten/emscripten.h>
#endif
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include <SDL3/SDL_test.h>
#ifdef SDL_PLATFORM_EMSCRIPTEN
#include <emscripten/emscripten.h>
#endif
static SDL_Window *window;
static SDL_Renderer *renderer;
static SDL_Surface *surface;
@@ -79,7 +79,7 @@ static void loop(void)
if (e.type == SDL_EVENT_QUIT) {
done = 1;
#ifdef __EMSCRIPTEN__
#ifdef SDL_PLATFORM_EMSCRIPTEN
emscripten_cancel_main_loop();
#endif
return;
@@ -87,7 +87,7 @@ static void loop(void)
if ((e.type == SDL_EVENT_KEY_DOWN) && (e.key.keysym.sym == SDLK_ESCAPE)) {
done = 1;
#ifdef __EMSCRIPTEN__
#ifdef SDL_PLATFORM_EMSCRIPTEN
emscripten_cancel_main_loop();
#endif
return;
@@ -144,7 +144,7 @@ int main(int argc, char *argv[])
/* Draw the Image on rendering surface */
done = 0;
#ifdef __EMSCRIPTEN__
#ifdef SDL_PLATFORM_EMSCRIPTEN
emscripten_set_main_loop(loop, 0, 1);
#else
while (!done) {