@@ -1807,6 +1807,8 @@ SK_EnderLilies_InitPlugIn (void)
18071807}
18081808
18091809
1810+
1811+ #ifdef _M_AMD64
18101812#include < SpecialK/nvapi.h>
18111813
18121814bool __SK_ACS_IsMultiFrameCapable = false ;
@@ -2065,6 +2067,7 @@ SK_ACS_PlugInCfg (void)
20652067 ImGui::PushStyleColor (ImGuiCol_Text, ImColor::HSV (0 .075f , 0 .8f , 0 .9f ).Value );
20662068 ImGui::BulletText (" Using game-defined framerate limit: " );
20672069 ImGui::SameLine ( );
2070+ ImGui::SetCursorPosY (y_pos);
20682071 ImGui::TextColored (ImColor (1 .f , 1 .f , 0 .f ).Value , " %3.0f fps" , __target_fps);
20692072 ImGui::PopStyleColor ( );
20702073 ImGui::EndGroup ( );
@@ -2080,10 +2083,12 @@ SK_ACS_PlugInCfg (void)
20802083
20812084 return true ;
20822085}
2086+ #endif
20832087
20842088void
20852089SK_ACS_InitPlugin (void )
20862090{
2091+ #ifdef _M_AMD64
20872092 static HANDLE hInitThread =
20882093 SK_Thread_CreateEx ([](LPVOID )->DWORD
20892094 {
@@ -2198,7 +2203,6 @@ SK_ACS_InitPlugin (void)
21982203 config.system .silent_crash = true ;
21992204 config.utility .save_async ();
22002205
2201- #ifdef _M_AMD64
22022206 // Self-disable cutscene frame generation if it causes a crash, and then
22032207 // ignore the crash...
22042208 AddVectoredExceptionHandler (1 , [](_EXCEPTION_POINTERS *ExceptionInfo)->LONG
@@ -2248,13 +2252,15 @@ SK_ACS_InitPlugin (void)
22482252 ( continuable ? EXCEPTION_CONTINUE_EXECUTION
22492253 : EXCEPTION_CONTINUE_SEARCH );
22502254 });
2251- #endif
22522255
22532256 unlimited = true ;
22542257
22552258 // The pointer base addr is stored in the limit_load_addr instruction
22562259 plugin_mgr->begin_frame_fns .insert ([](void )
22572260 {
2261+ float game_limit =
2262+ *framerate_limit;
2263+
22582264 if (__SK_ACS_UncapFramerate)
22592265 {
22602266 SK_RunOnce (
@@ -2273,9 +2279,9 @@ SK_ACS_InitPlugin (void)
22732279 if (__SK_ACS_AlwaysUseFrameGen)
22742280 {
22752281 // Replace Ubisoft's poor excuse for a framerate limiter in FMVs with SK's.
2276- if (ReadULongAcquire (&FrameGenDisabledForFMV)) __target_fps = 30 .0f ;
2277- else if ((! __SK_ACS_UncapFramerate) && *framerate_limit > 0 .0f ) __target_fps = *framerate_limit ;
2278- else __target_fps = config.render .framerate .target_fps ;
2282+ if (ReadULongAcquire (&FrameGenDisabledForFMV)) __target_fps = 30 .0f ;
2283+ else if ((! __SK_ACS_UncapFramerate) && game_limit > 0 .0f ) __target_fps = game_limit ;
2284+ else __target_fps = config.render .framerate .target_fps ;
22792285 }
22802286
22812287 else
@@ -2286,10 +2292,10 @@ SK_ACS_InitPlugin (void)
22862292 __target_fps = 30 .0f ;
22872293 }
22882294
2289- else if ((! __SK_ACS_UncapFramerate) && *framerate_limit > 0 .0f &&
2290- *framerate_limit < 500 .0f )
2295+ else if ((! __SK_ACS_UncapFramerate) && game_limit > 0 .0f &&
2296+ game_limit < 500 .0f )
22912297 {
2292- __target_fps = *framerate_limit ;
2298+ __target_fps = game_limit ;
22932299 }
22942300
22952301 else
@@ -2316,7 +2322,7 @@ SK_ACS_InitPlugin (void)
23162322 else if (ReadULongAcquire (&FrameGenDisabledForFMV) != 0 || (pFrameGenEnabled != nullptr && *pFrameGenEnabled == false ))
23172323 {
23182324 // Video is done playing, game has unlimited framerate again.
2319- if (*framerate_limit != 30 .0f )
2325+ if (game_limit != 30 .0f )
23202326 {
23212327 SK_ACS_ApplyFrameGenOverride (__SK_ACS_AlwaysUseFrameGen);
23222328 WriteULongRelease (&FrameGenDisabledForFMV, FALSE );
@@ -2393,4 +2399,5 @@ SK_ACS_InitPlugin (void)
23932399
23942400 return 0 ;
23952401 });
2402+ #endif
23962403}
0 commit comments