mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-24 08:12:41 +02:00
port: very experimental uncapped framerate support
set Game.TickRateDivisor in pd.ini to 0 this still has many issues, such as combat boost not working
This commit is contained in:
1 parent
8a348ab1b5
commit
72e9e2af95
5 files changed
+14
-2
No files matched your search
+5
-1
@@ -41,12 +41,16 @@ void frametimeCalculate(void)
|
||||
|
||||
diffframe60 = (g_Vars.lostframetime60t + diffframet + CYCLES_PER_FRAME / 2) / CYCLES_PER_FRAME;
|
||||
diffframe240 = (g_Vars.lostframetime240t + diffframet + CYCLES_PER_FRAME / 2 / 4) / (CYCLES_PER_FRAME / 4);
|
||||
} while (diffframe60 < g_Vars.mininc60);
|
||||
} while (g_Vars.mininc60 && diffframe60 < g_Vars.mininc60);
|
||||
|
||||
g_Vars.lostframetime60t = g_Vars.lostframetime60t + diffframet - diffframe60 * CYCLES_PER_FRAME;
|
||||
g_Vars.lostframetime240t = g_Vars.lostframetime240t + diffframet - diffframe240 * (CYCLES_PER_FRAME / 4);
|
||||
|
||||
#ifdef PLATFORM_N64
|
||||
g_Vars.mininc60 = 1;
|
||||
#else
|
||||
g_Vars.mininc60 = g_TickRateDiv;
|
||||
#endif
|
||||
|
||||
frametimeApply(diffframe60, diffframe240, count);
|
||||
}
|
||||
|
||||
@@ -545,6 +545,7 @@ extern u32 g_HudAlignModeR;
|
||||
extern s32 g_PrevFrameFb;
|
||||
extern s32 g_BlurFb;
|
||||
extern s32 g_BlurFbCapTimer;
|
||||
extern s32 g_TickRateDiv;
|
||||
|
||||
#define PLAYER_EXTCFG() g_PlayerExtCfg[g_Vars.currentplayerstats->mpindex & 3]
|
||||
#define PLAYER_DEFAULT_FOV (PLAYER_EXTCFG().fovy)
|
||||
|
||||
@@ -28,7 +28,11 @@ void varsInit(void)
|
||||
g_Vars.lostframetime60t = 0;
|
||||
g_Vars.lostframetime240t = 0;
|
||||
g_Vars.lvupdate240rem = 2;
|
||||
#ifdef PLATFORM_N64
|
||||
g_Vars.mininc60 = 1;
|
||||
#else
|
||||
g_Vars.mininc60 = g_TickRateDiv;
|
||||
#endif
|
||||
g_Vars.roomportalrecursionlimit = 254;
|
||||
g_Vars.diffframe240f = 4;
|
||||
g_Vars.diffframe240freal = 4;
|
||||
|
||||
Reference in new issue
Block a user