diff --git a/engine/client/cl_game.c b/engine/client/cl_game.c index da0c3ed7..82ab3768 100644 --- a/engine/client/cl_game.c +++ b/engine/client/cl_game.c @@ -3945,7 +3945,7 @@ qboolean CL_LoadProgs( const char *name ) // a1ba: we need to check if client.dll has direct dependency on SDL2 // and if so, disable relative mouse mode -#if XASH_WIN32 +#if XASH_WIN32 && !defined(XASH_64BIT) if( ( clgame.client_dll_uses_sdl = COM_CheckLibraryDirectDependency( name, OS_LIB_PREFIX "SDL2." OS_LIB_EXT, false ) ) ) { Con_Printf( S_NOTE "%s uses SDL2 for mouse input\n", name ); diff --git a/engine/common/filesystem.c b/engine/common/filesystem.c index a444153a..fa798737 100644 --- a/engine/common/filesystem.c +++ b/engine/common/filesystem.c @@ -324,7 +324,7 @@ static void listdirectory( stringlist_t *list, const char *path, qboolean lowerc #if XASH_WIN32 char pattern[4096]; struct _finddata_t n_file; - int hFile; + intptr_t hFile; #else DIR *dir; struct dirent *entry; diff --git a/engine/platform/win32/con_win.c b/engine/platform/win32/con_win.c index 3b63c368..1605c9f8 100644 --- a/engine/platform/win32/con_win.c +++ b/engine/platform/win32/con_win.c @@ -354,7 +354,11 @@ void Wcon_CreateConsole( void ) if( host.type == HOST_DEDICATED ) { +#ifdef XASH_64BIT + s_wcd.SysInputLineWndProc = (WNDPROC)SetWindowLongPtr( s_wcd.hwndInputLine, GWLP_WNDPROC, (LONG_PTR)Wcon_InputLineProc ); +#else s_wcd.SysInputLineWndProc = (WNDPROC)SetWindowLong( s_wcd.hwndInputLine, GWL_WNDPROC, (long)Wcon_InputLineProc ); +#endif SendMessage( s_wcd.hwndInputLine, WM_SETFONT, ( WPARAM )s_wcd.hfBufferFont, 0 ); } diff --git a/engine/platform/win32/lib_win.c b/engine/platform/win32/lib_win.c index 5e7e2ac8..371d3ca3 100644 --- a/engine/platform/win32/lib_win.c +++ b/engine/platform/win32/lib_win.c @@ -20,9 +20,14 @@ GNU General Public License for more details. #ifdef XASH_64BIT #include -void *COM_LoadLibrary( const char *dllname, int build_ordinals_table ) +void *COM_LoadLibrary( const char *dllname, int build_ordinals_table, qboolean directpath ) { - return LoadLibraryA( dllname ); + dll_user_t *hInst; + + hInst = FS_FindLibrary( dllname, directpath ); + if( !hInst ) return NULL; // nothing to load + + return LoadLibraryA( hInst->fullPath ); } void COM_FreeLibrary( void *hInstance ) diff --git a/engine/server/sv_game.c b/engine/server/sv_game.c index d19b903a..8e5b6a26 100644 --- a/engine/server/sv_game.c +++ b/engine/server/sv_game.c @@ -3138,9 +3138,9 @@ void SV_AllocStringPool( void ) #endif str64.pstringarray = ptr; - str64.pstringarraystatic = ptr + str64.maxstringarray; + str64.pstringarraystatic = (byte*)ptr + str64.maxstringarray; str64.pstringbase = str64.poldstringbase = ptr; - str64.plast = ptr + 1; + str64.plast = (byte*)ptr + 1; svgame.globals->pStringBase = ptr; #else svgame.stringspool = Mem_AllocPool( "Server Strings" ); @@ -3153,9 +3153,11 @@ void SV_FreeStringPool( void ) #ifdef XASH_64BIT Con_Reportf( "SV_FreeStringPool()\n" ); +#if USE_MMAP if( str64.pstringarray != str64.staticstringarray ) munmap( str64.pstringarray, (str64.maxstringarray * 2) & ~(sysconf( _SC_PAGESIZE ) - 1) ); else +#endif Mem_Free( str64.staticstringarray ); #else Mem_FreePool( &svgame.stringspool );