Files
bsnes/target-tomoko/configuration/configuration.cpp
Tim Allen 7bf4cff946 Update to v094r22 release.
byuu says:

I fixed the hiro layout enable bug, so when you go to assign joypad
input, the window disables itself so your input doesn't mess with the
controls.

I added "reset" to the hotkeys, in case you feel like clearing all of
them at once.

I added device selection support and the ability to disable audio
synchronization (run > 60fps) to the ruby/OSS driver. This is exposed in
tomoko's configuration file.

I added checks to stringify so that assigning null char* strings to
nall::string won't cause crashes anymore (technically the crash was in
strlen(), which doesn't check for null strings, but whatever ... I'll do
the check myself.)

I hooked up BrowserDialog::folderSelect() to loading slotted media for
now. Tested it by loading a Game Boy game successfully through the Super
Game Boy. Definitely want to write a custom window for this though, that
looks more like the library dialog.

Remaining issues:
- finish slotted cart loader (SGB, BSX, ST)
- add DIP switch selection window (NSS) [I may end up punting this one
  to v096]
- add more configuration panels (video, audio, timing)
2015-05-30 21:40:07 +10:00

46 lines
1.6 KiB
C++

#include "../tomoko.hpp"
ConfigurationManager* configurationManager = nullptr;
auto config() -> ConfigurationManager& { return *configurationManager; }
ConfigurationManager::ConfigurationManager() {
configurationManager = this;
userInterface.append(userInterface.showStatusBar, "ShowStatusBar");
append(userInterface, "UserInterface");
library.append(library.location, "Location");
append(library, "Library");
video.append(video.driver, "Driver");
video.append(video.synchronize, "Synchronize");
video.append(video.scale, "Scale");
video.append(video.aspectCorrection, "AspectCorrection");
video.append(video.filter, "Filter");
video.append(video.colorEmulation, "ColorEmulation");
video.overscan.append(video.overscan.mask, "Mask");
video.overscan.append(video.overscan.horizontal, "Horizontal");
video.overscan.append(video.overscan.vertical, "Vertical");
video.append(video.overscan, "Overscan");
append(video, "Video");
audio.append(audio.driver, "Driver");
audio.append(audio.device, "Device");
audio.append(audio.synchronize, "Synchronize");
audio.append(audio.mute, "Mute");
append(audio, "Audio");
input.append(input.driver, "Driver");
append(input, "Input");
load({configpath(), "tomoko/settings.bml"});
if(!library.location) library.location = {userpath(), "Emulation/"};
if(!video.driver) video.driver = ruby::video.safestDriver();
if(!audio.driver) audio.driver = ruby::audio.safestDriver();
if(!input.driver) input.driver = ruby::input.safestDriver();
save({configpath(), "tomoko/settings.bml"});
}
auto ConfigurationManager::quit() -> void {
save({configpath(), "tomoko/settings.bml"});
}