diff options
Diffstat (limited to 'frontends')
| -rw-r--r-- | frontends/sdl/meson.build | 2 | ||||
| -rw-r--r-- | frontends/sdl/sdl_ui.c | 23 |
2 files changed, 6 insertions, 19 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(); |