Ignore:
Timestamp:
Sep 4, 2014, 6:26:54 PM (8 years ago)
Author:
Sam Hocevar
Message:

build: SDL2 compilation fixes.

Location:
abuse/branches/lol/src/sdlport
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • abuse/branches/lol/src/sdlport/event.cpp

    r726 r732  
    1919 */
    2020
    21 #if defined HAVE_CONFIG_H
     21#if HAVE_CONFIG_H
    2222#   include "config.h"
    2323#endif
     
    4444void EventHandler::SysWarpMouse(ivec2 pos)
    4545{
     46#if SDL_VERSION_ATLEAST(2,0,0)
     47#   warning no SDL_WarpMouse in SDL2
     48#else
    4649    SDL_WarpMouse(pos.x, pos.y);
     50#endif
    4751}
    4852
     
    190194        case SDLK_LSHIFT:       ev.key = JK_SHIFT_L; break;
    191195        case SDLK_RSHIFT:       ev.key = JK_SHIFT_R; break;
     196#if SDL_VERSION_ATLEAST(2,0,0)
     197#   warning no event keys in SDL2
     198#else
    192199        case SDLK_NUMLOCK:      ev.key = JK_NUM_LOCK; break;
    193200        case SDLK_HOME:         ev.key = JK_HOME; break;
     
    254261            ev.key = EV_SPURIOUS;
    255262            break;
     263#endif
    256264        default:
    257265            ev.key = (int)sdlev.key.keysym.sym;
  • abuse/branches/lol/src/sdlport/hmi.cpp

    r719 r732  
    99//
    1010
    11 #if defined HAVE_CONFIG_H
     11#if HAVE_CONFIG_H
    1212#   include "config.h"
    1313#endif
  • abuse/branches/lol/src/sdlport/jdir.cpp

    r555 r732  
    1919 */
    2020
    21 #if defined HAVE_CONFIG_H
     21#if HAVE_CONFIG_H
    2222#   include "config.h"
    2323#endif
  • abuse/branches/lol/src/sdlport/joystick.cpp

    r555 r732  
    1919 */
    2020
    21 #if defined HAVE_CONFIG_H
     21#if HAVE_CONFIG_H
    2222#   include "config.h"
    2323#endif
  • abuse/branches/lol/src/sdlport/setup.cpp

    r726 r732  
    1919 */
    2020
    21 #if defined HAVE_CONFIG_H
     21#if HAVE_CONFIG_H
    2222#   include "config.h"
    2323#endif
  • abuse/branches/lol/src/sdlport/sound.cpp

    r725 r732  
    1919 */
    2020
    21 #if defined HAVE_CONFIG_H
     21#if HAVE_CONFIG_H
    2222#   include "config.h"
    2323#endif
     
    195195
    196196    rw = SDL_RWFromMem(data, data_size);
     197#if SDL_VERSION_ATLEAST(2,0,0)
     198    music = Mix_LoadMUS_RW(rw, SDL_FALSE);
     199#else
    197200    music = Mix_LoadMUS_RW(rw);
     201#endif
    198202
    199203    if (!music)
  • abuse/branches/lol/src/sdlport/video.cpp

    r729 r732  
    1919 */
    2020
    21 #if defined HAVE_CONFIG_H
     21#if HAVE_CONFIG_H
    2222#   include "config.h"
    2323#endif
Note: See TracChangeset for help on using the changeset viewer.