diff options
author | Ryan C. Gordon <icculus@icculus.org> | 2014-12-24 22:22:35 -0500 |
---|---|---|
committer | Ryan C. Gordon <icculus@icculus.org> | 2014-12-24 22:22:35 -0500 |
commit | 7d6719cee3966fdb1e49ce22e0033c1ccf9b0d68 (patch) | |
tree | 7c6abd5b4584b9d13be5486645eab012074e04a6 /test/testgesture.c | |
parent | 1ba2c5dcae39ae769f76fd7a99aca77ba50a4a2b (diff) | |
download | sdl-7d6719cee3966fdb1e49ce22e0033c1ccf9b0d68.tar.gz |
Maybe actually patched to compile this time?
Diffstat (limited to 'test/testgesture.c')
-rw-r--r-- | test/testgesture.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/testgesture.c b/test/testgesture.c index f7282ac49..ea7512d99 100644 --- a/test/testgesture.c +++ b/test/testgesture.c @@ -39,6 +39,7 @@ static int eventWrite; static int colors[7] = {0xFF,0xFF00,0xFF0000,0xFFFF00,0x00FFFF,0xFF00FF,0xFFFFFF}; SDL_Surface *screen; +SDL_Window *window; SDL_bool quitting = SDL_FALSE; typedef struct { @@ -162,9 +163,6 @@ SDL_Window* initWindow(SDL_Window *window, int width,int height) SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, width, height, SDL_WINDOW_RESIZABLE); } - if (!window) { - return NULL; - } return window; } @@ -287,6 +285,12 @@ int main(int argc, char* argv[]) return 1; } + if (!(window = initWindow(NULL,WIDTH,HEIGHT))) + { + SDL_Quit(); + return 1; + } + #ifdef __EMSCRIPTEN__ emscripten_set_main_loop(loop, 0, 1); #else |