bsnes/target-tomoko/settings/settings.hpp

82 lines
3.1 KiB
C++
Raw Normal View History

struct InputSettings : TabFrameItem {
InputSettings(TabFrame*);
auto updateControls() -> void;
auto activeEmulator() -> InputEmulator&;
auto activePort() -> InputPort&;
auto activeDevice() -> InputDevice&;
auto reloadPorts() -> void;
auto reloadDevices() -> void;
auto reloadMappings() -> void;
auto refreshMappings() -> void;
auto assignMapping() -> void;
auto assignMouseInput(unsigned id) -> void;
auto inputEvent(HID::Device& device, unsigned group, unsigned input, int16 oldValue, int16 newValue, bool allowMouseInput = false) -> void;
InputMapping* activeMapping = nullptr;
VerticalLayout layout{this};
HorizontalLayout selectionLayout{&layout, Size{~0, 0}};
ComboButton emulatorList{&selectionLayout, Size{~0, 0}};
ComboButton portList{&selectionLayout, Size{~0, 0}};
ComboButton deviceList{&selectionLayout, Size{~0, 0}};
ListView mappingList{&layout, Size{~0, ~0}};
HorizontalLayout controlLayout{&layout, Size{~0, 0}};
Button assignMouse1{&controlLayout, Size{100, 0}};
Button assignMouse2{&controlLayout, Size{100, 0}};
Button assignMouse3{&controlLayout, Size{100, 0}};
Widget spacer{&controlLayout, Size{~0, 0}};
Button resetButton{&controlLayout, Size{80, 0}};
Button eraseButton{&controlLayout, Size{80, 0}};
};
struct HotkeySettings : TabFrameItem {
HotkeySettings(TabFrame*);
auto reloadMappings() -> void;
auto refreshMappings() -> void;
auto assignMapping() -> void;
auto inputEvent(HID::Device& device, unsigned group, unsigned input, int16 oldValue, int16 newValue) -> void;
InputMapping* activeMapping = nullptr;
VerticalLayout layout{this};
ListView mappingList{&layout, Size{~0, ~0}};
HorizontalLayout controlLayout{&layout, Size{~0, 0}};
Widget spacer{&controlLayout, Size{~0, 0}};
Button eraseButton{&controlLayout, Size{80, 0}};
};
Update to v094r12 release. byuu says: Changelog: * added driver selection * added video scale + aspect correction settings * added A/V sync + audio mute settings * added configuration file * fixed compilation bugs under Windows and Linux * fixed window sizing * removed HSU1 * the system menu stays as "System", because "Game Boy Advance" was too long a string for the smallest scale size * some more stuff You guys probably won't be ecstatic about the video sizing options, but it's basically your choice of 1x, 2x or 4x scale with optional aspect correction. 3x was intentionally skipped because it looks horrible on hires SNES games. The window is resized and recentered upon loading games. The window doesn't resize otherwise. I never really liked the way v094 always left you with black screen areas and left you with off-centered window positions. I might go ahead and add the pseudo-fullscreen toggle that will jump into 4x mode (respecting your aspect setting.) Short-term: * add input port changing support * add other input types (mouse-based, etc) * add save states * add cheat codes * add timing configuration (video/audio sync) * add hotkeys (single state) We can probably do a new release once the short-term items are completed. Long-term: * add slotted cart loader (SGB, BSX, ST) * add DIP switch selection window (NSS) * add cheat code database * add state manager * add overscan masking Not planned: * video color adjustments (will allow emulated color vs raw color; but no more sliders) * pixel shaders * ananke integration (will need to make a command-line version to get my games in) * fancy audio adjustment controls (resampler, latency, volume) * input focus settings * relocating game library (not hard, just don't feel like it) * localization support (not enough users) * window geometry memory * anything else not in higan v094
2015-03-03 10:14:49 +00:00
struct AdvancedSettings : TabFrameItem {
AdvancedSettings(TabFrame*);
VerticalLayout layout{this};
Label driverLabel{&layout, Size{~0, 0}, 2};
Update to v094r12 release. byuu says: Changelog: * added driver selection * added video scale + aspect correction settings * added A/V sync + audio mute settings * added configuration file * fixed compilation bugs under Windows and Linux * fixed window sizing * removed HSU1 * the system menu stays as "System", because "Game Boy Advance" was too long a string for the smallest scale size * some more stuff You guys probably won't be ecstatic about the video sizing options, but it's basically your choice of 1x, 2x or 4x scale with optional aspect correction. 3x was intentionally skipped because it looks horrible on hires SNES games. The window is resized and recentered upon loading games. The window doesn't resize otherwise. I never really liked the way v094 always left you with black screen areas and left you with off-centered window positions. I might go ahead and add the pseudo-fullscreen toggle that will jump into 4x mode (respecting your aspect setting.) Short-term: * add input port changing support * add other input types (mouse-based, etc) * add save states * add cheat codes * add timing configuration (video/audio sync) * add hotkeys (single state) We can probably do a new release once the short-term items are completed. Long-term: * add slotted cart loader (SGB, BSX, ST) * add DIP switch selection window (NSS) * add cheat code database * add state manager * add overscan masking Not planned: * video color adjustments (will allow emulated color vs raw color; but no more sliders) * pixel shaders * ananke integration (will need to make a command-line version to get my games in) * fancy audio adjustment controls (resampler, latency, volume) * input focus settings * relocating game library (not hard, just don't feel like it) * localization support (not enough users) * window geometry memory * anything else not in higan v094
2015-03-03 10:14:49 +00:00
HorizontalLayout driverLayout{&layout, Size{~0, 0}};
Label videoLabel{&driverLayout, Size{0, 0}};
ComboButton videoDriver{&driverLayout, Size{~0, 0}};
Label audioLabel{&driverLayout, Size{0, 0}};
ComboButton audioDriver{&driverLayout, Size{~0, 0}};
Label inputLabel{&driverLayout, Size{0, 0}};
ComboButton inputDriver{&driverLayout, Size{~0, 0}};
Label libraryLabel{&layout, Size{~0, 0}, 2};
HorizontalLayout libraryLayout{&layout, Size{~0, 0}};
Label libraryPrefix{&libraryLayout, Size{0, 0}};
LineEdit libraryLocation{&libraryLayout, Size{~0, 0}};
Button libraryChange{&libraryLayout, Size{0, 0}};
Update to v094r12 release. byuu says: Changelog: * added driver selection * added video scale + aspect correction settings * added A/V sync + audio mute settings * added configuration file * fixed compilation bugs under Windows and Linux * fixed window sizing * removed HSU1 * the system menu stays as "System", because "Game Boy Advance" was too long a string for the smallest scale size * some more stuff You guys probably won't be ecstatic about the video sizing options, but it's basically your choice of 1x, 2x or 4x scale with optional aspect correction. 3x was intentionally skipped because it looks horrible on hires SNES games. The window is resized and recentered upon loading games. The window doesn't resize otherwise. I never really liked the way v094 always left you with black screen areas and left you with off-centered window positions. I might go ahead and add the pseudo-fullscreen toggle that will jump into 4x mode (respecting your aspect setting.) Short-term: * add input port changing support * add other input types (mouse-based, etc) * add save states * add cheat codes * add timing configuration (video/audio sync) * add hotkeys (single state) We can probably do a new release once the short-term items are completed. Long-term: * add slotted cart loader (SGB, BSX, ST) * add DIP switch selection window (NSS) * add cheat code database * add state manager * add overscan masking Not planned: * video color adjustments (will allow emulated color vs raw color; but no more sliders) * pixel shaders * ananke integration (will need to make a command-line version to get my games in) * fancy audio adjustment controls (resampler, latency, volume) * input focus settings * relocating game library (not hard, just don't feel like it) * localization support (not enough users) * window geometry memory * anything else not in higan v094
2015-03-03 10:14:49 +00:00
};
struct SettingsManager : Window {
SettingsManager();
auto setVisible(bool visible = true) -> SettingsManager&;
auto show(unsigned setting) -> void;
VerticalLayout layout{this};
TabFrame panel{&layout, Size{~0, ~0}};
InputSettings input{&panel};
HotkeySettings hotkeys{&panel};
AdvancedSettings advanced{&panel};
StatusBar statusBar{this};
};
extern SettingsManager* settingsManager;