Changeset 950


Ignore:
Timestamp:
Sep 13, 2011, 7:19:11 PM (8 years ago)
Author:
sam
Message:

build: fix Win64 compilation with mingw64, using an updated SDL build.

Location:
trunk
Files:
3 added
3 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r949 r950  
    220220if test "${ac_cv_my_have_sdl_mixer}" = "no"; then
    221221  AC_MSG_WARN([SDL_mixer not found])
     222else
     223  AC_DEFINE(USE_SDL_MIXER, 1, Define to 1 to use SDL_mixer)
    222224fi
    223225if test "${ac_cv_my_have_sdl_image}" = "no"; then
    224226  AC_MSG_WARN([SDL_image not found])
     227else
     228  AC_DEFINE(USE_SDL_IMAGE, 1, Define to 1 to use SDL_image)
    225229fi
    226230AM_CONDITIONAL(USE_SDL, test "${ac_cv_my_have_sdl}" = "yes")
  • trunk/src/audio.cpp

    r686 r950  
    1515#include <cmath>
    1616
    17 #if defined USE_SDL
     17#if defined USE_SDL_MIXER
    1818#   include <SDL.h>
    1919#   include <SDL_mixer.h>
     
    3131void Audio::Setup(int channels)
    3232{
    33 #if defined USE_SDL
     33#if defined USE_SDL_MIXER
    3434    Mix_OpenAudio(22050, AUDIO_S16, channels, 1024);
    3535#endif
  • trunk/src/image/image.cpp

    r939 r950  
    1717#if defined __APPLE__ && defined __MACH__
    1818#   import <UIKit/UIKit.h>
    19 #elif defined USE_SDL
     19#elif defined USE_SDL_IMAGE
    2020#   include <SDL.h>
    2121#   include <SDL_image.h>
     
    5454#if defined __APPLE__ && defined __MACH__
    5555    uint8_t *pixels;
    56 #elif defined USE_SDL
     56#elif defined USE_SDL_IMAGE
    5757    SDL_Surface *img;
    5858#elif defined __ANDROID__
     
    110110    [image release];
    111111    [pngdata release];
    112 #elif defined USE_SDL
     112#elif defined USE_SDL_IMAGE
    113113    for (char const *name = path; *name; name++)
    114114        if ((data->img = IMG_Load(name)))
     
    335335#if defined __APPLE__ && defined __MACH__
    336336    return data->pixels;
    337 #elif defined USE_SDL
     337#elif defined USE_SDL_IMAGE
    338338    return data->img->pixels;
    339339#elif defined __ANDROID__
     
    350350#if defined __APPLE__ && defined __MACH__
    351351    free(data->pixels);
    352 #elif defined USE_SDL
     352#elif defined USE_SDL_IMAGE
    353353    SDL_FreeSurface(data->img);
    354354#elif defined __ANDROID__
  • trunk/src/sample.cpp

    r758 r950  
    1818#include <cstring>
    1919
    20 #if defined USE_SDL
     20#if defined USE_SDL_MIXER
    2121#   include <SDL.h>
    2222#   include <SDL_mixer.h>
     
    4040private:
    4141    char *name, *path;
    42 #if defined USE_SDL
     42#if defined USE_SDL_MIXER
    4343    Mix_Chunk *chunk;
    4444#endif
     
    5656    sprintf(data->name, "<sample> %s", path);
    5757
    58 #if defined USE_SDL
     58#if defined USE_SDL_MIXER
    5959    data->chunk = Mix_LoadWAV(path);
    6060    if (!data->chunk)
     
    7171Sample::~Sample()
    7272{
    73 #if defined USE_SDL
     73#if defined USE_SDL_MIXER
    7474    Mix_FreeChunk(data->chunk);
    7575#endif
     
    9090void Sample::Play()
    9191{
    92 #if defined USE_SDL
     92#if defined USE_SDL_MIXER
    9393    Mix_PlayChannel(-1, data->chunk, 0);
    9494#endif
Note: See TracChangeset for help on using the changeset viewer.