fix timers return value (hopefully never affected anything)

This commit is contained in:
Silent 2017-03-06 22:35:08 +01:00
parent f2bfe03d10
commit 3d730fd42c
3 changed files with 15 additions and 15 deletions

View file

@ -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;

View file

@ -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>

View file

@ -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);
}