mirror of https://github.com/snes9xgit/snes9x.git
Qt: Fix issues with input rate and vrr.
This commit is contained in:
parent
b8d0b8ec9e
commit
953de52465
|
@ -387,7 +387,7 @@ bool EmuApplication::isBound(EmuBinding b)
|
|||
|
||||
void EmuApplication::updateSettings()
|
||||
{
|
||||
if (config->adjust_input_rate_automatically)
|
||||
if (config->adjust_input_rate_automatically && !config->vrr_enabled)
|
||||
{
|
||||
constexpr double ir_ratio = 60.098813 / 32040.0;
|
||||
|
||||
|
@ -399,6 +399,12 @@ void EmuApplication::updateSettings()
|
|||
config->input_rate /= 3;
|
||||
else if (refresh > 239 && refresh < 241)
|
||||
config->input_rate /= 4;
|
||||
else
|
||||
{
|
||||
// We're not even close to a multiple of 60hz, so we're stuttering
|
||||
// anyway. Use the true hardware speed.
|
||||
config->input_rate = 32040.0;
|
||||
}
|
||||
}
|
||||
|
||||
emu_thread->runOnThread([&] {
|
||||
|
|
|
@ -567,9 +567,12 @@ bool EmuMainWindow::event(QEvent *event)
|
|||
void EmuMainWindow::toggleFullscreen()
|
||||
{
|
||||
if (isFullScreen())
|
||||
{
|
||||
if (app->config->adjust_for_vrr)
|
||||
{
|
||||
app->config->setVRRConfig(false);
|
||||
app->updateSettings();
|
||||
}
|
||||
setBypassCompositor(false);
|
||||
showNormal();
|
||||
menuBar()->setVisible(true);
|
||||
|
|
Loading…
Reference in New Issue