Browse Source

game_launch: remove SDL for simplicity

pull/2/head
Alibek Omarov 6 years ago
parent
commit
2b085cb69e
  1. 9
      game_launch/game.cpp
  2. 16
      game_launch/wscript

9
game_launch/game.cpp

@ -15,11 +15,6 @@ GNU General Public License for more details. @@ -15,11 +15,6 @@ GNU General Public License for more details.
#include "port.h"
#ifdef XASH_SDL
#include <SDL_main.h>
#include <SDL_messagebox.h>
#endif
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@ -69,9 +64,7 @@ static void Xash_Error( const char *szFmt, ... ) @@ -69,9 +64,7 @@ static void Xash_Error( const char *szFmt, ... )
vsnprintf( buffer, sizeof(buffer), szFmt, args );
va_end( args );
#ifdef XASH_SDL
SDL_ShowSimpleMessageBox( SDL_MESSAGEBOX_ERROR, "Xash Error", buffer, NULL );
#elif defined( _WIN32 )
#if defined( _WIN32 )
MessageBoxA( NULL, buffer, "Xash Error", MB_OK );
#else
fprintf( stderr, "Xash Error: %s\n", buffer );

16
game_launch/wscript

@ -17,19 +17,7 @@ def configure(conf): @@ -17,19 +17,7 @@ def configure(conf):
# check for dedicated server build
if not conf.env.DEDICATED:
if conf.env.DEST_OS != 'win32': # We need SDL2 for showing messagebox in case launcher has failed
# TODO: add way to specify SDL2 path, move to separate function
try:
conf.check_cfg(
path='sdl2-config',
args='--cflags --libs',
package='',
msg='Checking for SDL2',
uselib_store='SDL2')
except conf.errors.ConfigurationError:
conf.fatal('SDL2 not availiable! If you want to build dedicated server, specify --dedicated')
conf.env.append_unique('DEFINES', 'XASH_SDL')
else:
if conf.env.DEST_OS == 'win32':
conf.check(lib='USER32')
conf.check(lib='SHELL32')
@ -49,8 +37,6 @@ def build(bld): @@ -49,8 +37,6 @@ def build(bld):
if bld.env.DEST_OS != 'win32':
libs += [ 'DL' ]
if not bld.env.DEDICATED:
libs += [ 'SDL2' ]
else:
# compile resource on Windows
bld.load('winres')

Loading…
Cancel
Save