Print version into to log
This commit is contained in:
parent
c553aae0c0
commit
5d19dcc5a6
|
@ -42,7 +42,7 @@ void MainContext::FF13_2_CreateSetFrameRateCodeBlock()
|
|||
|
||||
ChangeMemoryProtectionToReadWriteExecute(FF13_2_SET_FRAME_RATE_INJECTED_CODE, blockSize);
|
||||
|
||||
float frameRateConfigValue = context.config.GetFFXIIIIngameFrameRateLimit();
|
||||
float frameRateConfigValue = (float)context.config.GetFFXIIIIngameFrameRateLimit();
|
||||
if (AreAlmostTheSame(frameRateConfigValue, -1.0F) || frameRateConfigValue > FF13_2_MAX_FRAME_CAP) {
|
||||
ff13_2_targetFrameRate = FF13_2_MAX_FRAME_CAP;
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ void MainContext::FF13_2_RemoveContinuousControllerScan() {
|
|||
}
|
||||
|
||||
void MainContext::FF13_2_AddHookIngameFrameRateLimitSetter() {
|
||||
if (context.AreAlmostTheSame(context.config.GetFFXIIIIngameFrameRateLimit(), 0.0F)) {
|
||||
if (context.AreAlmostTheSame((float)context.config.GetFFXIIIIngameFrameRateLimit(), 0.0F)) {
|
||||
PrintLog("Frame rate should not be changed (config = 0)");
|
||||
return;
|
||||
}
|
||||
|
@ -302,6 +302,10 @@ void MainContext::ChangeMemoryProtectionToReadWriteExecute(void* address, const
|
|||
VirtualProtect(address, size, PAGE_EXECUTE_READWRITE, &oldProtection);
|
||||
}
|
||||
|
||||
void MainContext::PrintVersionInfo() {
|
||||
PrintLog("FF13Fix 1.3 https://github.com/rebtd7/FF13Fix");
|
||||
}
|
||||
|
||||
bool MainContext::AreAlmostTheSame(float a, float b) {
|
||||
return fabs(a - b) < 0.01f;
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
#pragma once
|
||||
|
||||
bool CheckFix(DWORD* flags);
|
||||
#pragma once
|
||||
|
||||
bool CheckFix(DWORD* flags);
|
||||
|
|
|
@ -41,6 +41,7 @@ Config::Config()
|
|||
MainContext::MainContext() : oldWndProc(nullptr)
|
||||
{
|
||||
LogFile("FF13Fix.log");
|
||||
PrintVersionInfo();
|
||||
|
||||
if (config.GetAutoFix()) EnableAutoFix();
|
||||
|
||||
|
|
|
@ -98,7 +98,9 @@ private:
|
|||
static LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
WNDPROC oldWndProc;
|
||||
|
||||
void ChangeMemoryProtectionToReadWriteExecute(void* address, const int size);
|
||||
void ChangeMemoryProtectionToReadWriteExecute(void* address, const int size);
|
||||
bool AreAlmostTheSame(float a, float b);
|
||||
void PrintVersionInfo();
|
||||
|
||||
void FF13_OneTimeFixes();
|
||||
void FF13_AddHookIngameFrameRateLimitSetter();
|
||||
|
@ -109,7 +111,6 @@ private:
|
|||
void FF13_2_RemoveContinuousControllerScan();
|
||||
void FF13_2_AddHookIngameFrameRateLimitSetter();
|
||||
void FF13_2_OneTimeFixes();
|
||||
bool AreAlmostTheSame(float a, float b);
|
||||
};
|
||||
|
||||
extern MainContext context;
|
Loading…
Reference in New Issue