mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-13 22:22:05 +00:00
Restore Doom Classic Frame Rate (35 Hz) following background slowdown change
This commit is contained in:
parent
210b294246
commit
59e5b087eb
3 changed files with 8 additions and 2 deletions
|
@ -1955,8 +1955,6 @@ void idCommonLocal::PerformGameSwitch()
|
|||
return;
|
||||
}
|
||||
|
||||
const int DOOM_CLASSIC_HZ = 35;
|
||||
|
||||
if( idealCurrentGame == DOOM_CLASSIC || idealCurrentGame == DOOM2_CLASSIC )
|
||||
{
|
||||
// Pause Doom 3 sound.
|
||||
|
|
|
@ -691,6 +691,7 @@ private:
|
|||
static const int DOOMCLASSIC_RENDERHEIGHT = 200 * 3;
|
||||
static const int DOOMCLASSIC_BYTES_PER_PIXEL = 4;
|
||||
static const int DOOMCLASSIC_IMAGE_SIZE_IN_BYTES = DOOMCLASSIC_RENDERWIDTH * DOOMCLASSIC_RENDERHEIGHT * DOOMCLASSIC_BYTES_PER_PIXEL;
|
||||
static constexpr float DOOM_CLASSIC_HZ = 35.0f;
|
||||
|
||||
idArray< byte, DOOMCLASSIC_IMAGE_SIZE_IN_BYTES > doomClassicImageData;
|
||||
#endif
|
||||
|
|
|
@ -649,6 +649,13 @@ void idCommonLocal::Frame()
|
|||
com_engineHz_denominator = 100LL * backgroundEngineHz;
|
||||
com_engineHz_latched = backgroundEngineHz;
|
||||
}
|
||||
#if defined(USE_DOOMCLASSIC)
|
||||
else if( IsPlayingDoomClassic() )
|
||||
{
|
||||
com_engineHz_denominator = 100LL * DOOM_CLASSIC_HZ;
|
||||
com_engineHz_latched = DOOM_CLASSIC_HZ;
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
// allow com_engineHz to be changed between map loads
|
||||
|
|
Loading…
Reference in a new issue