summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/sdl/sdlmain.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Various input and OSD refactoring: Vas Crabb2023-01-291-403/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | osd: Supply OSD object to modules on initialisation. Encapsulated some event handling in the OSD objects rather than leaving it in free functions. Put various stuff in namespaces. osd/modules/input: Enabled dinput, xinput and winhybrid modules for Windows SDL builds, and enabled background input for dinput and xinput (and by extension winhybrid) modules. Also fixed some COM and X11 resource leaks. osd/modules/input/input_sdl.cpp: Flipped SDL mouse button order to match Windows, and exposed vertical and horizontal scroll as Z and rZ axes. Moved SDL UI event handling out of input devices into OSD object. osd/modules/input_rawinput.cpp: Changed lightgun Z axis token so it's correctly identified as a relative axis (it maps to the scroll wheel equivalent). osd: Added an option to choose the network provider module. Mostly useful if you build with both TUN/TAP and pcap support included, or if you want to disable emulated networking completely. emu/input.cpp: Use a better strategy for assembling input code names that uses fewer temporary strings and doesn't require use of the non-Unicode-aware space trimming function (fixes MT08552). osd/modules/input_dinput.cpp: Improved polling logic. osd: Made various parts of the input code less dependent on concrete emu objects, and reduced inappropriately passing around the machine object. Made input modules less dependent on OSD implementation. Encapsulated some stuff and got rid of some vestigial newui and SDL1 support code. Cleaned up some interfaces. Moved OSD options classes to their own files. Prepare to remove main.h from emu.h - it's mostly used to get the application name, which the vast majority of emulated devices don't need to do.
* util/options.cpp: Fixed overriden default option values from OSD. Vas Crabb2022-12-191-3/+2
|
* osd/modules/file: Don't magically substitute environment variables when ↵ npwoods2022-12-171-2/+2
| | | | | | | | opening files. (#9859) * util/options.cpp: Added option types for single and multiple paths. * util/options.cpp: Substitute environment variables in values from defaults and INI files. * ui/dirmenu.cpp: Removed hard-coded list of multi-path options. * plugins: Don't substitute environment variables in path options.
* osd/sdl: Removed keyboard/mouse/joystick device mapping options. Vas Crabb2022-07-151-28/+0
| | | | | | | | | The keyboard and mouse device mapping options did nothing at all, mostly because of lack of support for separating inputs from multiple devices. The joystick options were useless when you have two of the same kind of controller, and you can achieve the same thing with controller configuration files.
* srcclean and cleanup in preparation for branching MAME 0.245 Vas Crabb2022-06-261-1/+1
|
* Throw a fatal error if combination of bgfx video and wayland videodriver has ↵ Julian Sikorski2022-06-251-14/+8
| | | | been detected (#9888)
* util/options.h: Removed legacy OPTION_* option type constants. (#9851) npwoods2022-05-301-58/+58
| | | These constants were polluting the global namespace.
* Prefer the X11 SDL video driver on Linux (#9676) Julian Sikorski2022-05-031-3/+14
|
* -attach_window support for SDLMAME (#8070) npwoods2021-05-201-1/+2
|
* Disable sleep when using -bench. Aaron Giles2021-03-311-0/+1
|
* Much more core std::string_view modernization AJR2021-01-201-1/+2
| | | | | | | | | | | | | | | - Remove corestr.h from emu.h; update a few source files to not use it at all - Change strtrimspace, strtrimrightspace and core_filename_extract_* to be pure functions taking a std::string_view by value and returning the same type - Change strmakeupper and strmakelower to be pure functions taking a std::string_view and constructing a std::string - Remove the string-modifying version of zippath_parent - Change tag-based lookup functions in device_t to take std::string_view instead of const std::string & or const char * - Remove the subdevice tag cache from device_t (since device finders are now recommended) and replace it with a map covering directly owned subdevices only - Move the working directory setup method out of device_image_interface (only the UI seems to actually use the full version of this) - Change output_manager to use std::string_view for output name arguments - Change core_options to accept std::string_view for most name and value arguments (return values are still C strings for now) - Change miscellaneous other functions to accept std::string_view arguments - Remove a few string accessor macros from romload.h - Remove many unnecessary c_str() calls from logging/error messages
* osd/modules/input: Fixed a couple of X11 resource leaks. Vas Crabb2020-11-161-16/+17
|
* (nw) Clean up the mess on master Vas Crabb2019-03-261-0/+1
| | | | | | | | | | | | | This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release.
* Revert "conflict resolution (nw)" andreasnaive2019-03-251-1/+0
| | | | | This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
* Show video-mode option 'accel' in help and GUI Andreas Müller2019-02-171-0/+1
| | | | Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
* clean up and improve option descriptions Vas Crabb2018-12-131-5/+5
|
* How to remove unwanted macros, or: getting out of discovered "check" (nw) AJR2018-06-291-0/+1
| | | | This fixes the OS X build.
* Fixed an options overhaul regression (#2530) npwoods2017-10-061-0/+10
| | | | | | | | | | | | This crash (discovered by Wizz) had the following symptoms: 1. Start MAME 2. Choose "Configure Machine" 3. Choose "Video Options" CRASH This was the result of the options editor not having a fully formed list of options where it was expecting one. The fix is to change the declaration of emu_options to one that have full OSD options (it is possible that SDLMAME needs something slightly different) I created a osd_setup_osd_specific_emu_options(emu_options &) function that given an emu_options, will slap on system specific options. I see this as only marginally less gross, and I have zero opinion on whether this should be changed to return an emu_options (rather than have a reference parameter), be a static method on emu_options, or what have you.
* Attempted to sanitize/rationalize how we access UTF-8 command line arguments ↵ npwoods2017-09-181-7/+1
| | | | | | | | | | | (#2532) Specifically, this creates a call osd_get_command_line() that returns UTF-8 command line arguments as std::vector<std::string>. On non-Windows platforms, this does nothing more than build the vector. On Windows, this invokes GetCommandLineW() and CommandLineToArgvW(). This also attempts to unwind usage of wmain()/_tmain() on Windows, which is not standard. Related to this, this fixes a bug in Imgtool; specifically, non-7 bit ASCII was not being handled correctly in Windows. This is really an admission that the way that Windows handles Unicode and command line arguments sucks, and it is my belief that having a wmain() or _tmain() declaration specific for Windows is a worse solution. C'est la vie. I'm very open to the idea that src/osd/osdcore.[cpp|h] is not the best place to do this. Let me know if I should move it.
* Modification for Android build (NDK r14b, build-tools 21.1.2 and gradle ↵ Miso Kim2017-08-231-0/+3
| | | | 2.2.1) (#2585)
* Overhaul to how MAME handles options, take two (#2341) npwoods2017-06-251-6/+4
|
* Revert "Overhaul to how MAME handles options (#2260)" Vas Crabb2017-05-071-4/+6
| | | | | | | | | | | | This reverts commit 536990e77b49ccc50ef275bfbf1018cc29c16154. Conflicts: src/frontend/mame/mame.cpp Sorry, but this change was half-baked. It breaks a lot of existing functionality and clearly hasn't been tested in more than a tiny subset of use cases. Please play this work back onto your own branch, and test it before submitting another PR.
* Overhaul to how MAME handles options (#2260) npwoods2017-05-051-6/+4
| | | | | | | | | | | | This is an overhaul to how MAME handles options to provide a better foundation for what MAME is already doing in practice. Previously, core_options was designed to provide an input/output facility for reading options from the command line and INI files. However, the current needs (image/slot/get_default_card_software calculus and MewUI) go way beyond that. Broadly, this PR makes the following changes: * core_options now has an extensibility mechanism, so one can register options that behave dramatically differently * With that foundation, emu_options now encapsulates all of the funky image/slot/get_default_card_software calculus that were previously handled by static methods in mameopts.cpp. Changes to emu_options should not automatically cascade in such a way so that it stays in a consistent state * emu_options no longer provides direct access to the slot_options/image_options maps; there are simpler API functions that control these capabilities * Many core_options functions that expose internal data structures (e.g. - priority) that were only really needed because of previous (now obsolete) techniques have been removed. * core_options is now exception based (rather than dumping text to an std::string). The burden is on the caller to catch these, and discern between warnings and errors as needed. Obviously this is a risky change; that's why this is being submitted at the start of the dev cycle.
* srcclean (nw) Vas Crabb2017-03-261-1/+1
|
* Fixed SDL build on win32 and zexall build (nw) Miodrag Milanovic2017-03-261-2/+8
|
* Move special windows.h include directives to build defines (nw) Brad Hughes2016-12-281-1/+0
|
* Major refactoring of debugger core [Ryan Holtz] therealmogminer@gmail.com2016-06-081-15/+17
| | | | | | | | * Eliminate globals/file statics * Remove lots of stuff from global scope * Use std::function for custom command registration * Eliminate some trampolines * Build fixes from Vas Crabb and balr0g
* Fixed video mode opengl duplicated in SDL build. (nw) dankan18902016-06-071-0/+2
|
* No SDL 1.2 support anymore (nw) Miodrag Milanovic2016-05-061-8/+0
|
* RIP sdlinc.h couriersud2016-05-061-1/+1
|
* Cleanups and version bumpmame0173 Miodrag Milanovic2016-04-271-1/+1
|
* Various cleanups suggested by static analyzer (nw) Miodrag Milanovic2016-04-241-20/+20
|
* Split UI and frontend part from core [Miodrag Milanovic] Miodrag Milanovic2016-04-231-4/+2
|
* SDL cleanup (nw) Miodrag Milanovic2016-04-201-11/+5
|
* Fixed missing diagnostic module include. Brad Hughes2016-04-171-0/+1
|
* Create diagnostic module for profiling and crash diagnostics Brad Hughes2016-04-171-0/+3
|
* Update windows to use platform independent watchdog implementation (nw) Miodrag Milanovic2016-04-151-11/+1
|
* Fixed linux compile. couriersud2016-04-101-1/+1
|
* Fixed joystick on Android preventing application to crash, cleanup init for ↵ Miodrag Milanovic2016-04-021-7/+7
| | | | SDL in total (nw)
* Cleanups and version bump Miodrag Milanovic2016-03-301-1/+0
|
* Change INIPATH default to cover new HLSL presets (ini/presets) (nw) Scott Stone2016-03-301-1/+1
|
* Initial work to make MAME work on Android [Miodrag Milanovic] Miodrag Milanovic2016-03-271-3/+3
|
* Copy/paste some code from Windows OSD to get SDL going again - sorry if this ↵ Vas Crabb2016-03-241-2/+1
| | | | is dirty
* Using SDL_INIT_GAMECONTROLLER it explicitly calls SDL_INIT_JOYSTICK some ↵ Miodrag Milanovic2016-03-051-4/+3
| | | | experimental code (nw)
* Merge input modules work. Brad Hughes2016-02-281-1/+1
|\
| * Refactor OSD input into modules Brad Hughes2016-02-281-1/+1
| |
* | OS/2 can not support SDL2 which is needed for MAME to run (nw) Miodrag Milanovic2016-02-261-30/+2
| |
* | placed back OPENGL check since GL is not same as GLES (nw) Miodrag Milanovic2016-02-161-0/+5
| |
* | opengl as requirement (nw) Miodrag Milanovic2016-02-161-5/+0
| |
* | Remove SDL 1.2 support (nw) Miodrag Milanovic2016-02-161-59/+1
|/