mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-12-29 15:23:02 +05:00
fix timers return value (hopefully never affected anything)
This commit is contained in:
parent
f2bfe03d10
commit
3d730fd42c
3 changed files with 15 additions and 15 deletions
|
@ -288,18 +288,18 @@ char* GetMyDocumentsPath()
|
|||
}
|
||||
|
||||
static LARGE_INTEGER FrameTime;
|
||||
DWORD GetTimeSinceLastFrame()
|
||||
int32_t GetTimeSinceLastFrame()
|
||||
{
|
||||
LARGE_INTEGER curTime;
|
||||
QueryPerformanceCounter(&curTime);
|
||||
return curTime.QuadPart - FrameTime.QuadPart;
|
||||
return int32_t(curTime.QuadPart - FrameTime.QuadPart);
|
||||
}
|
||||
|
||||
static void (*RsEventHandler)(int, void*);
|
||||
void NewFrameRender(int nEvent, void* pParam)
|
||||
static int (*RsEventHandler)(int, void*);
|
||||
int NewFrameRender(int nEvent, void* pParam)
|
||||
{
|
||||
QueryPerformanceCounter(&FrameTime);
|
||||
RsEventHandler(nEvent, pParam);
|
||||
return RsEventHandler(nEvent, pParam);
|
||||
}
|
||||
|
||||
static signed int& LastTimeFireTruckCreated = **(int**)0x41D2E5;
|
||||
|
|
|
@ -769,18 +769,18 @@ char* GetMyDocumentsPath()
|
|||
}
|
||||
|
||||
static LARGE_INTEGER FrameTime;
|
||||
DWORD GetTimeSinceLastFrame()
|
||||
int32_t GetTimeSinceLastFrame()
|
||||
{
|
||||
LARGE_INTEGER curTime;
|
||||
QueryPerformanceCounter(&curTime);
|
||||
return curTime.QuadPart - FrameTime.QuadPart;
|
||||
return int32_t(curTime.QuadPart - FrameTime.QuadPart);
|
||||
}
|
||||
|
||||
static void (*RsEventHandler)(int, void*);
|
||||
void NewFrameRender(int nEvent, void* pParam)
|
||||
static int (*RsEventHandler)(int, void*);
|
||||
int NewFrameRender(int nEvent, void* pParam)
|
||||
{
|
||||
QueryPerformanceCounter(&FrameTime);
|
||||
RsEventHandler(nEvent, pParam);
|
||||
return RsEventHandler(nEvent, pParam);
|
||||
}
|
||||
|
||||
#include <ctime>
|
||||
|
|
|
@ -159,18 +159,18 @@ char* GetMyDocumentsPath()
|
|||
}
|
||||
|
||||
static LARGE_INTEGER FrameTime;
|
||||
DWORD GetTimeSinceLastFrame()
|
||||
int32_t GetTimeSinceLastFrame()
|
||||
{
|
||||
LARGE_INTEGER curTime;
|
||||
QueryPerformanceCounter(&curTime);
|
||||
return curTime.QuadPart - FrameTime.QuadPart;
|
||||
return int32_t(curTime.QuadPart - FrameTime.QuadPart);
|
||||
}
|
||||
|
||||
static void (*RsEventHandler)(int, void*);
|
||||
void NewFrameRender(int nEvent, void* pParam)
|
||||
static int (*RsEventHandler)(int, void*);
|
||||
int NewFrameRender(int nEvent, void* pParam)
|
||||
{
|
||||
QueryPerformanceCounter(&FrameTime);
|
||||
RsEventHandler(nEvent, pParam);
|
||||
return RsEventHandler(nEvent, pParam);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue