2015-03-03 10:14:49 +00:00
|
|
|
#include "../tomoko.hpp"
|
|
|
|
ConfigurationManager* configurationManager = nullptr;
|
|
|
|
auto config() -> ConfigurationManager& { return *configurationManager; }
|
|
|
|
|
|
|
|
ConfigurationManager::ConfigurationManager() {
|
|
|
|
configurationManager = this;
|
|
|
|
|
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-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");
|
|
|
|
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"});
|
2015-04-21 11:51:57 +00:00
|
|
|
if(!library.location) library.location = {userpath(), "Emulation/"};
|
2015-03-03 10:14:49 +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();
|
|
|
|
save({configpath(), "tomoko/settings.bml"});
|
|
|
|
}
|
|
|
|
|
|
|
|
auto ConfigurationManager::quit() -> void {
|
|
|
|
save({configpath(), "tomoko/settings.bml"});
|
|
|
|
}
|