mirror of https://github.com/OpenTTD/OpenTTD
Remove: [SDL] SDL 1.3 never happened, so remove all the special code for it
parent
0e76d965f1
commit
058f13bdf9
|
@ -411,11 +411,7 @@ bool VideoDriver_SDL::ClaimMousePointer()
|
||||||
}
|
}
|
||||||
|
|
||||||
struct SDLVkMapping {
|
struct SDLVkMapping {
|
||||||
#if SDL_VERSION_ATLEAST(1, 3, 0)
|
|
||||||
SDL_Keycode vk_from;
|
|
||||||
#else
|
|
||||||
uint16 vk_from;
|
uint16 vk_from;
|
||||||
#endif
|
|
||||||
byte vk_count;
|
byte vk_count;
|
||||||
byte map_to;
|
byte map_to;
|
||||||
};
|
};
|
||||||
|
@ -656,12 +652,8 @@ void VideoDriver_SDL::Stop()
|
||||||
void VideoDriver_SDL::InputLoop()
|
void VideoDriver_SDL::InputLoop()
|
||||||
{
|
{
|
||||||
uint32 mod = SDL_GetModState();
|
uint32 mod = SDL_GetModState();
|
||||||
#if SDL_VERSION_ATLEAST(1, 3, 0)
|
|
||||||
Uint8 *keys = SDL_GetKeyboardState(&numkeys);
|
|
||||||
#else
|
|
||||||
int numkeys;
|
int numkeys;
|
||||||
Uint8 *keys = SDL_GetKeyState(&numkeys);
|
Uint8 *keys = SDL_GetKeyState(&numkeys);
|
||||||
#endif
|
|
||||||
|
|
||||||
bool old_ctrl_pressed = _ctrl_pressed;
|
bool old_ctrl_pressed = _ctrl_pressed;
|
||||||
|
|
||||||
|
@ -673,11 +665,7 @@ void VideoDriver_SDL::InputLoop()
|
||||||
#else
|
#else
|
||||||
/* Speedup when pressing tab, except when using ALT+TAB
|
/* Speedup when pressing tab, except when using ALT+TAB
|
||||||
* to switch to another application. */
|
* to switch to another application. */
|
||||||
#if SDL_VERSION_ATLEAST(1, 3, 0)
|
|
||||||
if (keys[SDL_SCANCODE_TAB] && (mod & KMOD_ALT) == 0)
|
|
||||||
#else
|
|
||||||
if (keys[SDLK_TAB] && (mod & KMOD_ALT) == 0)
|
if (keys[SDLK_TAB] && (mod & KMOD_ALT) == 0)
|
||||||
#endif /* SDL_VERSION_ATLEAST(1, 3, 0) */
|
|
||||||
#endif /* defined(_DEBUG) */
|
#endif /* defined(_DEBUG) */
|
||||||
{
|
{
|
||||||
if (!_networking && _game_mode != GM_MENU) _fast_forward |= 2;
|
if (!_networking && _game_mode != GM_MENU) _fast_forward |= 2;
|
||||||
|
@ -687,17 +675,10 @@ void VideoDriver_SDL::InputLoop()
|
||||||
|
|
||||||
/* Determine which directional keys are down. */
|
/* Determine which directional keys are down. */
|
||||||
_dirkeys =
|
_dirkeys =
|
||||||
#if SDL_VERSION_ATLEAST(1, 3, 0)
|
|
||||||
(keys[SDL_SCANCODE_LEFT] ? 1 : 0) |
|
|
||||||
(keys[SDL_SCANCODE_UP] ? 2 : 0) |
|
|
||||||
(keys[SDL_SCANCODE_RIGHT] ? 4 : 0) |
|
|
||||||
(keys[SDL_SCANCODE_DOWN] ? 8 : 0);
|
|
||||||
#else
|
|
||||||
(keys[SDLK_LEFT] ? 1 : 0) |
|
(keys[SDLK_LEFT] ? 1 : 0) |
|
||||||
(keys[SDLK_UP] ? 2 : 0) |
|
(keys[SDLK_UP] ? 2 : 0) |
|
||||||
(keys[SDLK_RIGHT] ? 4 : 0) |
|
(keys[SDLK_RIGHT] ? 4 : 0) |
|
||||||
(keys[SDLK_DOWN] ? 8 : 0);
|
(keys[SDLK_DOWN] ? 8 : 0);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (old_ctrl_pressed != _ctrl_pressed) HandleCtrlChanged();
|
if (old_ctrl_pressed != _ctrl_pressed) HandleCtrlChanged();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue