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
+32 -2
View File
@@ -21,6 +21,14 @@
#include "dusk/main.h"
namespace {
constexpr int kInternalResolutionScaleMax = 12;
} // namespace
namespace aurora::gx {
extern bool enableLodBias;
}
namespace dusk {
void ImGuiMenuGame::ToggleFullscreen() {
getSettings().video.enableFullscreen.setValue(!getSettings().video.enableFullscreen);
@@ -58,14 +66,34 @@ namespace dusk {
getSettings().video.lockAspectRatio.setValue(lockAspect);
if (lockAspect) {
VILockAspectRatio(defaultAspectRatioW, defaultAspectRatioH);
AuroraSetViewportPolicy(AURORA_VIEWPORT_FIT);
} else {
VIUnlockAspectRatio();
AuroraSetViewportPolicy(AURORA_VIEWPORT_STRETCH);
}
config::Save();
}
u32 internalResolutionWidth = 0;
u32 internalResolutionHeight = 0;
AuroraGetRenderSize(&internalResolutionWidth, &internalResolutionHeight);
ImGui::TextDisabled("Current internal resolution: %ux%u", internalResolutionWidth,
internalResolutionHeight);
int scale = std::clamp(getSettings().game.internalResolutionScale.getValue(), 0,
kInternalResolutionScaleMax);
if (ImGui::SliderInt("Internal Resolution", &scale, 0, kInternalResolutionScaleMax,
scale == 0 ? "Auto" : "%dx"))
{
getSettings().game.internalResolutionScale.setValue(scale);
VISetFrameBufferScale(static_cast<float>(scale));
config::Save();
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("Auto renders at the native window resolution.\n"
"Higher values scale the game's internal framebuffer.");
}
constexpr const char* bloomModeNames[] = {"Off", "Classic", "Dusk"};
int bloomMode = static_cast<int>(getSettings().game.bloomMode.getValue());
if (ImGui::BeginCombo("Bloom", bloomModeNames[bloomMode])) {
@@ -93,6 +121,8 @@ namespace dusk {
config::ImGuiCheckbox("Enable Water Refraction", getSettings().game.enableWaterRefraction);
ImGui::Checkbox("Enable LOD Bias", &aurora::gx::enableLodBias);
ImGui::EndMenu();
}