2015-03-03 10:14:49 +00:00
|
|
|
#include "../tomoko.hpp"
|
2015-06-15 22:26:47 +00:00
|
|
|
ConfigurationManager* config = nullptr;
|
2015-03-03 10:14:49 +00:00
|
|
|
|
|
|
|
ConfigurationManager::ConfigurationManager() {
|
2015-06-15 22:26:47 +00:00
|
|
|
config = this;
|
2015-03-03 10:14:49 +00:00
|
|
|
|
2015-04-13 11:16:33 +00:00
|
|
|
userInterface.append(userInterface.showStatusBar, "ShowStatusBar");
|
|
|
|
append(userInterface, "UserInterface");
|
|
|
|
|
2015-04-21 11:51:57 +00:00
|
|
|
library.append(library.location, "Location");
|
|
|
|
append(library, "Library");
|
|
|
|
|
2015-03-03 10:14:49 +00:00
|
|
|
video.append(video.driver, "Driver");
|
|
|
|
video.append(video.synchronize, "Synchronize");
|
|
|
|
video.append(video.scale, "Scale");
|
|
|
|
video.append(video.aspectCorrection, "AspectCorrection");
|
Update to v094r13 release.
byuu says:
This version polishes up the input dialogue (reset, erase, disable
button when item not focused, split device ID from mapping name), adds
color emulation toggle, and add dummy menu items for remaining features
(to be filled in later.)
Also, it now compiles cleanly on Windows with GTK.
I didn't test with TDM-GCC-32, because for god knows what reason, the
32-bit version ships with headers from Windows 95 OSR2 only. So I built
with TDM-GCC-64 with arch=x86.
And uh, apparently, moving or resizing a window causes a Visual C++
runtime exception in the GTK+ DLLs. This doesn't happen with trance or
renshuu built with TDM-GCC-32. So, yeah, like I said, don't use -m32.
2015-03-07 10:21:47 +00:00
|
|
|
video.append(video.filter, "Filter");
|
|
|
|
video.append(video.colorEmulation, "ColorEmulation");
|
2015-06-15 22:26:47 +00:00
|
|
|
video.append(video.saturation, "Saturation");
|
|
|
|
video.append(video.gamma, "Gamma");
|
|
|
|
video.append(video.luminance, "Luminance");
|
2015-04-21 11:58:59 +00:00
|
|
|
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");
|
2015-03-03 10:14:49 +00:00
|
|
|
append(video, "Video");
|
|
|
|
|
|
|
|
audio.append(audio.driver, "Driver");
|
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-25 12:23:49 +00:00
|
|
|
audio.append(audio.device, "Device");
|
2015-03-03 10:14:49 +00:00
|
|
|
audio.append(audio.synchronize, "Synchronize");
|
|
|
|
audio.append(audio.mute, "Mute");
|
2015-06-15 22:26:47 +00:00
|
|
|
audio.append(audio.volume, "Volume");
|
|
|
|
audio.append(audio.frequency, "Frequency");
|
|
|
|
audio.append(audio.latency, "Latency");
|
|
|
|
audio.append(audio.resampler, "Resampler");
|
2015-03-03 10:14:49 +00:00
|
|
|
append(audio, "Audio");
|
|
|
|
|
|
|
|
input.append(input.driver, "Driver");
|
|
|
|
append(input, "Input");
|
|
|
|
|
2015-06-15 22:26:47 +00:00
|
|
|
timing.append(timing.video, "Video");
|
|
|
|
timing.append(timing.audio, "Audio");
|
|
|
|
append(timing, "Timing");
|
|
|
|
|
2015-07-02 10:22:24 +00:00
|
|
|
load(locate({configpath(), "tomoko/"}, "settings.bml"));
|
2015-04-21 11:51:57 +00:00
|
|
|
if(!library.location) library.location = {userpath(), "Emulation/"};
|
2015-06-20 05:44:05 +00:00
|
|
|
if(!video.driver) video.driver = ruby::Video::safestDriver();
|
|
|
|
if(!audio.driver) audio.driver = ruby::Audio::safestDriver();
|
|
|
|
if(!input.driver) input.driver = ruby::Input::safestDriver();
|
2015-07-02 10:22:24 +00:00
|
|
|
save(locate({configpath(), "tomoko/"}, "settings.bml"));
|
2015-03-03 10:14:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
auto ConfigurationManager::quit() -> void {
|
2015-07-02 10:22:24 +00:00
|
|
|
save(locate({configpath(), "tomoko/"}, "settings.bml"));
|
2015-03-03 10:14:49 +00:00
|
|
|
}
|