Skip to content

Commit 71c1c91

Browse files
committed
Merge remote-tracking branch 'source/develop' into develop-rando
2 parents 4a3492b + 1d37473 commit 71c1c91

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/port/Engine.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ GameEngine::GameEngine() : dictionary(nullptr) {
216216

217217
context->InitGfxDebugger();
218218
context->InitFileDropMgr();
219+
context->InitCrashHandler();
219220

220221
this->context->InitAudio({ .SampleRate = 32000, .SampleLength = 512, .DesiredBuffered = 1100 });
221222

@@ -417,6 +418,7 @@ void GameEngine::Create() {
417418

418419
void GameEngine::Destroy() {
419420
GhostshipGui::Destroy();
421+
gsFast3dWindow = nullptr;
420422
Instance->context = nullptr;
421423
AudioExit();
422424
#ifdef __SWITCH__
@@ -442,16 +444,14 @@ void GameEngine::StartFrame() const {
442444
}
443445

444446
uint32_t GameEngine::GetInterpolationFPS() {
445-
if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::FAST3D_DXGI_DX11) {
446-
return CVarGetInteger(CVAR_SETTING("InterpolationFPS"), 30);
447-
}
448-
449447
if (CVarGetInteger(CVAR_SETTING("MatchRefreshRate"), 0)) {
450448
return Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate();
449+
} else if (CVarGetInteger(CVAR_VSYNC_ENABLED, 1) ||
450+
!Ship::Context::GetInstance()->GetWindow()->CanDisableVerticalSync()) {
451+
return std::min<uint32_t>(Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate(),
452+
CVarGetInteger(CVAR_SETTING("InterpolationFPS"), 30));
451453
}
452-
453-
return std::min<uint32_t>(Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate(),
454-
CVarGetInteger(CVAR_SETTING("InterpolationFPS"), 30));
454+
return CVarGetInteger(CVAR_SETTING("InterpolationFPS"), 30);
455455
}
456456

457457
// Audio

0 commit comments

Comments
 (0)