diff --git a/engine/common/common.h b/engine/common/common.h index 589274f4..4d8e836c 100644 --- a/engine/common/common.h +++ b/engine/common/common.h @@ -285,9 +285,6 @@ typedef enum bugcomp_e typedef struct host_parm_s { - HINSTANCE hInst; - HANDLE hMutex; - host_status_t status; // global host state game_status_t game; // game manager uint type; // running at diff --git a/engine/common/crashhandler.c b/engine/common/crashhandler.c index d4877c79..c0136028 100644 --- a/engine/common/crashhandler.c +++ b/engine/common/crashhandler.c @@ -325,7 +325,6 @@ void Sys_SetupCrashHandler( void ) { SetErrorMode( SEM_FAILCRITICALERRORS ); // no abort/retry/fail errors oldFilter = SetUnhandledExceptionFilter( Sys_Crash ); - host.hInst = GetModuleHandle( NULL ); } void Sys_RestoreCrashHandler( void ) diff --git a/engine/platform/sdl/vid_sdl.c b/engine/platform/sdl/vid_sdl.c index 7d6ebaa9..a7e6299a 100644 --- a/engine/platform/sdl/vid_sdl.c +++ b/engine/platform/sdl/vid_sdl.c @@ -654,6 +654,7 @@ static void VID_SetWindowIcon( SDL_Window *hWnd ) char iconpath[MAX_STRING]; #if XASH_WIN32 // ICO support only for Win32 const char *localIcoPath; + HINSTANCE hInst = GetModuleHandle( NULL ); if(( localIcoPath = FS_GetDiskPath( GI->iconpath, true ))) { @@ -685,7 +686,7 @@ static void VID_SetWindowIcon( SDL_Window *hWnd ) } #if XASH_WIN32 // ICO support only for Win32 - WIN_SetWindowIcon( LoadIcon( host.hInst, MAKEINTRESOURCE( 101 ))); + WIN_SetWindowIcon( LoadIcon( hInst, MAKEINTRESOURCE( 101 ))); #endif } #endif // SDL_VERSION_ATLEAST( 2, 0, 0 ) diff --git a/engine/platform/win32/con_win.c b/engine/platform/win32/con_win.c index d2851861..1b0a5711 100644 --- a/engine/platform/win32/con_win.c +++ b/engine/platform/win32/con_win.c @@ -608,10 +608,6 @@ void Wcon_DestroyConsole( void ) } FreeConsole(); - - // place it here in case Sys_Crash working properly - if( host.hMutex ) - CloseHandle( host.hMutex ); } /*