Ignore:
Timestamp:
Jan 31, 2013, 2:17:09 AM (8 years ago)
Author:
sam
Message:

build: add SDL detection code in new file lol-sdl.m4. The SDL2 version is
disabled until the engine code itself is ported to SDL2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/input/input.cpp

    r2216 r2300  
    116116{
    117117#if defined USE_SDL
    118 #if SDL_MAJOR_VERSION == 1 && SDL_MINOR_VERSION >= 3
     118#   if SDL_VERSION_ATLEAST(1,3,0)
    119119    Uint8 *keystate = SDL_GetKeyboardState(NULL);
    120 #else
     120#   else
    121121    Uint8 *keystate = SDL_GetKeyState(NULL);
    122 #endif
     122#   endif
    123123    //SOOOoooo ugly.
    124124    for (int i = 0; i < Key::Last; ++i)
     
    270270#if defined USE_SDL
    271271    /* Simulate a joystick using the keyboard. This SDL call is free. */
    272 #if SDL_MAJOR_VERSION == 1 && SDL_MINOR_VERSION >= 3
     272#   if SDL_VERSION_ATLEAST(1,3,0)
    273273    Uint8 *keystate = SDL_GetKeyboardState(NULL);
    274 #else
     274#   else
    275275    Uint8 *keystate = SDL_GetKeyState(NULL);
    276 #endif
     276#   endif
    277277    int left = keystate[SDLK_d] - (keystate[SDLK_a] | keystate[SDLK_q]);
    278278    int up = (keystate[SDLK_w] | keystate[SDLK_z]) - keystate[SDLK_s] ;
     
    303303{
    304304#if defined USE_SDL
    305 #   if SDL_MAJOR_VERSION == 1 && SDL_MINOR_VERSION >= 3
     305#   if SDL_VERSION_ATLEAST(1,3,0)
    306306    Uint8 *keystate = SDL_GetKeyboardState(NULL);
    307307#   else
Note: See TracChangeset for help on using the changeset viewer.