From 3d730fd42c5eae05522420ca52dcbb0f8eebc6ab Mon Sep 17 00:00:00 2001 From: Silent Date: Mon, 6 Mar 2017 22:35:08 +0100 Subject: [PATCH] fix timers return value (hopefully never affected anything) --- SilentPatchIII/SilentPatchIII.cpp | 10 +++++----- SilentPatchSA/SilentPatchSA.cpp | 10 +++++----- SilentPatchVC/SilentPatchVC.cpp | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/SilentPatchIII/SilentPatchIII.cpp b/SilentPatchIII/SilentPatchIII.cpp index 85b0ed8..0d809c2 100644 --- a/SilentPatchIII/SilentPatchIII.cpp +++ b/SilentPatchIII/SilentPatchIII.cpp @@ -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; diff --git a/SilentPatchSA/SilentPatchSA.cpp b/SilentPatchSA/SilentPatchSA.cpp index 5257de3..15fc169 100644 --- a/SilentPatchSA/SilentPatchSA.cpp +++ b/SilentPatchSA/SilentPatchSA.cpp @@ -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 diff --git a/SilentPatchVC/SilentPatchVC.cpp b/SilentPatchVC/SilentPatchVC.cpp index 3a80f40..06919cf 100644 --- a/SilentPatchVC/SilentPatchVC.cpp +++ b/SilentPatchVC/SilentPatchVC.cpp @@ -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); }