Widescreen rework & IR scaling

This commit is contained in:
Luke Street
2026-04-17 23:11:43 -06:00
parent 03b95503b9
commit 7dba5738b6
27 changed files with 129 additions and 298 deletions
+5 -13
View File
@@ -126,8 +126,6 @@ AuroraStats dusk::lastFrameAuroraStats;
float dusk::frameUsagePct = 0.0f;
const char* configPath;
AuroraWindowSize preLaunchUIWindowSize;
bool launchUILoop() {
while (dusk::IsRunning && !dusk::IsGameLaunched) {
const AuroraEvent* event = aurora_update();
@@ -136,9 +134,6 @@ bool launchUILoop() {
case AURORA_SDL_EVENT:
dusk::g_imguiConsole.HandleSDLEvent(event->sdl);
break;
case AURORA_WINDOW_RESIZED:
preLaunchUIWindowSize = event->windowSize;
break;
case AURORA_DISPLAY_SCALE_CHANGED:
dusk::ImGuiEngine_Initialize(event->windowSize.scale);
break;
@@ -202,9 +197,6 @@ void main01(void) {
OSReport("Entering Main Loop (main01)...\n");
if (preLaunchUIWindowSize.width != 0)
mDoGph_gInf_c::setWindowSize(preLaunchUIWindowSize);
constexpr float kSimStepSeconds = 1.0 / 30.0;
auto previous_time = std::chrono::steady_clock::now();
float accumulator = kSimStepSeconds;
@@ -219,9 +211,6 @@ void main01(void) {
case AURORA_SDL_EVENT:
dusk::g_imguiConsole.HandleSDLEvent(event->sdl);
break;
case AURORA_WINDOW_RESIZED:
mDoGph_gInf_c::setWindowSize(event->windowSize);
break;
case AURORA_DISPLAY_SCALE_CHANGED:
dusk::ImGuiEngine_Initialize(event->windowSize.scale);
break;
@@ -247,6 +236,8 @@ void main01(void) {
continue;
}
mDoGph_gInf_c::updateRenderSize();
if (dusk::getSettings().game.enableFrameInterpolation && !dusk::getTransientSettings().skipFrameRateLimit) {
dusk::frame_interp::notify_presentation_frame();
if (accumulator >= kSimStepSeconds) {
@@ -525,10 +516,11 @@ int game_main(int argc, char* argv[]) {
.c_str());
if (dusk::getSettings().video.lockAspectRatio) {
VILockAspectRatio(defaultAspectRatioW, defaultAspectRatioH);
AuroraSetViewportPolicy(AURORA_VIEWPORT_FIT);
} else {
VIUnlockAspectRatio();
AuroraSetViewportPolicy(AURORA_VIEWPORT_STRETCH);
}
VISetFrameBufferScale(dusk::getSettings().game.internalResolutionScale.getValue());
dusk::audio::SetMasterVolume(dusk::getSettings().audio.masterVolume / 100.0f);
dusk::audio::SetEnableReverb(dusk::getSettings().audio.enableReverb);