Merge pull request #590 from diamante0018/refactor/largelocal

[LargeLocal]: CanUseServerLargeLocal
This commit is contained in:
Edo 2022-11-25 13:41:53 +00:00 committed by GitHub
commit be2283e302
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -3,8 +3,6 @@
namespace Game::Engine
{
#define CanUseServerLargeLocal() (SV_GetServerThreadOwnsGame() ? Sys_IsServerThread() : Sys_IsRenderThread())
LargeLocal::LargeLocal(int sizeParam)
{
assert(sizeParam);
@ -89,4 +87,9 @@ namespace Game::Engine
return &g_largeLocalBuf[startIndex];
}
int CanUseServerLargeLocal()
{
return SV_GetServerThreadOwnsGame() ? Sys_IsServerThread() : Sys_IsRenderThread();
}
}

View File

@ -26,4 +26,6 @@ namespace Game::Engine
extern void LargeLocalEndRight(int startPos);
extern void* LargeLocalGetBuf(int startPos, int size);
extern int CanUseServerLargeLocal();
}