Changeset 2300 for trunk/src


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.

Location:
trunk/src
Files:
5 edited

Legend:

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

    r2222 r2300  
    5555    /* FIXME: this macro is only deactivated if we include "lolgl.h" */
    5656    EglApp app;
    57 #elif defined HAVE_SDL_H
     57#elif defined HAVE_SDL_H || defined HAVE_SDL_SDL_H
    5858    SdlApp app;
    5959#else
  • trunk/src/eglapp.cpp

    r2222 r2300  
    2626
    2727#if defined USE_SDL
    28 #   if defined HAVE_SDL_SDL_H
     28#   if defined HAVE_SDL_H || defined HAVE_SDL_SDL_H
    2929#      include <SDL/SDL.h>
    3030#   else
  • 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
  • trunk/src/platform/sdl/sdlapp.cpp

    r2276 r2300  
    1414
    1515#if defined USE_SDL
    16 #   if defined HAVE_SDL_SDL_H
     16#   if defined HAVE_SDL2_SDL_H
     17#      include <SDL2/SDL.h>
     18#   elif defined HAVE_SDL_SDL_H
    1719#      include <SDL/SDL.h>
    1820#   else
     
    7476    SDL_GetWMInfo(&wminfo);
    7577    g_hwnd = wminfo.window;
     78#   elif SDL_VERSION_ATLEAST(2,0,0)
     79    TODO
    7680#   else
    7781    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
  • trunk/src/sys/timer.cpp

    r2257 r2300  
    3131#   include <sys/timer.h>
    3232#   include <sys/time_util.h>
    33 #elif defined HAVE_SDL_SDL_H
     33#elif defined HAVE_SDL_H || defined HAVE_SDL_SDL_H
    3434#   include <SDL/SDL.h>
    3535#else
Note: See TracChangeset for help on using the changeset viewer.