Finish changes for XCode SDL2 compilation to work
This commit is contained in:
parent
9204d0af45
commit
b0ecf09ee9
7 changed files with 28 additions and 11 deletions
|
@ -79,7 +79,7 @@ static char **gArgv;
|
|||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
status = wesnoth_main (gArgc, gArgv);
|
||||
#else
|
||||
status = wesnoth_main (gArgc, gArgv);
|
||||
status = SDL_main (gArgc, gArgv);
|
||||
#endif
|
||||
|
||||
/* We're done, thank you for playing */
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
|
||||
#ifdef main
|
||||
# undef main
|
||||
#endif
|
||||
|
||||
int SDL_main (int argc, char **argv);
|
||||
extern int SDL_main (int argc, char **argv);
|
||||
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
return SDL_main(argc, argv);
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -75,6 +75,8 @@
|
|||
62D24F351519995200350848 /* palette_manager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 62D24F341519995200350848 /* palette_manager.cpp */; };
|
||||
62E48250154D865E001DD4FC /* pane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 62E4824E154D865E001DD4FC /* pane.cpp */; };
|
||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
|
||||
911F2DAD1BA086A400E3102E /* window.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 911F2DAB1BA086A400E3102E /* window.cpp */; };
|
||||
911F2DB01BA086FA00E3102E /* alpha.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 911F2DAE1BA086F900E3102E /* alpha.cpp */; };
|
||||
91B6217C1B74E6D200B00E0F /* label_settings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 91B6217A1B74E6D100B00E0F /* label_settings.cpp */; };
|
||||
91B6219F1B7673D800B00E0F /* portrait.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 91B6219E1B7673D800B00E0F /* portrait.cpp */; };
|
||||
91B621A21B76A3CC00B00E0F /* build_info.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 91B621A11B76A3CC00B00E0F /* build_info.cpp */; };
|
||||
|
@ -1243,6 +1245,11 @@
|
|||
62E4824F154D865E001DD4FC /* pane.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = pane.hpp; sourceTree = "<group>"; };
|
||||
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
8D1107320486CEB800E47090 /* Wesnoth.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Wesnoth.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
911F2DAB1BA086A400E3102E /* window.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = window.cpp; sourceTree = "<group>"; };
|
||||
911F2DAC1BA086A400E3102E /* window.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = window.hpp; sourceTree = "<group>"; };
|
||||
911F2DAE1BA086F900E3102E /* alpha.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = alpha.cpp; sourceTree = "<group>"; };
|
||||
911F2DAF1BA086FA00E3102E /* alpha.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = alpha.hpp; sourceTree = "<group>"; };
|
||||
911F2DB11BA0870E00E3102E /* compat.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = compat.hpp; sourceTree = "<group>"; };
|
||||
91B6217A1B74E6D100B00E0F /* label_settings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = label_settings.cpp; sourceTree = "<group>"; };
|
||||
91B6217B1B74E6D100B00E0F /* label_settings.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = label_settings.hpp; sourceTree = "<group>"; };
|
||||
91B621801B766ED500B00E0F /* buffered_istream.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = buffered_istream.hpp; sourceTree = "<group>"; };
|
||||
|
@ -3242,6 +3249,9 @@
|
|||
91B621A61B76A7CD00B00E0F /* sdl */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
911F2DAE1BA086F900E3102E /* alpha.cpp */,
|
||||
911F2DAF1BA086FA00E3102E /* alpha.hpp */,
|
||||
911F2DB11BA0870E00E3102E /* compat.hpp */,
|
||||
EC84246F18F30DB700FC1EEF /* exception.cpp */,
|
||||
EC84247018F30DB700FC1EEF /* exception.hpp */,
|
||||
ECFB9FAB193BFB6E00146ED0 /* rect.cpp */,
|
||||
|
@ -3250,6 +3260,8 @@
|
|||
EC2F60231A04985A0018C9D6 /* savepng.h */,
|
||||
EC28C58D19423426003B0F5E /* utils.cpp */,
|
||||
EC28C58E19423426003B0F5E /* utils.hpp */,
|
||||
911F2DAB1BA086A400E3102E /* window.cpp */,
|
||||
911F2DAC1BA086A400E3102E /* window.hpp */,
|
||||
);
|
||||
path = sdl;
|
||||
sourceTree = "<group>";
|
||||
|
@ -4988,6 +5000,8 @@
|
|||
EC2F60201A0490FC0018C9D6 /* xbrz.cpp in Sources */,
|
||||
91B621A21B76A3CC00B00E0F /* build_info.cpp in Sources */,
|
||||
91B621BA1B76B2C900B00E0F /* version.cpp in Sources */,
|
||||
911F2DAD1BA086A400E3102E /* window.cpp in Sources */,
|
||||
911F2DB01BA086FA00E3102E /* alpha.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
@ -164,13 +164,11 @@ event_context::~event_context()
|
|||
event_contexts.pop_back();
|
||||
}
|
||||
|
||||
sdl_handler::sdl_handler(const bool auto_join)
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
: unicode_(1)
|
||||
#else
|
||||
: unicode_(SDL_EnableUNICODE(1))
|
||||
sdl_handler::sdl_handler(const bool auto_join) :
|
||||
#if !SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
unicode_(SDL_EnableUNICODE(1)),
|
||||
#endif
|
||||
, has_joined_(false)
|
||||
has_joined_(false)
|
||||
{
|
||||
|
||||
#if !SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
|
|
|
@ -64,7 +64,9 @@ protected:
|
|||
}
|
||||
|
||||
private:
|
||||
#if !SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
int unicode_;
|
||||
#endif
|
||||
bool has_joined_;
|
||||
};
|
||||
|
||||
|
|
|
@ -124,7 +124,9 @@ static lg::log_domain log_config("config");
|
|||
#ifndef SIGHUP
|
||||
#define SIGHUP 20
|
||||
#endif
|
||||
/** @todo FIXME: should define SIGINT here too, but to what? */
|
||||
/**
|
||||
@todo FIXME: should define SIGINT here too, but to what?
|
||||
*/
|
||||
|
||||
static sig_atomic_t config_reload = 0;
|
||||
|
||||
|
|
|
@ -883,6 +883,7 @@ static void wesnoth_terminate_handler(int) {
|
|||
#endif
|
||||
|
||||
#if defined(__native_client__) || (defined(__APPLE__) && SDL_VERSION_ATLEAST(2, 0, 0))
|
||||
extern "C" int wesnoth_main(int argc, char** argv);
|
||||
int wesnoth_main(int argc, char** argv)
|
||||
#else
|
||||
int main(int argc, char** argv)
|
||||
|
|
Loading…
Add table
Reference in a new issue