From 0b149790d36e22c8c281acc0a3620e4f8ca01afa Mon Sep 17 00:00:00 2001 From: Ingo Ruhnke Date: Sun, 21 Mar 2004 19:37:21 +0000 Subject: [PATCH] bye, bye, joystick ifdefs SVN-Revision: 302 --- src/gameloop.cpp | 2 -- src/globals.cpp | 2 -- src/globals.h | 2 -- src/intro.cpp | 2 -- src/setup.cpp | 4 ---- src/title.cpp | 3 --- 6 files changed, 15 deletions(-) diff --git a/src/gameloop.cpp b/src/gameloop.cpp index 8ea2f9981..0f383df93 100644 --- a/src/gameloop.cpp +++ b/src/gameloop.cpp @@ -231,7 +231,6 @@ void game_event(void) break; } break; -#ifdef JOY_YES case SDL_JOYAXISMOTION: switch(event.jaxis.axis) @@ -282,7 +281,6 @@ void game_event(void) menuaction = MN_HIT; break; -#endif default: break; diff --git a/src/globals.cpp b/src/globals.cpp index 228185521..4de3b323b 100644 --- a/src/globals.cpp +++ b/src/globals.cpp @@ -26,8 +26,6 @@ bool launch_worldmap_mode = false; /* SuperTux directory ($HOME/.supertux) and save directory($HOME/.supertux/save) */ char *st_dir, *st_save_dir; -#ifdef JOY_YES SDL_Joystick * js; -#endif diff --git a/src/globals.h b/src/globals.h index da08624ad..0dbd85e27 100644 --- a/src/globals.h +++ b/src/globals.h @@ -32,8 +32,6 @@ extern bool launch_worldmap_mode; /* SuperTux directory ($HOME/.supertux) and save directory($HOME/.supertux/save) */ extern char *st_dir, *st_save_dir; -#ifdef JOY_YES extern SDL_Joystick * js; -#endif #endif /* SUPERTUX_GLOBALS_H */ diff --git a/src/intro.cpp b/src/intro.cpp index a88146dc2..2318ec22f 100644 --- a/src/intro.cpp +++ b/src/intro.cpp @@ -113,14 +113,12 @@ int intro(void) done = 1; } -#ifdef JOY_YES else if (event.type == SDL_JOYBUTTONDOWN) { /* Fire button - skip intro: */ done = 1; } -#endif } diff --git a/src/setup.cpp b/src/setup.cpp index 6cc2e4ae5..0210d045d 100644 --- a/src/setup.cpp +++ b/src/setup.cpp @@ -661,7 +661,6 @@ void st_joystick_setup(void) /* Init Joystick: */ -#ifdef JOY_YES use_joystick = YES; if (SDL_Init(SDL_INIT_JOYSTICK) < 0) @@ -675,7 +674,6 @@ void st_joystick_setup(void) else { /* Open joystick: */ - if (SDL_NumJoysticks() <= 0) { fprintf(stderr, "Warning: No joysticks are available.\n"); @@ -719,8 +717,6 @@ void st_joystick_setup(void) } } } -#endif - } void st_audio_setup(void) diff --git a/src/title.cpp b/src/title.cpp index 3d877a127..2280fbff5 100644 --- a/src/title.cpp +++ b/src/title.cpp @@ -124,7 +124,6 @@ int title(void) quit = 1; } } -#ifdef JOY_YES else if (event.type == SDL_JOYAXISMOTION && event.jaxis.axis == JOY_Y) { if (event.jaxis.value > 1024) @@ -138,8 +137,6 @@ int title(void) menuaction = MN_HIT; } -#endif - } /* Draw the background: */ -- 2.11.0