This commit is contained in:
bsnesFan 2025-07-13 17:57:10 -04:00 committed by GitHub
commit c6e236f7af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 57 additions and 7 deletions

View File

@ -25,7 +25,7 @@ auto EnhancementSettings::create() -> void {
if(settings.emulator.runAhead.frames == 4) runAhead4.setChecked();
runAheadSpacer.setColor({192, 192, 192});
overclockingLabel.setText("Overclocking").setFont(Font().setBold());
overclockingLabel.setText("Overclocking (this will break games, cause bugs and reduce performance!)").setFont(Font().setBold());
overclockingLayout.setSize({3, 3});
overclockingLayout.column(0).setAlignment(1.0);
overclockingLayout.column(1).setAlignment(0.5);
@ -124,7 +124,6 @@ auto EnhancementSettings::create() -> void {
).onToggle([&] {
settings.emulator.hack.coprocessor.preferHLE = coprocessorPreferHLEOption.checked();
});
coprocessorSpacer.setColor({192, 192, 192});
gameLabel.setText("Game Enhancements").setFont(Font().setBold());
hotfixes.setText("Hotfixes").setToolTip({
@ -133,6 +132,54 @@ auto EnhancementSettings::create() -> void {
}).setChecked(settings.emulator.hack.hotfixes).onToggle([&] {
settings.emulator.hack.hotfixes = hotfixes.checked();
});
hotfixesSpacer.setColor({192, 192, 192});
note.setText("Note: some settings do not take effect until after reloading games.");
ppuModeLabel.setText("Mode Presets:").setFont(Font().setBold());
ppuModeRequirements.setText(
"Accuracy Mode: Maximum hardware accuracy, but PPUs timings aren't 100% correct yet.\n"
"Compatibility Mode: Most compatible way to play games paired with good performance. [Recommended]"
);
accuracyMode.setText("Accuracy Mode").onActivate([&] {
runAhead0.setChecked(); settings.emulator.runAhead.frames = 0;
cpuClock.setPosition(0).doChange();
sa1Clock.setPosition(0).doChange();
sfxClock.setPosition(0).doChange();
fastPPU.setChecked(false).doToggle();
fastDSP.setChecked(false).doToggle();
cubicInterpolation.setChecked(false).doToggle();
coprocessorDelayedSyncOption.setChecked(false).doToggle();
coprocessorPreferHLEOption.setChecked(false).doToggle();
hotfixes.setChecked(false).doToggle();
if(!emulator->loaded()) return;
MessageDialog().setAlignment(settingsWindow).setTitle("Success").setText({
"Accuracy Mode applied.\n"
"Reload the game in order for all changes to take effect."
}).information();
});
compatibilityMode.setText("Compatibility Mode").onActivate([&] {
runAhead0.setChecked(); settings.emulator.runAhead.frames = 0;
cpuClock.setPosition(0).doChange();
sa1Clock.setPosition(0).doChange();
sfxClock.setPosition(0).doChange();
fastPPU.setChecked(true).doToggle();
deinterlace.setChecked(true).doToggle();
noSpriteLimit.setChecked(false).doToggle();
mode7Scale.item(0).setSelected(); emulator->configure("Hacks/PPU/Mode7/Scale", settings.emulator.hack.ppu.mode7.scale = 1);
mode7Perspective.setChecked(true).doToggle();
mode7Supersample.setChecked(false).doToggle();
mode7Mosaic.setChecked(true).doToggle();
fastDSP.setChecked(false).doToggle();
cubicInterpolation.setChecked(false).doToggle();
coprocessorDelayedSyncOption.setChecked(false).doToggle();
coprocessorPreferHLEOption.setChecked(false).doToggle();
hotfixes.setChecked(true).doToggle();
if(!emulator->loaded()) return;
MessageDialog().setAlignment(settingsWindow).setTitle("Success").setText({
"Compatibility Mode applied.\n"
"Reload the game in order for all changes to take effect."
}).information();
});
}

View File

@ -382,13 +382,16 @@ public:
HorizontalLayout coprocessorLayout{this, Size{~0, 0}};
CheckLabel coprocessorDelayedSyncOption{&coprocessorLayout, Size{0, 0}};
CheckLabel coprocessorPreferHLEOption{&coprocessorLayout, Size{0, 0}};
Canvas coprocessorSpacer{this, Size{~0, 1}};
//
Label gameLabel{this, Size{~0, 0}, 2};
CheckLabel hotfixes{this, Size{0, 0}};
CheckLabel hotfixes{this, Size{0, 0}};
Canvas hotfixesSpacer{this, Size{~0, 1}};
//
Widget spacer{this, Size{~0, ~0}};
Label note{this, Size{~0, 0}};
Label ppuModeLabel{this, Size{~0, 0}, 0};
Label ppuModeRequirements{this, Size{~0, 0}};
HorizontalLayout modeLayout{this, Size{~0, 0}};
Button accuracyMode{&modeLayout, Size{0, 0}};
Button compatibilityMode{&modeLayout, Size{0, 0}};
};
struct CompatibilitySettings : VerticalLayout {