Skip to content

Commit 4279648

Browse files
authored
Add TotalPhysicalMemory to dxGetStatus (PR #2265)
1 parent 8b3244c commit 4279648

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Client/mods/deathmatch/logic/luadefs/CLuaDrawingDefs.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@
99
*
1010
*****************************************************************************/
1111

12+
1213
#include "StdInc.h"
1314
#include "CLuaDefs.h"
1415
#include "lua/CLuaFunctionParser.h"
1516

17+
#include <SharedUtil.SysInfo.h>
18+
#include <SharedUtil.SysInfo.hpp>
19+
1620
#define MIN_CLIENT_REQ_DXSETRENDERTARGET_CALL_RESTRICTIONS "1.3.0-9.04431"
1721
extern bool g_bAllowAspectRatioAdjustment;
1822

@@ -1705,6 +1709,11 @@ int CLuaDrawingDefs::DxGetStatus(lua_State* luaVM)
17051709
lua_pushstring(luaVM, "SettingHighDetailPeds");
17061710
lua_pushboolean(luaVM, dxStatus.settings.bHighDetailPeds);
17071711
lua_settable(luaVM, -3);
1712+
1713+
lua_pushstring(luaVM, "TotalPhysicalMemory");
1714+
lua_pushnumber(luaVM, static_cast<lua_Number>(SharedUtil::GetWMITotalPhysicalMemory()) / 1024.0 / 1024.0);
1715+
lua_settable(luaVM, -3);
1716+
17081717
return 1;
17091718
}
17101719
else

0 commit comments

Comments
 (0)