diff --git a/include/DLL_VERSION.H b/include/DLL_VERSION.H index 92c382b..70b4428 100644 --- a/include/DLL_VERSION.H +++ b/include/DLL_VERSION.H @@ -4,7 +4,7 @@ #define TBF_MAJOR 0 #define TBF_MINOR 4 #define TBF_BUILD 2 -#define TBF_REV 1 +#define TBF_REV 2 diff --git a/src/dllmain.cpp b/src/dllmain.cpp index fd8dcb5..fd77cbd 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -119,6 +119,14 @@ SKPlugIn_Init (HMODULE hModSpecialK) if (SKX_SetPluginName != nullptr) SKX_SetPluginName (plugin_name.c_str ()); + static SK_UpdateSoftware_pfn SK_UpdateSoftware = + TBF_ImportFunctionFromSpecialK ( "SK_UpdateSoftware", + SK_UpdateSoftware ); + + static SK_FetchVersionInfo_pfn SK_FetchVersionInfo = + TBF_ImportFunctionFromSpecialK ( "SK_FetchVersionInfo", + SK_FetchVersionInfo ); + if (TBF_Init_MinHook () == MH_OK) { extern void TBFix_ImGui_Init (void); TBFix_ImGui_Init (); @@ -135,6 +143,18 @@ SKPlugIn_Init (HMODULE hModSpecialK) CreateThread ( nullptr, 0, [](LPVOID user) -> DWORD { + if (! wcsstr (injector_dll.c_str (), L"SpecialK")) + { + if ( SK_FetchVersionInfo != nullptr && + SK_UpdateSoftware != nullptr ) + { + if (SK_FetchVersionInfo (L"TBF")) + { + SK_UpdateSoftware (L"TBF"); + } + } + } + // Wait for Denuvo to finish its thing... Sleep (15000UL); tbf::FrameRateFix::Init (); @@ -150,24 +170,6 @@ SKPlugIn_Init (HMODULE hModSpecialK) //CoUninitialize (); } - static SK_UpdateSoftware_pfn SK_UpdateSoftware = - TBF_ImportFunctionFromSpecialK ( "SK_UpdateSoftware", - SK_UpdateSoftware ); - - static SK_FetchVersionInfo_pfn SK_FetchVersionInfo = - TBF_ImportFunctionFromSpecialK ( "SK_FetchVersionInfo", - SK_FetchVersionInfo ); - - if (! wcsstr (injector_dll.c_str (), L"SpecialK")) - { - if ( SK_FetchVersionInfo != nullptr && - SK_UpdateSoftware != nullptr ) { - if (SK_FetchVersionInfo (L"TBF")) { - SK_UpdateSoftware (L"TBF"); - } - } - } - return TRUE; } diff --git a/version.ini b/version.ini index 377181f..6e10f2c 100644 Binary files a/version.ini and b/version.ini differ