From 90d875642f96361ab514bdbd731eb7eb3a91976e Mon Sep 17 00:00:00 2001 From: lybxlpsv Date: Sun, 1 Sep 2019 22:45:30 +0700 Subject: [PATCH] render: add framerate dllexports for other plugins to access. --- source-code/source/plugins/Render/dllmain.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source-code/source/plugins/Render/dllmain.cpp b/source-code/source/plugins/Render/dllmain.cpp index 85802d5..80560b5 100644 --- a/source-code/source/plugins/Render/dllmain.cpp +++ b/source-code/source/plugins/Render/dllmain.cpp @@ -171,6 +171,17 @@ __int64 __fastcall hookedEngineUpdateLight(__int64 a1) return result; } +extern "C" __declspec(dllexport) int getFramerate(void) +{ + return nFpsLimit; +} + +extern "C" __declspec(dllexport) void setFramerate(int framerate) +{ + nFpsLimit = framerate; + expectedFrameDuration = nanoseconds(1000000000 / nFpsLimit); + return; +} BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call,