From d61ff7c27060c1fe099042a4b88260db7e6df510 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Tue, 29 Oct 2019 02:00:19 -0400 Subject: fix build and update submodule --- frontends/sdl/meson.build | 2 ++ frontends/sdl/sdl_ui.c | 23 ++++------------------- ini | 2 +- 3 files changed, 7 insertions(+), 20 deletions(-) diff --git a/frontends/sdl/meson.build b/frontends/sdl/meson.build index e838ce9..a75c494 100644 --- a/frontends/sdl/meson.build +++ b/frontends/sdl/meson.build @@ -14,9 +14,11 @@ else deps += dependency('SDL2_ttf') endif +if host_machine.system() != 'windows' run_command( 'bash', '-c', 'cp -r $MESON_SOURCE_ROOT/frontends/sdl/data $MESON_BUILD_ROOT/frontends/sdl' ) +endif executable('cetris', src, dependencies: deps, diff --git a/frontends/sdl/sdl_ui.c b/frontends/sdl/sdl_ui.c index 1af4f93..6b817f3 100644 --- a/frontends/sdl/sdl_ui.c +++ b/frontends/sdl/sdl_ui.c @@ -20,7 +20,7 @@ #include "cetris_sdl.h" -#define W 1280 +#define W 1100 #define H 720 #define FRAME_RATE 60 @@ -348,22 +348,7 @@ int main(void) { SDL_Event e; for(;;) { while(SDL_PollEvent(&e)) { - if (show_menu) { - switch (e.type) { - case SDL_QUIT: - exit(0); - case SDL_KEYDOWN: - switch (e.key.keysym.sym) { - case SDLK_DOWN: - if (menu_index < 1) menu_index++; - break; - case SDLK_UP: - if (menu_index > 0) menu_index--; - break; - } - } - } else { - switch (e.type) { + switch (e.type) { case SDL_QUIT: exit(0); case SDL_KEYDOWN: @@ -407,8 +392,8 @@ int main(void) { case 'z': unhold_move(&g, ROTATE_CCW); break; } - } - } + break; + } } draw(); diff --git a/ini b/ini index 3401f2e..bd808a5 160000 --- a/ini +++ b/ini @@ -1 +1 @@ -Subproject commit 3401f2ed3153c6093c2f434e205cf6e7775a02d5 +Subproject commit bd808a59cdd6c1dc56cedf6fbc0e750680ce270b -- cgit v1.2.3-101-g0448