forked from Green-Sky/tomato
sdl (master post 3.1 preview) Merge commit 'e4f454091a943345938608570b104400f62fd625'
This commit is contained in:
18
external/sdl/SDL/test/testpopup.c
vendored
18
external/sdl/SDL/test/testpopup.c
vendored
@@ -11,17 +11,17 @@ freely.
|
||||
*/
|
||||
/* Simple program: Move N sprites around on the screen as fast as possible */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#include <emscripten/emscripten.h>
|
||||
#endif
|
||||
|
||||
#include <SDL3/SDL_main.h>
|
||||
#include <SDL3/SDL_test_common.h>
|
||||
#include <SDL3/SDL_test_font.h>
|
||||
|
||||
#ifdef SDL_PLATFORM_EMSCRIPTEN
|
||||
#include <emscripten/emscripten.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
#define MENU_WIDTH 120
|
||||
#define MENU_HEIGHT 300
|
||||
|
||||
@@ -95,7 +95,7 @@ static SDL_bool create_popup(struct PopupWindow *new_popup, SDL_bool is_menu)
|
||||
const int w = is_menu ? MENU_WIDTH : TOOLTIP_WIDTH;
|
||||
const int h = is_menu ? MENU_HEIGHT : TOOLTIP_HEIGHT;
|
||||
const int v_off = is_menu ? 0 : 32;
|
||||
const Uint32 flags = is_menu ? SDL_WINDOW_POPUP_MENU : SDL_WINDOW_TOOLTIP;
|
||||
const SDL_WindowFlags flags = is_menu ? SDL_WINDOW_POPUP_MENU : SDL_WINDOW_TOOLTIP;
|
||||
float x, y;
|
||||
|
||||
focus = SDL_GetMouseFocus();
|
||||
@@ -269,7 +269,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
/* Main render loop */
|
||||
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