@@ -85,11 +85,12 @@ float SK_Unity_LatencyDelayPercent =0.025f;
8585
8686bool SK_Unity_FullIl2cppEngineTime = true ; // Il2cpp may strip out setter functions from UnityEngine.Time
8787
88- bool SK_Unity_HookMonoInit (void );
89- void SK_Unity_SetInputPollingFreq (float PollingHz);
90- bool SK_Unity_SetupInputHooks (void );
91- void SK_Unity_UpdateGlyphOverride (void );
92- void SK_Unity_SetFixedDeltaTime (float fixed_delta_time);
88+ bool SK_Unity_HookMonoInit (void );
89+ void SK_Unity_SetInputPollingFreq (float PollingHz);
90+ bool SK_Unity_SetupInputHooks (void );
91+ void SK_Unity_UpdateGlyphOverride (void );
92+ void SK_Unity_SetFixedDeltaTime (float fixed_delta_time);
93+ void SK_Unity_InitFixedDeltaTimeOverride (void );
9394
9495bool
9596SK_Unity_PlugInCfg (void )
@@ -102,7 +103,7 @@ SK_Unity_PlugInCfg (void)
102103 if (! (SK_ImGui_HasPlayStationController () || SK_XInput_PollController (0 )))
103104 show_controller_cfg = false ;
104105
105- SK_RunOnce (SK_Unity_SetFixedDeltaTime ( 0 . 0f ));
106+ SK_RunOnce (SK_Unity_InitFixedDeltaTimeOverride ( ));
106107
107108 const bool has_fixed_tick = SK_Unity_OriginalFixedDeltaTime != 0 .0f ;
108109 const bool has_game_pacing = game_pace.isSupported ();
@@ -121,7 +122,7 @@ SK_Unity_PlugInCfg (void)
121122
122123 if (SK_Unity_Cfg.time_fixed_delta_time == 0 .0f && SK_Unity_OriginalFixedDeltaTime != 0 .0f )
123124 { SK_Unity_Cfg.time_fixed_delta_time = SK_Unity_OriginalFixedDeltaTime; }
124-
125+
125126 float delta_hz =
126127 (1 .0f / SK_Unity_Cfg.time_fixed_delta_time );
127128
@@ -1024,7 +1025,7 @@ void
10241025__stdcall
10251026SK_Unity_EndFrame (void )
10261027{
1027- static float last_fps = 0 ;
1028+ static float last_fps = 0 . 0f ;
10281029
10291030 bool forced_update =
10301031 (SK_Unity_Cfg.fixed_delta_auto_sync ) && last_fps != __target_fps_now && __target_fps_now > 0 .0f ;
@@ -1042,7 +1043,7 @@ SK_Unity_EndFrame (void)
10421043 dwLastForced = 0 ;
10431044 if (dwLastForced < SK ::ControlPanel::current_time - 2500UL || forced_update)
10441045 { dwLastForced = SK ::ControlPanel::current_time;
1045- SK_RunOnce (SK_Unity_SetFixedDeltaTime ( 0 . 0f ));
1046+ SK_RunOnce (SK_Unity_InitFixedDeltaTimeOverride ( ));
10461047
10471048 if (forced_update)
10481049 {
@@ -2375,6 +2376,17 @@ SK_Unity_SetFixedDeltaTime (float fixed_delta_time)
23752376 }
23762377}
23772378
2379+ void
2380+ SK_Unity_InitFixedDeltaTimeOverride (void )
2381+ {
2382+ SK_RunOnce (
2383+ SK_Unity_SetFixedDeltaTime (0 .0f );
2384+
2385+ if ( SK_Unity_Cfg.time_fixed_delta_time != 0 .0f )
2386+ SK_Unity_SetFixedDeltaTime (SK_Unity_Cfg.time_fixed_delta_time );
2387+ );
2388+ }
2389+
23782390using InControl_InputDevice_OnAttached_pfn = void (*)(MonoObject*);
23792391using InControl_NativeInputDevice_Vibrate_pfn = void (*)(MonoObject*, float leftSpeed, float rightSpeed);
23802392using InControl_NativeInputDevice_Update_pfn = void (*)(MonoObject*, ULONG updateTick, float deltaTime);
0 commit comments