From 6aa61657e03e0e50d0bc53de93a00a17d8643f07 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 28 Oct 2019 01:46:35 +0300 Subject: [PATCH] game_launch: check for Platform_Main before Host_Main --- game_launch/game.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/game_launch/game.cpp b/game_launch/game.cpp index d8bc8152..7d226372 100644 --- a/game_launch/game.cpp +++ b/game_launch/game.cpp @@ -92,7 +92,11 @@ static void Sys_LoadEngine( void ) Xash_Error("Unable to load the " XASHLIB ": %s", dlerror() ); } - if(( Xash_Main = (pfnInit)GetProcAddress( hEngine, "Host_Main" )) == NULL ) + if(( Xash_Main = (pfnInit)GetProcAddress( hEngine, "Platform_Main" )) == NULL ) + { + // silently ignore absence of platform-specific init + } + else if(( Xash_Main = (pfnInit)GetProcAddress( hEngine, "Host_Main" )) == NULL ) { Xash_Error( XASHLIB " missed 'Host_Main' export: %s", dlerror() ); }