2015-03-03 10:14:49 +00:00
|
|
|
AdvancedSettings::AdvancedSettings(TabFrame* parent) : TabFrameItem(parent) {
|
|
|
|
setIcon(Icon::Action::Settings);
|
|
|
|
setText("Advanced");
|
|
|
|
|
|
|
|
layout.setMargin(5);
|
2015-04-21 11:51:57 +00:00
|
|
|
|
2015-03-03 10:14:49 +00:00
|
|
|
driverLabel.setText("Driver Selection").setFont(Font::sans(8, "Bold"));
|
|
|
|
videoLabel.setText("Video:");
|
2015-06-15 22:26:47 +00:00
|
|
|
videoDriver.onChange([&] { config->video.driver = videoDriver.selected()->text(); });
|
2015-06-20 05:44:05 +00:00
|
|
|
for(auto& driver : Video::availableDrivers()) {
|
2015-03-03 10:14:49 +00:00
|
|
|
ComboButtonItem item;
|
|
|
|
item.setText(driver);
|
|
|
|
videoDriver.append(item);
|
2015-06-15 22:26:47 +00:00
|
|
|
if(config->video.driver == driver) item.setSelected();
|
2015-03-03 10:14:49 +00:00
|
|
|
}
|
|
|
|
audioLabel.setText("Audio:");
|
2015-06-15 22:26:47 +00:00
|
|
|
audioDriver.onChange([&] { config->audio.driver = audioDriver.selected()->text(); });
|
2015-06-20 05:44:05 +00:00
|
|
|
for(auto& driver : Audio::availableDrivers()) {
|
2015-03-03 10:14:49 +00:00
|
|
|
ComboButtonItem item;
|
|
|
|
item.setText(driver);
|
|
|
|
audioDriver.append(item);
|
2015-06-15 22:26:47 +00:00
|
|
|
if(config->audio.driver == driver) item.setSelected();
|
2015-03-03 10:14:49 +00:00
|
|
|
}
|
|
|
|
inputLabel.setText("Input:");
|
2015-06-15 22:26:47 +00:00
|
|
|
inputDriver.onChange([&] { config->input.driver = inputDriver.selected()->text(); });
|
2015-06-20 05:44:05 +00:00
|
|
|
for(auto& driver : Input::availableDrivers()) {
|
2015-03-03 10:14:49 +00:00
|
|
|
ComboButtonItem item;
|
|
|
|
item.setText(driver);
|
|
|
|
inputDriver.append(item);
|
2015-06-15 22:26:47 +00:00
|
|
|
if(config->input.driver == driver) item.setSelected();
|
2015-03-03 10:14:49 +00:00
|
|
|
}
|
2015-04-21 11:51:57 +00:00
|
|
|
|
|
|
|
libraryLabel.setText("Game Library").setFont(Font::sans(8, "Bold"));
|
|
|
|
libraryPrefix.setText("Location:");
|
2015-06-15 22:26:47 +00:00
|
|
|
libraryLocation.setEditable(false).setText(config->library.location);
|
2015-04-21 11:51:57 +00:00
|
|
|
libraryChange.setText("Change ...").onActivate([&] {
|
Update to v094r23 release.
byuu says:
The library window is gone, and replaced with
hiro::BrowserWindow::openFolder(). This gives navigation capabilities to
game loading, and it also completes our slotted cart selection code. As
an added bonus, it's less code this way, too.
I also set the window size to consistent sizes between all emulated
systems, so that switching between SFC and GB don't cause the window
size to keep changing, and so that the scaling size is consistent (eg at
normal scale, GB @ 3x is closer to SNES @ 2x.) This means black borders
in GB/GBA mode, but it doesn't look that bad, and it's not like many
people ever use these modes anyway.
Finally, added the placeholder tabs for video, audio and timing. I don't
intend to add the timing calculator code to v095 (it might be better as
a separate tool), but I'll add the ability to set video/audio rates, at
least.
Glitch 1: despite selecting the first item in the BrowserDialog list, if
you press enter when the window appears, it doesn't activate the item
until you press an arrow key first.
Glitch 2: in Game Boy mode, if you set the 4x window size, it's not
honoring the full requested height because the viewport is smaller than
the window. 8+ years of trying to get GTK+ and Qt to simply set the god
damned window size I ask for, and I still can't get them to do it
reliably.
Remaining issues:
- finish configuration panels (video, audio, timing)
- fix ruby driver compilation on Windows
- add DIP switch selection window (NSS) [I may end up punting this one
to v096]
2015-05-30 11:39:09 +00:00
|
|
|
if(auto location = BrowserDialog().setTitle("Select Library Location").selectFolder()) {
|
2015-06-15 22:26:47 +00:00
|
|
|
libraryLocation.setText(config->library.location = location);
|
2015-04-21 11:51:57 +00:00
|
|
|
}
|
|
|
|
});
|
2015-03-03 10:14:49 +00:00
|
|
|
}
|