From bf2707f4c76abaeaeda2d9c4444a608d7d0afed5 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sat, 14 Jan 2023 03:07:57 +1100 Subject: osd: Added support for mapping files to sdlgame joystick provider and made it default with SDL. This changes behaviour, however I think it's a net positive: * Most games using Steam Input or SDL2 to read game controllers have this behaviour, so users have come to expect it. * This module is better at giving meaningful names to buttons on common controller, and assigning axes consistently. * Button/axis mapping files using a widely-used format are supported. * The old behaviour is still available with `-joystickprovider sdljoy` if anyone wants it. The new option for controller mapping files is in the general OSD options rather than SDL options as it can be extended to DirectInput in the future. --- docs/source/commandline/commandline-all.rst | 75 ++++++--- src/osd/modules/input/input_sdl.cpp | 38 ++++- src/osd/modules/input/input_xinput.cpp | 28 +++- src/osd/modules/lib/osdobj_common.cpp | 246 ++++++++++++++-------------- src/osd/modules/lib/osdobj_common.h | 19 ++- 5 files changed, 247 insertions(+), 159 deletions(-) diff --git a/docs/source/commandline/commandline-all.rst b/docs/source/commandline/commandline-all.rst index 91c69ab8bc1..7265e222720 100644 --- a/docs/source/commandline/commandline-all.rst +++ b/docs/source/commandline/commandline-all.rst @@ -1,10 +1,10 @@ .. _mame-commandline-universal: -Universal Commandline Options -============================= +Universal Command-line Options +============================== This section contains configuration options that are applicable to *all* MAME -sub-builds (both SDL and Windows native). +configurations (both including both SDL and Windows native). .. contents:: :local: @@ -450,7 +450,7 @@ overwritten. .. _mame-commandline-romident: -**-romident** [*path\\to\\romstocheck.zip*] +**-romident** [*path/to/romstocheck.zip*] Attempts to identify ROM files, if they are known to MAME, in the specified .zip file or directory. This command can be used to try and identify ROM @@ -693,6 +693,31 @@ OSD-related Options mame ibm5150 -uimodekey DEL +.. _mame-commandline-controllermap: + +**-controller_map** / **-ctrlmap** ** + + Path to a text file containing game controller button and axis mappings in + the format used by SDL2 and Steam. Must use an ASCII-compatible text + encoding with native line endings (e.g. CRLF on Windows). Currently only + supported when using the ``sdlgame`` joystick provider. + + A `community-sourced list of game controller mappings + `_ can be found on GitHub. + Besides using a text editor, several tools are available for creating game + controller mappings, including `SDL2 Gamepad Mapper + `_ and SDL2 + ControllerMap which is `supplied with SDL + `_. You can also + configure your controller in Steam’s Big Picture mode, then copy the + mappings from ``SDL_GamepadBind`` entries in the **config.vdf** file found + in the **config** folder inside your Steam installation folder. + + Example: + .. code-bock:: bash + + mame -controller_map gamecontrollerdb.txt sf2ce + .. _mame-commandline-uifontprovider: **-uifontprovider** ** @@ -1058,7 +1083,7 @@ Core Search Path Options Example: .. code-block:: bash - mame -homepath c:\mame\lua + mame -homepath C:\mame\lua .. _mame-commandline-rompath: @@ -1073,7 +1098,7 @@ Core Search Path Options Example: .. code-block:: bash - mame -rompath c:\mame\roms;c:\roms\another + mame -rompath C:\mame\roms;C:\roms\another .. _mame-commandline-hashpath: @@ -1088,7 +1113,7 @@ Core Search Path Options Example: .. code-block:: bash - mame -hashpath c:\mame\hash;c:\roms\softlists + mame -hashpath C:\mame\hash;C:\roms\softlists .. _mame-commandline-samplepath: @@ -1103,7 +1128,7 @@ Core Search Path Options Example: .. code-block:: bash - mame -samplepath c:\mame\samples;c:\roms\samples + mame -samplepath C:\mame\samples;C:\roms\samples .. _mame-commandline-artpath: @@ -1118,7 +1143,7 @@ Core Search Path Options Example: .. code-block:: bash - mame -artpath c:\mame\artwork;c:\emu\shared-artwork + mame -artpath C:\mame\artwork;C:\emu\shared-artwork .. _mame-commandline-ctrlrpath: @@ -1134,7 +1159,7 @@ Core Search Path Options Example: .. code-block:: bash - mame -ctrlrpath c:\mame\ctrlr;c:\emu\controllers + mame -ctrlrpath C:\mame\ctrlr;C:\emu\controllers .. _mame-commandline-inipath: @@ -1163,7 +1188,7 @@ Core Search Path Options Example: .. code-block:: bash - mame -inipath c:\users\thisuser\documents\mameini + mame -inipath C:\Users\thisuser\documents\mameini .. _mame-commandline-fontpath: @@ -1178,7 +1203,7 @@ Core Search Path Options Example: .. code-block:: bash - mame -fontpath c:\mame\;c:\emu\artwork\mamefonts + mame -fontpath C:\mame\;C:\emu\artwork\mamefonts .. _mame-commandline-cheatpath: @@ -1193,7 +1218,7 @@ Core Search Path Options Example: .. code-block:: bash - mame -cheatpath c:\mame\cheat;c:\emu\cheats + mame -cheatpath C:\mame\cheat;C:\emu\cheats .. _mame-commandline-crosshairpath: @@ -1208,7 +1233,7 @@ Core Search Path Options Example: .. code-block:: bash - mame -crosshairpath c:\mame\crsshair;c:\emu\artwork\crosshairs + mame -crosshairpath C:\mame\crsshair;C:\emu\artwork\crosshairs .. _mame-commandline-pluginspath: @@ -1222,7 +1247,7 @@ Core Search Path Options Example: .. code-block:: bash - mame -pluginspath c:\mame\plugins;c:\emu\lua + mame -pluginspath C:\mame\plugins;C:\emu\lua .. _mame-commandline-languagepath: @@ -1237,7 +1262,7 @@ Core Search Path Options Example: .. code-block:: bash - mame -languagepath c:\mame\language;c:\emu\mame-languages + mame -languagepath C:\mame\language;C:\emu\mame-languages .. _mame-commandline-swpath: @@ -1251,7 +1276,7 @@ Core Search Path Options Example: .. code-block:: bash - mame -swpath c:\mame\software;c:\emu\mydisks + mame -swpath C:\mame\software;C:\emu\mydisks .. _mame-commandline-coreoutdir: @@ -1276,7 +1301,7 @@ Core Output Directory Options Example: .. code-block:: bash - mame -cfg_directory c:\mame\cfg + mame -cfg_directory C:\mame\cfg .. _mame-commandline-nvramdirectory: @@ -1294,7 +1319,7 @@ Core Output Directory Options Example: .. code-block:: bash - mame -nvram_directory c:\mame\nvram + mame -nvram_directory C:\mame\nvram .. _mame-commandline-inputdirectory: @@ -1311,7 +1336,7 @@ Core Output Directory Options Example: .. code-block:: bash - mame -input_directory c:\mame\inp + mame -input_directory C:\mame\inp .. _mame-commandline-statedirectory: @@ -1328,7 +1353,7 @@ Core Output Directory Options Example: .. code-block:: bash - mame -state_directory c:\mame\sta + mame -state_directory C:\mame\sta .. _mame-commandline-snapshotdirectory: @@ -1344,7 +1369,7 @@ Core Output Directory Options Example: .. code-block:: bash - mame -snapshot_directory c:\mame\snap + mame -snapshot_directory C:\mame\snap .. _mame-commandline-diffdirectory: @@ -1363,7 +1388,7 @@ Core Output Directory Options Example: .. code-block:: bash - mame -diff_directory c:\mame\diff + mame -diff_directory C:\mame\diff .. _mame-commandline-commentdirectory: @@ -1380,7 +1405,7 @@ Core Output Directory Options Example: .. code-block:: bash - mame -comment_directory c:\mame\comments + mame -comment_directory C:\mame\comments .. _mame-commandline-savestate: @@ -4015,7 +4040,7 @@ HTTP Server Options Example: .. code-block:: bash - mame apple2 -http -http_port 6502 -http_root c:\users\me\appleweb\root + mame apple2 -http -http_port 6502 -http_root C:\Users\me\appleweb\root .. _mame-commandline-portaudio: diff --git a/src/osd/modules/input/input_sdl.cpp b/src/osd/modules/input/input_sdl.cpp index 0a56d1b4f23..3ac99ffef22 100644 --- a/src/osd/modules/input/input_sdl.cpp +++ b/src/osd/modules/input/input_sdl.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -523,7 +524,7 @@ int lookup_sdl_code(const char *scode) while (sdl_lookup_table[i].code >= 0) { - if (!strcmp(scode, sdl_lookup_table[i].name)) + if (!std::strcmp(scode, sdl_lookup_table[i].name)) return sdl_lookup_table[i].code; i++; } @@ -1939,18 +1940,33 @@ public: { SDL_SetHint(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, "0"); + auto &sdlopts = downcast(*options()); + bool const sixaxis_mode = sdlopts.sixaxis(); + init_joystick(); if (!have_joystick()) return; m_initialized_game_controller = !SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER); - if (!m_initialized_game_controller) + if (m_initialized_game_controller) + { + char const *const mapfile = sdlopts.controller_mapping_file(); + if (mapfile && *mapfile && std::strcmp(mapfile, OSDOPTVAL_NONE)) + { + auto const count = SDL_GameControllerAddMappingsFromFile(mapfile); + if (0 <= count) + osd_printf_verbose("Game Controller: %d controller mapping(s) added from file [%s].\n", count, mapfile); + else + osd_printf_error("Game Controller: Error adding mappings from file [%s]: %s.\n", mapfile, SDL_GetError()); + } + } + else + { osd_printf_warning("Could not initialize SDL Game Controller: %s.\n", SDL_GetError()); + } sdl_joystick_module_base::input_init(machine); - bool const sixaxis_mode = downcast(options())->sixaxis(); - osd_printf_verbose("Game Controller: Start initialization\n"); for (int physical_stick = 0; physical_stick < SDL_NumJoysticks(); physical_stick++) { @@ -1970,6 +1986,14 @@ public: create_game_controller_device(machine, physical_stick, ctrl); } + static int const joy_event_types[] = { + int(SDL_JOYAXISMOTION), + int(SDL_JOYBALLMOTION), + int(SDL_JOYHATMOTION), + int(SDL_JOYBUTTONDOWN), + int(SDL_JOYBUTTONUP), + int(SDL_JOYDEVICEADDED), + int(SDL_JOYDEVICEREMOVED) }; static int const event_types[] = { int(SDL_JOYAXISMOTION), int(SDL_JOYBALLMOTION), @@ -1983,7 +2007,10 @@ public: int(SDL_CONTROLLERBUTTONUP), int(SDL_CONTROLLERDEVICEADDED), int(SDL_CONTROLLERDEVICEREMOVED) }; - sdl_event_manager::instance().subscribe(event_types, this); + if (m_initialized_game_controller) + sdl_event_manager::instance().subscribe(event_types, this); + else + sdl_event_manager::instance().subscribe(joy_event_types, this); osd_printf_verbose("Game Controller: End initialization\n"); } @@ -2036,6 +2063,7 @@ public: // for devices supported by the game controller API, this is received before the corresponding SDL_JOYDEVICEADDED case SDL_CONTROLLERDEVICEADDED: + if (m_initialized_game_controller) { SDL_GameController *const ctrl = SDL_GameControllerOpen(sdlevent.cdevice.which); if (!ctrl) diff --git a/src/osd/modules/input/input_xinput.cpp b/src/osd/modules/input/input_xinput.cpp index fda2b9d8b23..970c8e65c0e 100644 --- a/src/osd/modules/input/input_xinput.cpp +++ b/src/osd/modules/input/input_xinput.cpp @@ -44,6 +44,19 @@ RSB Button Button^ Button^ Button^ ^ optional +At least the vast majority of controllers report 8-bit trigger +resolution and 10-bit stick resolution, even when the physical controls +use digital switches. Resolution can't be used to reliably detect +nominal analog axes controlled by switches. + +Some arcade sticks report unknown or gamepad subtype, but have a single +digital joystick with a switch to select between controlling the D-pad, +left stick and right stick. You can't assume that all three can be +controlled at the same time. + +Many controllers don't correctly report the absence of analog sticks. + + There are multiple physical button layouts for arcade sticks, for example: @@ -68,17 +81,26 @@ Hori Real Arcade Pro VX-SA Kai, Razer Atrox B X Y LB A LT RT RB -Hori Real Arcade Pro.V Kai, Mayflash F300, Mayflash F500 +Hori Real Arcade Pro.V Kai, Mad Catz EGO Arcade Stick, Mayflash F300, Mayflash F500 X Y RB LB A B RT LT -Mad Catz Brawl Stick +Mad Catz WWE All Stars Brawl Stick X Y LB LT A B RB RT Arcade pads typically have six face buttons, and come with different layouts corresponding to the latter two arcade stick layouts, with the -rightmost column on the shoulder buttons. +rightmost column on the shoulder buttons. Examples of face button +layouts: + +Mad Catz Street Fighter IV FightPad, PowerA FUSION Wired FightPad +X Y RB +A B RT + +Hori Pad EX Turbo 2, Mad Catz WWE All Stars BrawlPad, Mortal Kombat X Fight Pad, PDP Versus Fighting Pad +X Y LB +A B RB Dance mats usually have this layout: diff --git a/src/osd/modules/lib/osdobj_common.cpp b/src/osd/modules/lib/osdobj_common.cpp index d370bb0e658..c6f551b63fc 100644 --- a/src/osd/modules/lib/osdobj_common.cpp +++ b/src/osd/modules/lib/osdobj_common.cpp @@ -2,21 +2,22 @@ // copyright-holders:Aaron Giles /*************************************************************************** - osdepend.c + osdobj_common.h OS-dependent code interface. ***************************************************************************/ -#include "modules/lib/osdobj_common.h" +#include "osdobj_common.h" +#include "modules/debugger/debug_module.h" #include "modules/font/font_module.h" #include "modules/input/input_module.h" -#include "modules/sound/sound_module.h" -#include "modules/debugger/debug_module.h" -#include "modules/netdev/netdev_module.h" #include "modules/midi/midi_module.h" #include "modules/monitor/monitor_module.h" +#include "modules/netdev/netdev_module.h" +#include "modules/sound/sound_module.h" + #include "osdnet.h" #include "watchdog.h" @@ -28,149 +29,150 @@ const options_entry osd_options::s_option_entries[] = { - { nullptr, nullptr, core_options::option_type::HEADER, "OSD KEYBOARD MAPPING OPTIONS" }, + { nullptr, nullptr, core_options::option_type::HEADER, "OSD KEYBOARD MAPPING OPTIONS" }, #if defined(SDLMAME_MACOSX) || defined(OSD_MAC) - { OSDOPTION_UIMODEKEY, "DEL", core_options::option_type::STRING, "key to enable/disable MAME controls when emulated system has keyboard inputs" }, + { OSDOPTION_UIMODEKEY, "DEL", core_options::option_type::STRING, "key to enable/disable MAME controls when emulated system has keyboard inputs" }, #else - { OSDOPTION_UIMODEKEY, "auto", core_options::option_type::STRING, "key to enable/disable MAME controls when emulated system has keyboard inputs" }, + { OSDOPTION_UIMODEKEY, "auto", core_options::option_type::STRING, "key to enable/disable MAME controls when emulated system has keyboard inputs" }, #endif // SDLMAME_MACOSX + { OSDOPTION_CONTROLLER_MAP_FILE ";ctrlmap", OSDOPTVAL_NONE, core_options::option_type::PATH, "game controller mapping file" }, - { nullptr, nullptr, core_options::option_type::HEADER, "OSD FONT OPTIONS" }, - { OSD_FONT_PROVIDER, OSDOPTVAL_AUTO, core_options::option_type::STRING, "provider for UI font: " }, + { nullptr, nullptr, core_options::option_type::HEADER, "OSD FONT OPTIONS" }, + { OSD_FONT_PROVIDER, OSDOPTVAL_AUTO, core_options::option_type::STRING, "provider for UI font: " }, - { nullptr, nullptr, core_options::option_type::HEADER, "OSD OUTPUT OPTIONS" }, - { OSD_OUTPUT_PROVIDER, OSDOPTVAL_AUTO, core_options::option_type::STRING, "provider for output notifications: " }, + { nullptr, nullptr, core_options::option_type::HEADER, "OSD OUTPUT OPTIONS" }, + { OSD_OUTPUT_PROVIDER, OSDOPTVAL_AUTO, core_options::option_type::STRING, "provider for output notifications: " }, - { nullptr, nullptr, core_options::option_type::HEADER, "OSD INPUT OPTIONS" }, - { OSD_KEYBOARDINPUT_PROVIDER, OSDOPTVAL_AUTO, core_options::option_type::STRING, "provider for keyboard input: " }, - { OSD_MOUSEINPUT_PROVIDER, OSDOPTVAL_AUTO, core_options::option_type::STRING, "provider for mouse input: " }, - { OSD_LIGHTGUNINPUT_PROVIDER, OSDOPTVAL_AUTO, core_options::option_type::STRING, "provider for lightgun input: " }, - { OSD_JOYSTICKINPUT_PROVIDER, OSDOPTVAL_AUTO, core_options::option_type::STRING, "provider for joystick input: " }, + { nullptr, nullptr, core_options::option_type::HEADER, "OSD INPUT OPTIONS" }, + { OSD_KEYBOARDINPUT_PROVIDER, OSDOPTVAL_AUTO, core_options::option_type::STRING, "provider for keyboard input: " }, + { OSD_MOUSEINPUT_PROVIDER, OSDOPTVAL_AUTO, core_options::option_type::STRING, "provider for mouse input: " }, + { OSD_LIGHTGUNINPUT_PROVIDER, OSDOPTVAL_AUTO, core_options::option_type::STRING, "provider for lightgun input: " }, + { OSD_JOYSTICKINPUT_PROVIDER, OSDOPTVAL_AUTO, core_options::option_type::STRING, "provider for joystick input: " }, - { nullptr, nullptr, core_options::option_type::HEADER, "OSD CLI OPTIONS" }, - { OSDCOMMAND_LIST_MIDI_DEVICES ";mlist", "0", core_options::option_type::COMMAND, "list available MIDI I/O devices" }, - { OSDCOMMAND_LIST_NETWORK_ADAPTERS ";nlist", "0", core_options::option_type::COMMAND, "list available network adapters" }, + { nullptr, nullptr, core_options::option_type::HEADER, "OSD CLI OPTIONS" }, + { OSDCOMMAND_LIST_MIDI_DEVICES ";mlist", "0", core_options::option_type::COMMAND, "list available MIDI I/O devices" }, + { OSDCOMMAND_LIST_NETWORK_ADAPTERS ";nlist", "0", core_options::option_type::COMMAND, "list available network adapters" }, - { nullptr, nullptr, core_options::option_type::HEADER, "OSD DEBUGGING OPTIONS" }, - { OSDOPTION_DEBUGGER, OSDOPTVAL_AUTO, core_options::option_type::STRING, "debugger used: " }, - { OSDOPTION_DEBUGGER_PORT, "23946", core_options::option_type::INTEGER, "port to use for gdbstub debugger" }, - { OSDOPTION_DEBUGGER_FONT ";dfont", OSDOPTVAL_AUTO, core_options::option_type::STRING, "font to use for debugger views" }, - { OSDOPTION_DEBUGGER_FONT_SIZE ";dfontsize", "0", core_options::option_type::FLOAT, "font size to use for debugger views" }, - { OSDOPTION_WATCHDOG ";wdog", "0", core_options::option_type::INTEGER, "force the program to terminate if no updates within specified number of seconds" }, + { nullptr, nullptr, core_options::option_type::HEADER, "OSD DEBUGGING OPTIONS" }, + { OSDOPTION_DEBUGGER, OSDOPTVAL_AUTO, core_options::option_type::STRING, "debugger used: " }, + { OSDOPTION_DEBUGGER_PORT, "23946", core_options::option_type::INTEGER, "port to use for gdbstub debugger" }, + { OSDOPTION_DEBUGGER_FONT ";dfont", OSDOPTVAL_AUTO, core_options::option_type::STRING, "font to use for debugger views" }, + { OSDOPTION_DEBUGGER_FONT_SIZE ";dfontsize", "0", core_options::option_type::FLOAT, "font size to use for debugger views" }, + { OSDOPTION_WATCHDOG ";wdog", "0", core_options::option_type::INTEGER, "force the program to terminate if no updates within specified number of seconds" }, - { nullptr, nullptr, core_options::option_type::HEADER, "OSD PERFORMANCE OPTIONS" }, - { OSDOPTION_NUMPROCESSORS ";np", OSDOPTVAL_AUTO, core_options::option_type::STRING, "number of processors; this overrides the number the system reports" }, - { OSDOPTION_BENCH, "0", core_options::option_type::INTEGER, "benchmark for the given number of emulated seconds; implies -video none -sound none -nothrottle" }, + { nullptr, nullptr, core_options::option_type::HEADER, "OSD PERFORMANCE OPTIONS" }, + { OSDOPTION_NUMPROCESSORS ";np", OSDOPTVAL_AUTO, core_options::option_type::STRING, "number of processors; this overrides the number the system reports" }, + { OSDOPTION_BENCH, "0", core_options::option_type::INTEGER, "benchmark for the given number of emulated seconds; implies -video none -sound none -nothrottle" }, - { nullptr, nullptr, core_options::option_type::HEADER, "OSD VIDEO OPTIONS" }, + { nullptr, nullptr, core_options::option_type::HEADER, "OSD VIDEO OPTIONS" }, // OS X can be trusted to have working hardware OpenGL, so default to it on for the best user experience - { OSDOPTION_VIDEO, OSDOPTVAL_AUTO, core_options::option_type::STRING, "video output method: " }, - { OSDOPTION_NUMSCREENS "(1-4)", "1", core_options::option_type::INTEGER, "number of output screens/windows to create; usually, you want just one" }, - { OSDOPTION_WINDOW ";w", "0", core_options::option_type::BOOLEAN, "enable window mode; otherwise, full screen mode is assumed" }, - { OSDOPTION_MAXIMIZE ";max", "1", core_options::option_type::BOOLEAN, "default to maximized windows" }, - { OSDOPTION_WAITVSYNC ";vs", "0", core_options::option_type::BOOLEAN, "enable waiting for the start of VBLANK before flipping screens (reduces tearing effects)" }, - { OSDOPTION_SYNCREFRESH ";srf", "0", core_options::option_type::BOOLEAN, "enable using the start of VBLANK for throttling instead of the game time" }, - { OSD_MONITOR_PROVIDER, OSDOPTVAL_AUTO, core_options::option_type::STRING, "monitor discovery method: " }, + { OSDOPTION_VIDEO, OSDOPTVAL_AUTO, core_options::option_type::STRING, "video output method: " }, + { OSDOPTION_NUMSCREENS "(1-4)", "1", core_options::option_type::INTEGER, "number of output screens/windows to create; usually, you want just one" }, + { OSDOPTION_WINDOW ";w", "0", core_options::option_type::BOOLEAN, "enable window mode; otherwise, full screen mode is assumed" }, + { OSDOPTION_MAXIMIZE ";max", "1", core_options::option_type::BOOLEAN, "default to maximized windows" }, + { OSDOPTION_WAITVSYNC ";vs", "0", core_options::option_type::BOOLEAN, "enable waiting for the start of VBLANK before flipping screens (reduces tearing effects)" }, + { OSDOPTION_SYNCREFRESH ";srf", "0", core_options::option_type::BOOLEAN, "enable using the start of VBLANK for throttling instead of the game time" }, + { OSD_MONITOR_PROVIDER, OSDOPTVAL_AUTO, core_options::option_type::STRING, "monitor discovery method: " }, // per-window options - { nullptr, nullptr, core_options::option_type::HEADER, "OSD PER-WINDOW VIDEO OPTIONS" }, - { OSDOPTION_SCREEN, OSDOPTVAL_AUTO, core_options::option_type::STRING, "explicit name of the first screen; 'auto' here will try to make a best guess" }, - { OSDOPTION_ASPECT ";screen_aspect", OSDOPTVAL_AUTO, core_options::option_type::STRING, "aspect ratio for all screens; 'auto' here will try to make a best guess" }, - { OSDOPTION_RESOLUTION ";r", OSDOPTVAL_AUTO, core_options::option_type::STRING, "preferred resolution for all screens; format is x[@] or 'auto'" }, - { OSDOPTION_VIEW, OSDOPTVAL_AUTO, core_options::option_type::STRING, "preferred view for all screens" }, - - { OSDOPTION_SCREEN "0", OSDOPTVAL_AUTO, core_options::option_type::STRING, "explicit name of the first screen; 'auto' here will try to make a best guess" }, - { OSDOPTION_ASPECT "0", OSDOPTVAL_AUTO, core_options::option_type::STRING, "aspect ratio of the first screen; 'auto' here will try to make a best guess" }, - { OSDOPTION_RESOLUTION "0;r0", OSDOPTVAL_AUTO, core_options::option_type::STRING, "preferred resolution of the first screen; format is x[@] or 'auto'" }, - { OSDOPTION_VIEW "0", OSDOPTVAL_AUTO, core_options::option_type::STRING, "preferred view for the first screen" }, - - { OSDOPTION_SCREEN "1", OSDOPTVAL_AUTO, core_options::option_type::STRING, "explicit name of the second screen; 'auto' here will try to make a best guess" }, - { OSDOPTION_ASPECT "1", OSDOPTVAL_AUTO, core_options::option_type::STRING, "aspect ratio of the second screen; 'auto' here will try to make a best guess" }, - { OSDOPTION_RESOLUTION "1;r1", OSDOPTVAL_AUTO, core_options::option_type::STRING, "preferred resolution of the second screen; format is x[@] or 'auto'" }, - { OSDOPTION_VIEW "1", OSDOPTVAL_AUTO, core_options::option_type::STRING, "preferred view for the second screen" }, - - { OSDOPTION_SCREEN "2", OSDOPTVAL_AUTO, core_options::option_type::STRING, "explicit name of the third screen; 'auto' here will try to make a best guess" }, - { OSDOPTION_ASPECT "2", OSDOPTVAL_AUTO, core_options::option_type::STRING, "aspect ratio of the third screen; 'auto' here will try to make a best guess" }, - { OSDOPTION_RESOLUTION "2;r2", OSDOPTVAL_AUTO, core_options::option_type::STRING, "preferred resolution of the third screen; format is x[@] or 'auto'" }, - { OSDOPTION_VIEW "2", OSDOPTVAL_AUTO, core_options::option_type::STRING, "preferred view for the third screen" }, - - { OSDOPTION_SCREEN "3", OSDOPTVAL_AUTO, core_options::option_type::STRING, "explicit name of the fourth screen; 'auto' here will try to make a best guess" }, - { OSDOPTION_ASPECT "3", OSDOPTVAL_AUTO, core_options::option_type::STRING, "aspect ratio of the fourth screen; 'auto' here will try to make a best guess" }, - { OSDOPTION_RESOLUTION "3;r3", OSDOPTVAL_AUTO, core_options::option_type::STRING, "preferred resolution of the fourth screen; format is x[@] or 'auto'" }, - { OSDOPTION_VIEW "3", OSDOPTVAL_AUTO, core_options::option_type::STRING, "preferred view for the fourth screen" }, + { nullptr, nullptr, core_options::option_type::HEADER, "OSD PER-WINDOW VIDEO OPTIONS" }, + { OSDOPTION_SCREEN, OSDOPTVAL_AUTO, core_options::option_type::STRING, "explicit name of the first screen; 'auto' here will try to make a best guess" }, + { OSDOPTION_ASPECT ";screen_aspect", OSDOPTVAL_AUTO, core_options::option_type::STRING, "aspect ratio for all screens; 'auto' here will try to make a best guess" }, + { OSDOPTION_RESOLUTION ";r", OSDOPTVAL_AUTO, core_options::option_type::STRING, "preferred resolution for all screens; format is x[@] or 'auto'" }, + { OSDOPTION_VIEW, OSDOPTVAL_AUTO, core_options::option_type::STRING, "preferred view for all screens" }, + + { OSDOPTION_SCREEN "0", OSDOPTVAL_AUTO, core_options::option_type::STRING, "explicit name of the first screen; 'auto' here will try to make a best guess" }, + { OSDOPTION_ASPECT "0", OSDOPTVAL_AUTO, core_options::option_type::STRING, "aspect ratio of the first screen; 'auto' here will try to make a best guess" }, + { OSDOPTION_RESOLUTION "0;r0", OSDOPTVAL_AUTO, core_options::option_type::STRING, "preferred resolution of the first screen; format is x[@] or 'auto'" }, + { OSDOPTION_VIEW "0", OSDOPTVAL_AUTO, core_options::option_type::STRING, "preferred view for the first screen" }, + + { OSDOPTION_SCREEN "1", OSDOPTVAL_AUTO, core_options::option_type::STRING, "explicit name of the second screen; 'auto' here will try to make a best guess" }, + { OSDOPTION_ASPECT "1", OSDOPTVAL_AUTO, core_options::option_type::STRING, "aspect ratio of the second screen; 'auto' here will try to make a best guess" }, + { OSDOPTION_RESOLUTION "1;r1", OSDOPTVAL_AUTO, core_options::option_type::STRING, "preferred resolution of the second screen; format is x[@] or 'auto'" }, + { OSDOPTION_VIEW "1", OSDOPTVAL_AUTO, core_options::option_type::STRING, "preferred view for the second screen" }, + + { OSDOPTION_SCREEN "2", OSDOPTVAL_AUTO, core_options::option_type::STRING, "explicit name of the third screen; 'auto' here will try to make a best guess" }, + { OSDOPTION_ASPECT "2", OSDOPTVAL_AUTO, core_options::option_type::STRING, "aspect ratio of the third screen; 'auto' here will try to make a best guess" }, + { OSDOPTION_RESOLUTION "2;r2", OSDOPTVAL_AUTO, core_options::option_type::STRING, "preferred resolution of the third screen; format is x[@] or 'auto'" }, + { OSDOPTION_VIEW "2", OSDOPTVAL_AUTO, core_options::option_type::STRING, "preferred view for the third screen" }, + + { OSDOPTION_SCREEN "3", OSDOPTVAL_AUTO, core_options::option_type::STRING, "explicit name of the fourth screen; 'auto' here will try to make a best guess" }, + { OSDOPTION_ASPECT "3", OSDOPTVAL_AUTO, core_options::option_type::STRING, "aspect ratio of the fourth screen; 'auto' here will try to make a best guess" }, + { OSDOPTION_RESOLUTION "3;r3", OSDOPTVAL_AUTO, core_options::option_type::STRING, "preferred resolution of the fourth screen; format is x[@] or 'auto'" }, + { OSDOPTION_VIEW "3", OSDOPTVAL_AUTO, core_options::option_type::STRING, "preferred view for the fourth screen" }, // full screen options - { nullptr, nullptr, core_options::option_type::HEADER, "OSD FULL SCREEN OPTIONS" }, - { OSDOPTION_SWITCHRES, "0", core_options::option_type::BOOLEAN, "enable resolution switching" }, + { nullptr, nullptr, core_options::option_type::HEADER, "OSD FULL SCREEN OPTIONS" }, + { OSDOPTION_SWITCHRES, "0", core_options::option_type::BOOLEAN, "enable resolution switching" }, - { nullptr, nullptr, core_options::option_type::HEADER, "OSD ACCELERATED VIDEO OPTIONS" }, - { OSDOPTION_FILTER ";glfilter;flt", "1", core_options::option_type::BOOLEAN, "use bilinear filtering when scaling emulated video" }, - { OSDOPTION_PRESCALE "(1-8)", "1", core_options::option_type::INTEGER, "scale emulated video by this factor before applying filters/shaders" }, + { nullptr, nullptr, core_options::option_type::HEADER, "OSD ACCELERATED VIDEO OPTIONS" }, + { OSDOPTION_FILTER ";glfilter;flt", "1", core_options::option_type::BOOLEAN, "use bilinear filtering when scaling emulated video" }, + { OSDOPTION_PRESCALE "(1-8)", "1", core_options::option_type::INTEGER, "scale emulated video by this factor before applying filters/shaders" }, #if USE_OPENGL - { nullptr, nullptr, core_options::option_type::HEADER, "OpenGL-SPECIFIC OPTIONS" }, - { OSDOPTION_GL_FORCEPOW2TEXTURE, "0", core_options::option_type::BOOLEAN, "force power-of-two texture sizes (default no)" }, - { OSDOPTION_GL_NOTEXTURERECT, "0", core_options::option_type::BOOLEAN, "don't use OpenGL GL_ARB_texture_rectangle (default on)" }, - { OSDOPTION_GL_VBO, "1", core_options::option_type::BOOLEAN, "enable OpenGL VBO if available (default on)" }, - { OSDOPTION_GL_PBO, "1", core_options::option_type::BOOLEAN, "enable OpenGL PBO if available (default on)" }, - { OSDOPTION_GL_GLSL, "0", core_options::option_type::BOOLEAN, "enable OpenGL GLSL if available (default off)" }, - { OSDOPTION_GLSL_FILTER, "1", core_options::option_type::STRING, "enable OpenGL GLSL filtering instead of FF filtering 0-plain, 1-bilinear (default), 2-bicubic" }, - { OSDOPTION_SHADER_MAME "0", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader set mame bitmap 0" }, - { OSDOPTION_SHADER_MAME "1", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader set mame bitmap 1" }, - { OSDOPTION_SHADER_MAME "2", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader set mame bitmap 2" }, - { OSDOPTION_SHADER_MAME "3", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader set mame bitmap 3" }, - { OSDOPTION_SHADER_MAME "4", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader set mame bitmap 4" }, - { OSDOPTION_SHADER_MAME "5", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader set mame bitmap 5" }, - { OSDOPTION_SHADER_MAME "6", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader set mame bitmap 6" }, - { OSDOPTION_SHADER_MAME "7", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader set mame bitmap 7" }, - { OSDOPTION_SHADER_MAME "8", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader set mame bitmap 8" }, - { OSDOPTION_SHADER_MAME "9", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader set mame bitmap 9" }, - { OSDOPTION_SHADER_SCREEN "0", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader screen bitmap 0" }, - { OSDOPTION_SHADER_SCREEN "1", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader screen bitmap 1" }, - { OSDOPTION_SHADER_SCREEN "2", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader screen bitmap 2" }, - { OSDOPTION_SHADER_SCREEN "3", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader screen bitmap 3" }, - { OSDOPTION_SHADER_SCREEN "4", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader screen bitmap 4" }, - { OSDOPTION_SHADER_SCREEN "5", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader screen bitmap 5" }, - { OSDOPTION_SHADER_SCREEN "6", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader screen bitmap 6" }, - { OSDOPTION_SHADER_SCREEN "7", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader screen bitmap 7" }, - { OSDOPTION_SHADER_SCREEN "8", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader screen bitmap 8" }, - { OSDOPTION_SHADER_SCREEN "9", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader screen bitmap 9" }, + { nullptr, nullptr, core_options::option_type::HEADER, "OpenGL-SPECIFIC OPTIONS" }, + { OSDOPTION_GL_FORCEPOW2TEXTURE, "0", core_options::option_type::BOOLEAN, "force power-of-two texture sizes (default no)" }, + { OSDOPTION_GL_NOTEXTURERECT, "0", core_options::option_type::BOOLEAN, "don't use OpenGL GL_ARB_texture_rectangle (default on)" }, + { OSDOPTION_GL_VBO, "1", core_options::option_type::BOOLEAN, "enable OpenGL VBO if available (default on)" }, + { OSDOPTION_GL_PBO, "1", core_options::option_type::BOOLEAN, "enable OpenGL PBO if available (default on)" }, + { OSDOPTION_GL_GLSL, "0", core_options::option_type::BOOLEAN, "enable OpenGL GLSL if available (default off)" }, + { OSDOPTION_GLSL_FILTER, "1", core_options::option_type::STRING, "enable OpenGL GLSL filtering instead of FF filtering 0-plain, 1-bilinear (default), 2-bicubic" }, + { OSDOPTION_SHADER_MAME "0", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader set mame bitmap 0" }, + { OSDOPTION_SHADER_MAME "1", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader set mame bitmap 1" }, + { OSDOPTION_SHADER_MAME "2", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader set mame bitmap 2" }, + { OSDOPTION_SHADER_MAME "3", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader set mame bitmap 3" }, + { OSDOPTION_SHADER_MAME "4", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader set mame bitmap 4" }, + { OSDOPTION_SHADER_MAME "5", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader set mame bitmap 5" }, + { OSDOPTION_SHADER_MAME "6", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader set mame bitmap 6" }, + { OSDOPTION_SHADER_MAME "7", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader set mame bitmap 7" }, + { OSDOPTION_SHADER_MAME "8", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader set mame bitmap 8" }, + { OSDOPTION_SHADER_MAME "9", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader set mame bitmap 9" }, + { OSDOPTION_SHADER_SCREEN "0", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader screen bitmap 0" }, + { OSDOPTION_SHADER_SCREEN "1", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader screen bitmap 1" }, + { OSDOPTION_SHADER_SCREEN "2", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader screen bitmap 2" }, + { OSDOPTION_SHADER_SCREEN "3", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader screen bitmap 3" }, + { OSDOPTION_SHADER_SCREEN "4", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader screen bitmap 4" }, + { OSDOPTION_SHADER_SCREEN "5", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader screen bitmap 5" }, + { OSDOPTION_SHADER_SCREEN "6", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader screen bitmap 6" }, + { OSDOPTION_SHADER_SCREEN "7", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader screen bitmap 7" }, + { OSDOPTION_SHADER_SCREEN "8", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader screen bitmap 8" }, + { OSDOPTION_SHADER_SCREEN "9", OSDOPTVAL_NONE, core_options::option_type::STRING, "custom OpenGL GLSL shader screen bitmap 9" }, #endif - { nullptr, nullptr, core_options::option_type::HEADER, "OSD SOUND OPTIONS" }, - { OSDOPTION_SOUND, OSDOPTVAL_AUTO, core_options::option_type::STRING, "sound output method: " }, - { OSDOPTION_AUDIO_LATENCY "(0-5)", "2", core_options::option_type::INTEGER, "set audio latency (increase to reduce glitches, decrease for responsiveness)" }, + { nullptr, nullptr, core_options::option_type::HEADER, "OSD SOUND OPTIONS" }, + { OSDOPTION_SOUND, OSDOPTVAL_AUTO, core_options::option_type::STRING, "sound output method: " }, + { OSDOPTION_AUDIO_LATENCY "(0-5)", "2", core_options::option_type::INTEGER, "set audio latency (increase to reduce glitches, decrease for responsiveness)" }, #ifndef NO_USE_PORTAUDIO - { nullptr, nullptr, core_options::option_type::HEADER, "PORTAUDIO OPTIONS" }, - { OSDOPTION_PA_API, OSDOPTVAL_NONE, core_options::option_type::STRING, "PortAudio API" }, - { OSDOPTION_PA_DEVICE, OSDOPTVAL_NONE, core_options::option_type::STRING, "PortAudio device" }, - { OSDOPTION_PA_LATENCY "(0-0.25)", "0", core_options::option_type::FLOAT, "suggested latency in seconds, 0 for default" }, + { nullptr, nullptr, core_options::option_type::HEADER, "PORTAUDIO OPTIONS" }, + { OSDOPTION_PA_API, OSDOPTVAL_NONE, core_options::option_type::STRING, "PortAudio API" }, + { OSDOPTION_PA_DEVICE, OSDOPTVAL_NONE, core_options::option_type::STRING, "PortAudio device" }, + { OSDOPTION_PA_LATENCY "(0-0.25)", "0", core_options::option_type::FLOAT, "suggested latency in seconds, 0 for default" }, #endif #ifdef SDLMAME_MACOSX - { nullptr, nullptr, core_options::option_type::HEADER, "CoreAudio-SPECIFIC OPTIONS" }, - { OSDOPTION_AUDIO_OUTPUT, OSDOPTVAL_AUTO, core_options::option_type::STRING, "audio output device" }, - { OSDOPTION_AUDIO_EFFECT "0", OSDOPTVAL_NONE, core_options::option_type::STRING, "AudioUnit effect 0" }, - { OSDOPTION_AUDIO_EFFECT "1", OSDOPTVAL_NONE, core_options::option_type::STRING, "AudioUnit effect 1" }, - { OSDOPTION_AUDIO_EFFECT "2", OSDOPTVAL_NONE, core_options::option_type::STRING, "AudioUnit effect 2" }, - { OSDOPTION_AUDIO_EFFECT "3", OSDOPTVAL_NONE, core_options::option_type::STRING, "AudioUnit effect 3" }, - { OSDOPTION_AUDIO_EFFECT "4", OSDOPTVAL_NONE, core_options::option_type::STRING, "AudioUnit effect 4" }, - { OSDOPTION_AUDIO_EFFECT "5", OSDOPTVAL_NONE, core_options::option_type::STRING, "AudioUnit effect 5" }, - { OSDOPTION_AUDIO_EFFECT "6", OSDOPTVAL_NONE, core_options::option_type::STRING, "AudioUnit effect 6" }, - { OSDOPTION_AUDIO_EFFECT "7", OSDOPTVAL_NONE, core_options::option_type::STRING, "AudioUnit effect 7" }, - { OSDOPTION_AUDIO_EFFECT "8", OSDOPTVAL_NONE, core_options::option_type::STRING, "AudioUnit effect 8" }, - { OSDOPTION_AUDIO_EFFECT "9", OSDOPTVAL_NONE, core_options::option_type::STRING, "AudioUnit effect 9" }, + { nullptr, nullptr, core_options::option_type::HEADER, "CoreAudio-SPECIFIC OPTIONS" }, + { OSDOPTION_AUDIO_OUTPUT, OSDOPTVAL_AUTO, core_options::option_type::STRING, "audio output device" }, + { OSDOPTION_AUDIO_EFFECT "0", OSDOPTVAL_NONE, core_options::option_type::STRING, "AudioUnit effect 0" }, + { OSDOPTION_AUDIO_EFFECT "1", OSDOPTVAL_NONE, core_options::option_type::STRING, "AudioUnit effect 1" }, + { OSDOPTION_AUDIO_EFFECT "2", OSDOPTVAL_NONE, core_options::option_type::STRING, "AudioUnit effect 2" }, + { OSDOPTION_AUDIO_EFFECT "3", OSDOPTVAL_NONE, core_options::option_type::STRING, "AudioUnit effect 3" }, + { OSDOPTION_AUDIO_EFFECT "4", OSDOPTVAL_NONE, core_options::option_type::STRING, "AudioUnit effect 4" }, + { OSDOPTION_AUDIO_EFFECT "5", OSDOPTVAL_NONE, core_options::option_type::STRING, "AudioUnit effect 5" }, + { OSDOPTION_AUDIO_EFFECT "6", OSDOPTVAL_NONE, core_options::option_type::STRING, "AudioUnit effect 6" }, + { OSDOPTION_AUDIO_EFFECT "7", OSDOPTVAL_NONE, core_options::option_type::STRING, "AudioUnit effect 7" }, + { OSDOPTION_AUDIO_EFFECT "8", OSDOPTVAL_NONE, core_options::option_type::STRING, "AudioUnit effect 8" }, + { OSDOPTION_AUDIO_EFFECT "9", OSDOPTVAL_NONE, core_options::option_type::STRING, "AudioUnit effect 9" }, #endif - { nullptr, nullptr, core_options::option_type::HEADER, "BGFX POST-PROCESSING OPTIONS" }, - { OSDOPTION_BGFX_PATH, "bgfx", core_options::option_type::PATH, "path to BGFX-related files" }, - { OSDOPTION_BGFX_BACKEND, "auto", core_options::option_type::STRING, "BGFX backend to use (d3d9, d3d11, d3d12, metal, opengl, gles, vulkan)" }, - { OSDOPTION_BGFX_DEBUG, "0", core_options::option_type::BOOLEAN, "enable BGFX debugging statistics" }, - { OSDOPTION_BGFX_SCREEN_CHAINS, "default", core_options::option_type::STRING, "comma-delimited list of screen chain JSON names, colon-delimited per-window" }, - { OSDOPTION_BGFX_SHADOW_MASK, "slot-mask.png", core_options::option_type::STRING, "shadow mask texture name" }, - { OSDOPTION_BGFX_LUT, "lut-default.png", core_options::option_type::STRING, "LUT texture name" }, - { OSDOPTION_BGFX_AVI_NAME, OSDOPTVAL_AUTO, core_options::option_type::PATH, "filename for BGFX output logging" }, + { nullptr, nullptr, core_options::option_type::HEADER, "BGFX POST-PROCESSING OPTIONS" }, + { OSDOPTION_BGFX_PATH, "bgfx", core_options::option_type::PATH, "path to BGFX-related files" }, + { OSDOPTION_BGFX_BACKEND, "auto", core_options::option_type::STRING, "BGFX backend to use (d3d9, d3d11, d3d12, metal, opengl, gles, vulkan)" }, + { OSDOPTION_BGFX_DEBUG, "0", core_options::option_type::BOOLEAN, "enable BGFX debugging statistics" }, + { OSDOPTION_BGFX_SCREEN_CHAINS, "default", core_options::option_type::STRING, "comma-delimited list of screen chain JSON names, colon-delimited per-window" }, + { OSDOPTION_BGFX_SHADOW_MASK, "slot-mask.png", core_options::option_type::STRING, "shadow mask texture name" }, + { OSDOPTION_BGFX_LUT, "lut-default.png", core_options::option_type::STRING, "LUT texture name" }, + { OSDOPTION_BGFX_AVI_NAME, OSDOPTVAL_AUTO, core_options::option_type::PATH, "filename for BGFX output logging" }, // End of list { nullptr } @@ -283,8 +285,8 @@ void osd_common_t::register_options() REGISTER_MODULE(m_mod_man, LIGHTGUNINPUT_WIN32); REGISTER_MODULE(m_mod_man, LIGHTGUN_NONE); - REGISTER_MODULE(m_mod_man, JOYSTICKINPUT_SDLJOY); REGISTER_MODULE(m_mod_man, JOYSTICKINPUT_SDLGAME); + REGISTER_MODULE(m_mod_man, JOYSTICKINPUT_SDLJOY); REGISTER_MODULE(m_mod_man, JOYSTICKINPUT_WINHYBRID); REGISTER_MODULE(m_mod_man, JOYSTICKINPUT_DINPUT); REGISTER_MODULE(m_mod_man, JOYSTICKINPUT_XINPUT); diff --git a/src/osd/modules/lib/osdobj_common.h b/src/osd/modules/lib/osdobj_common.h index 55ed36e5060..92a9a498c3c 100644 --- a/src/osd/modules/lib/osdobj_common.h +++ b/src/osd/modules/lib/osdobj_common.h @@ -2,30 +2,40 @@ // copyright-holders:Aaron Giles /*************************************************************************** - osdepend.h + osdobj_common.h OS-dependent code interface. *******************************************************************c********/ - -#pragma once - #ifndef MAME_OSD_LIB_OSDOBJ_COMMON_H #define MAME_OSD_LIB_OSDOBJ_COMMON_H +#pragma once + #include "osdcore.h" #include "osdepend.h" + #include "modules/osdmodule.h" #include "modules/output/output_module.h" + #include "emuopts.h" + #include "strformat.h" + +#include #include +#include +#include +#include +#include + //============================================================ // Defines //============================================================ #define OSDOPTION_UIMODEKEY "uimodekey" +#define OSDOPTION_CONTROLLER_MAP_FILE "controller_map" #define OSDCOMMAND_LIST_MIDI_DEVICES "listmidi" #define OSDCOMMAND_LIST_NETWORK_ADAPTERS "listnetwork" @@ -98,6 +108,7 @@ public: // keyboard mapping const char *ui_mode_key() const { return value(OSDOPTION_UIMODEKEY); } + const char *controller_mapping_file() const { return value(OSDOPTION_CONTROLLER_MAP_FILE); } // debugging options const char *debugger() const { return value(OSDOPTION_DEBUGGER); } -- cgit v1.2.3