From 13f8a02cdf178b3b6eaf4c3ef607e24f50af4183 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Fri, 2 Jun 2023 06:16:40 +0300 Subject: [PATCH] wscript: better Sailfish/AuroraOS macros --- game_launch/game.cpp | 8 ++++---- wscript | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/game_launch/game.cpp b/game_launch/game.cpp index b29dd600..42d00af2 100644 --- a/game_launch/game.cpp +++ b/game_launch/game.cpp @@ -153,18 +153,18 @@ _inline int Sys_Start( void ) pfnChangeGame changeGame = NULL; const char *game = getenv( E_GAME ); -#ifdef XASH_SAILFISH +#if XASH_SAILFISH const char *home = getenv( "HOME" ); char buf[1024]; snprintf( buf, sizeof( buf ), "%s/xash", home ); setenv( "XASH3D_BASEDIR", buf, true ); -#if XASH_SAILFISH == aurora +#if XASH_AURORAOS setenv( "XASH3D_RODIR", "/usr/share/su.xash.Engine/rodir", true ); #else setenv( "XASH3D_RODIR", "/usr/share/harbour-xash3d-fwgs/rodir", true ); -#endif -#endif // SAILFISH +#endif // XASH_AURORAOS +#endif // XASH_SAILFISH if( !game ) game = XASH_GAMEDIR; diff --git a/wscript b/wscript index 8dcc0a73..6dd5e6ec 100644 --- a/wscript +++ b/wscript @@ -263,7 +263,9 @@ def configure(conf): linkflags.append('-lc') elif conf.env.SAILFISH != None: # TODO: enable XASH_MOBILE_PLATFORM - conf.env.append_unique('DEFINES', 'XASH_SAILFISH=%s' % conf.env.SAILFISH) + conf.define('XASH_SAILFISH', 1) + if conf.env.SAILFISH == "aurora": + conf.define('XASH_AURORAOS', 1) # Do not warn us about bug in SDL_Audio headers conf.env.append_unique('CFLAGS', ['-Wno-attributes'])