mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-09 13:51:45 +08:00
partially fix amd64 build on windows
Quality of this commit is questionable. I have no idea whether what I did here makes sense or not. But it compiles and runs (provided with hlsdk-xash3d amd64 build, which is another story). This omits necessary waf changes that are necessary to make a valid 64-bit build. Apparently it's not enough to just pass `-8` on Windows, you also need to hack wscript to add `x64` target to MSVC. I'll do that later when I figure out how. This change is a precursor for RTX Vulkan effort -- VK_KHR_ray_tracing_pipeline and friends are only available on 64-bit nvidia drivers (no idea about AMD, pls send GPUs onegai).
This commit is contained in:
committed by
Alibek Omarov
parent
8d50049db7
commit
1b426b67e7
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user