fixed compile error with older versions of SDL
This commit is contained in:
parent
106a75f1ed
commit
feb1ea70fb
3 changed files with 13 additions and 1 deletions
|
@ -108,7 +108,7 @@ void play_turn(game_data& gameinfo, game_state& state_of_game,
|
||||||
const int res = move_unit(&gui,map,units,teams,route.steps,
|
const int res = move_unit(&gui,map,units,teams,route.steps,
|
||||||
&recorder,&turn_data.undos());
|
&recorder,&turn_data.undos());
|
||||||
|
|
||||||
if(res == route.steps.size())
|
if(size_t(res) == route.steps.size())
|
||||||
ui->second.done_goto();
|
ui->second.done_goto();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,17 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
//older versions of SDL don't define the
|
||||||
|
//mouse wheel macros, so define them ourselves
|
||||||
|
//if necessary.
|
||||||
|
#ifndef SDL_BUTTON_WHEELUP
|
||||||
|
#define SDL_BUTTON_WHEELUP 4
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SDL_BUTTON_WHEELDOWN
|
||||||
|
#define SDL_BUTTON_WHEELDOWN 5
|
||||||
|
#endif
|
||||||
|
|
||||||
struct free_sdl_surface {
|
struct free_sdl_surface {
|
||||||
void operator()(SDL_Surface* surface) const { SDL_FreeSurface(surface); }
|
void operator()(SDL_Surface* surface) const { SDL_FreeSurface(surface); }
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "menu.hpp"
|
#include "menu.hpp"
|
||||||
|
|
||||||
#include "../font.hpp"
|
#include "../font.hpp"
|
||||||
|
#include "../sdl_utils.hpp"
|
||||||
#include "../show_dialog.hpp"
|
#include "../show_dialog.hpp"
|
||||||
#include "../video.hpp"
|
#include "../video.hpp"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue