Display: Remove frameskip fast-forward mode.

Fixes #13546.
This commit is contained in:
Unknown W. Brackets 2021-09-14 23:04:28 -07:00
parent bb64c176fc
commit e1d261b707
3 changed files with 3 additions and 24 deletions

View File

@ -815,8 +815,6 @@ typedef ConfigTranslator<GPUBackend, GPUBackendToString, GPUBackendFromString> G
static int FastForwardModeFromString(const std::string &s) {
if (!strcasecmp(s.c_str(), "CONTINUOUS"))
return (int)FastForwardMode::CONTINUOUS;
if (!strcasecmp(s.c_str(), "SKIP_DRAW"))
return (int)FastForwardMode::SKIP_DRAW;
if (!strcasecmp(s.c_str(), "SKIP_FLIP"))
return (int)FastForwardMode::SKIP_FLIP;
return DefaultFastForwardMode();
@ -826,8 +824,6 @@ std::string FastForwardModeToString(int v) {
switch (FastForwardMode(v)) {
case FastForwardMode::CONTINUOUS:
return "CONTINUOUS";
case FastForwardMode::SKIP_DRAW:
return "SKIP_DRAW";
case FastForwardMode::SKIP_FLIP:
return "SKIP_FLIP";
}

View File

@ -120,7 +120,6 @@ enum class AutoLoadSaveState {
enum class FastForwardMode {
CONTINUOUS = 0,
SKIP_DRAW = 1,
SKIP_FLIP = 2,
};

View File

@ -557,16 +557,6 @@ static void DoFrameTiming(bool &throttle, bool &skipFrame, float timestep) {
// Check if the frameskipping code should be enabled. If neither throttling or frameskipping is on,
// we have nothing to do here.
bool doFrameSkip = g_Config.iFrameSkip != 0;
bool fastForwardNeedsSkip = g_Config.iFastForwardMode == (int)FastForwardMode::SKIP_DRAW;
if (!throttle && fastForwardNeedsSkip) {
skipFrame = true;
if (numSkippedFrames >= 7) {
skipFrame = false;
}
return;
}
if (!throttle && !doFrameSkip)
return;
@ -591,16 +581,12 @@ static void DoFrameTiming(bool &throttle, bool &skipFrame, float timestep) {
}
// Auto-frameskip automatically if speed limit is set differently than the default.
bool forceFrameskip = fpsLimit > 60 && fastForwardNeedsSkip;
int frameSkipNum = CalculateFrameSkip();
if (g_Config.bAutoFrameSkip || forceFrameskip) {
if (g_Config.bAutoFrameSkip) {
// autoframeskip
// Argh, we are falling behind! Let's skip a frame and see if we catch up.
if (curFrameTime > nextFrameTime && doFrameSkip) {
skipFrame = true;
if (forceFrameskip) {
throttle = false;
}
}
} else if (frameSkipNum >= 1) {
// fixed frameskip
@ -741,15 +727,13 @@ void __DisplayFlip(int cyclesLate) {
bool duplicateFrames = g_Config.bRenderDuplicateFrames && g_Config.iFrameSkip == 0;
bool fastForwardNeedsSkip = g_Config.iFastForwardMode != (int)FastForwardMode::CONTINUOUS;
bool fastForwardSkipFlip = g_Config.iFastForwardMode == (int)FastForwardMode::SKIP_FLIP;
bool fastForwardSkipFlip = g_Config.iFastForwardMode != (int)FastForwardMode::CONTINUOUS;
if (g_Config.bVSync && GetGPUBackend() == GPUBackend::VULKAN) {
// Vulkan doesn't support the interval setting, so we force skipping the flip.
fastForwardSkipFlip = true;
}
// postEffectRequiresFlip is not compatible with frameskip fast-forward, see #12325.
if (g_Config.iRenderingMode != FB_NON_BUFFERED_MODE && !(fastForwardNeedsSkip && !FrameTimingThrottled())) {
if (g_Config.iRenderingMode != FB_NON_BUFFERED_MODE) {
postEffectRequiresFlip = duplicateFrames || g_Config.bShaderChainRequires60FPS;
}