summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules
Commit message (Collapse)AuthorAgeFilesLines
...
* osd: Cleaner way of dealing with input updates. Vas Crabb2023-02-231-1/+1
|
* osd: Don't pump events when reading inputs. Vas Crabb2023-02-238-29/+13
| | | | | | This was a drain on performance. If anything is trying to poll inputs in a loop, it needs to call input_update() to ensure it gets up-to-date state.
* Fix building with gcc-13 (#10917) Julian Sikorski2023-02-203-0/+3
|
* osd: Removed support for SDL < 2.0.6; apple/apple2video.cpp: Code style ↵ Vas Crabb2023-02-211-9/+2
| | | | cleanups.
* Reduced usage of sprintf. (#10892) Erik2023-02-201-4/+3
|
* srcclean and bump copyright date on language files to 2023 Vas Crabb2023-02-191-1/+1
|
* Input refactoring: Vas Crabb2023-02-1810-345/+3360
| | | | | | | | | | | | | | | | | | | | | | | | | | osd/modules/input, emu/inpttype.cpp: Made most default joystick assignments supplied by input modules. Input modules take available controls into consideration when generating default assignments. emu/inpttype.ipp: Added a separate "Back" UI input separate from Cancel. You may want an easier to hit combination for moving to the previous menu than for exiting or cancelling input. They both default to Escape. emu/inpttype.ipp: Added a UI Help control. Currently only used by analog inputs menu emu/inpttype.h: Moved I/O port field type enum to its own header and sorted UI controls so they appear in a more logical order. ui: Don't use UI Select to restore defaults - people should be getting used to the UI Clear input by now. UI Select cycles multi-value items instead. ui/inputmap.cpp: Don't use immediate cancel to cycle between clearing and restoring default assignment (use UI Clear instead). osd: Reduced the number of files needing to include the dreaded emu.h. Got some implementation out of headers.
* -osd/windows/winutil.cpp: Better way to get module handle. Vas Crabb2023-02-121-1/+1
| | | | | | | * This was leftover support for Windows 2000 and earlier that hadn't been cleaned up. -atari: Don't forget your #include guards!
* Small batch of input refactoring: Vas Crabb2023-02-0511-42/+110
| | | | | | | | | | | | | | | | | | | | | emu/input.cpp: Fixed regression in display of some joystick inputs. osd/interface: Split up interface classes into a few more files to reduce where the input device interface class needs to be included. Made OSD independent of concrete input_device class. osd/modules/input, emu/inputdev.cpp, emu/ioport.cpp: Allow input devices to provide tokens for controls without standard item types and additional default input assignments. Fixes issues assigning Yen and Backslash on Japanese keyboards. ui/textbox.cpp: Added a fixed-content text box menu class for future use. Got main.h out of emu.h as it’s only used in a very small number of places, mostly for getting the application name. Added eminline.h to attotime.h as it's used without emu.h. Cleaned up forward declarations in emufwd.h a little.
* fix Clang compile [nw] Peter Ferrie2023-02-031-9/+9
|
* osd/modules/render/draw13.cpp: Fixed leaked/double freed texture data. Vas Crabb2023-02-041-16/+11
| | | | | The texture malloc's its own storage if the copy info doesn't have the passthrough flag set - the test was reversed.
* osd/render/draw13.cpp: Got rid of a simple_list. Vas Crabb2023-02-042-52/+46
|
* BGFX: Check window manager type returned by SDL. Vas Crabb2023-02-032-26/+62
|
* osd: Don't swallow text input with -keyboardprovider win32 (addresses GitHub ↵ Vas Crabb2023-02-031-1/+1
| | | | #7911).
* render/drawd3d.cpp: Fixed prescaling without HLSL - WRL COM pointer has some ↵ Vas Crabb2023-02-022-62/+61
| | | | | | surprises. Also added some additional error checking.
* bgfx: Refined configuration handling: Vas Crabb2023-02-024-62/+105
| | | | | | | | | | | | | * Sort screen chains by none, default, then collation order (rather than whatever order the filesystem yields). * Correctly persist settings across fullscreen toggle when explicit screen chains are configured. * If chains are specified for a single window only, apply them to all windows. * Treat empty string for screen chain as "default" rather than crashing. * Changed default setting for bgfx_screen_chains to an empty string so chain selection will be saved/restored per system with mame.ini file created by -cc with no other settings.
* osd: Fixed BGFX crash on toggling fullscreen on Linux. Vas Crabb2023-02-024-73/+149
| | | | Also fixed draw13.cpp upsetting older versions of clang.
* render/bgfx: Fixed texture object lifecycle issues. Vas Crabb2023-02-0211-195/+229
|
* font_sdl: better fix for variable-length array Patrick Mackinlay2023-02-011-1/+1
|
* font_sdl: avoid variable-length array Patrick Mackinlay2023-02-011-3/+2
|
* Use EQUIVALENT_ARRAY to avoid issues with std::size on member arrays, enable ↵ Vas Crabb2023-02-012-7/+4
| | | | warnings for VLAs in C++.
* osd/tools: msvc fixes Patrick Mackinlay2023-02-012-1/+2
| | | | | * xinput.h depends on windows.h * avoid use of non-standard variable-length arrays
* Implemented probe for D3D module to detect lack of D3D9 sooner. Vas Crabb2023-02-011-0/+12
|
* osd: Turned video modules into actual modules, fixed various issues. Vas Crabb2023-02-0157-2984/+3051
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't ignore the return status of OSD module initialisation. Attempt to fall back to an alternate module if the selected module fails to initialise. Log more useful diagnostic information at verbose level. Fixed BGFX crash on exit after toggling fullscreen. Also persist more settings than just the selected chains across toggling fullscreen. Turned video modules into OSD modules in the same sense as all the other OSD modules. They now use the same selection/fallback mechanism as all the other modules without special extra code in the OSD implementations. Untangled some object ownership mess. Windows own renderers, OSD objects own windows. Fixed a refrence loop that caused the first window object to always leak. Don't create renderer object until after underlying window has been created. Fixed issues with order of creation/destruction when toggling fullscreen or changing prescale in fullscreen with -switchres in SDL builds. Use more smart pointers in BGFX and Direct3D render modules. Most of the code now reutrns a smart pointer when handing over ownership or a naked pointer when retaining ownership. Fixed a few leaks and simplified cleanup code. Encapsulated various OSD modules better.
* render/bgfx: Fixed Linux build. Vas Crabb2023-01-292-3/+7
|
* render/bgfx: Got rid of a lot of unnecessary object copying during setup. Vas Crabb2023-01-2979-751/+777
|
* Major D3D and BGFX code refactoring and bug fixes: (#10858) [Ryan Holtz] MooglyGuy2023-01-29139-625/+1475
| | | | | | | | | | | * render/bgfx: Improved clearing and blending. Added prescale support. Fixes MT07586, MT07587, MT08084. * render/bgfx: Fixed blend and tint handling. (Fixes Github #1953). * render/bgfx/blendreader.cpp: Support non-separated blend mode specification for BGFX effects. * render/bgfx: Reworked how horizontally-padded screen textures are handled. Likely fixes MT08512 and MT08505. * render/bgfx: Ensure that a texture's width margin is updated in all cases. * render/d3d/d3dhlsl.cpp: Fixed tinting in HLSL post-processing mode. * render/d3d/d3dhlsl.cpp: Avoid most redundant state-setting calls. Reduces D3D API calls by about 90% on fruit machine drivers. * render/d3d/d3dhlsl.cpp: Assign SourceDims and QuadDims uniforms to only those effects that use them. * machine/laserdsc.cpp: Always add video quad to screen container, adjust tint based on m_videoenable instead.
* osd/modules/input: Fixed Linux build. Vas Crabb2023-01-292-3/+1
|
* Various input and OSD refactoring: Vas Crabb2023-01-2966-3209/+2964
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Miscellaneous fixes and refactoring: Vas Crabb2023-01-2815-205/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ui/analogipt.cpp: Fixed bar graph display for fields with ranges that wrap through zero. emu/inputdev.cpp: Separateed analog axis deadzone and switch threshold settings, reduced default deadzone, and fixed a potential division by zero if the deadzone and saturation settings are equal. emu/ioport.cpp: Fixed behaviour of absolute analog fields where range passes through zero - it previously only worked for specific combinations of mask, minimum and default. Removed a workaround from universal/getaway.cpp that is no longer necessary. emu/input.cpp: Fixed unintuitive behaviour when an absolute field is assigned an OR combination of a relative control folled by an absolute control (e.g. Mouse X or Joy 1 LSX). Also fixed reading axis input sequences where an axis code is followed by a switch code (these can only be produced by manually editing configuration files, not through MAME's UI), and fixed the returned type when multiple relative axes sum to zero. osd/modules/input_dinput.cpp: Fixed hat switches being stuck in up position when input is suspended in the background taito/taitoio_yoke.cpp: Give throttle control a distinct type, and don't auto-centre. osd: Added option to select MIDI provider module (currently only PortMidi and the dummy module are available). Also put various things in namespaces, and fixed builds including SDL sound module with native Windows OSD. emu/validity.cpp: Added check to catch I/O port fields using UI input types. emu/inpttype.ipp: Renamed inputs that were causing confusion. "Bill" and "Track" were causing confusion for translators and hence likely causing confusion for many users, especially those who are not native English speakers. "Track" as an abbreviation for "Trackball" was frequently being mistranslated, e.g. in the sense of a CD track selection button or even in the sense of a railway track. There's no reason to abbreviate it. "Bill" in the US English sense as a banknote is too ambiguous and was causing confusion for translators. It's better to use the less ambiguous "Banknote". Corrected Greek translations of "Trackball". Don't run GitHub Actions on issue template changes.
* Improve NTSC parameter descriptions and ranges in OSD (#10782) benrg2023-01-211-7/+7
| | | | | | Correct units of some parameters (they are MHz, not Hz) and correct one default (color carrier should be 3.57 MHz, not 35.7). Use a step size of 1/8800 MHz for the color carrier so that the NTSC value of 315/88 MHz can be exactly represented (to float precision).
* osd: Better scaling factors for XInput DJ Hero turntable dials. [DarkMoS] Vas Crabb2023-01-191-2/+2
|
* osd: Still more XInput rhythm game controller support for Windows: Vas Crabb2023-01-183-64/+317
| | | | | | * Added support for DJ Hero turntable controller. * Added support for Rock Band keyboard controller pedal. * Fixed pickup selector switch on guitar controllers.
* osd: Better XInput rhythm game controller support on Windows: Vas Crabb2023-01-181-54/+335
| | | | | | * Better support for extended controller type information. * Support for velocity sensitive six-drum controller. * Don't ignore button capabilites for keyboard controller.
* osd: Improved XInput guitar support and added XInput Rock Band keyboard support. Vas Crabb2023-01-181-217/+780
|
* osd: Added support for guitar and drum kit controllers via XInput. Vas Crabb2023-01-172-28/+102
|
* osd: Work around another observed invalid XInput capabilities report. Vas Crabb2023-01-151-2/+14
|
* -debugger/win: Cascade positions of new debugger windows. Vas Crabb2023-01-158-20/+122
| | | | | -osd: Better button names for NVIDIA Shield and Xbox One controllers with SDL game controller module.
* osd: I am officially incapable of keeping track of which OSD I'm working ↵ Vas Crabb2023-01-141-2/+2
| | | | with on each change (fix SDL build).
* osd: Added option to accept SDL game controller/joystick input when losing ↵ Vas Crabb2023-01-144-7/+15
| | | | UI focus.
* Hopefully fix SDL version detection macros for controller types. Vas Crabb2023-01-141-1/+5
|
* osd: Fixed constant name (helps to build the right OSD). Vas Crabb2023-01-141-3/+3
|
* osd: Recognise Joy-Con pairs with sdlgame input module. Vas Crabb2023-01-141-11/+16
|
* osd: Work around bad XInput capabilities report from Retro-Bit Saturn pad. Vas Crabb2023-01-141-7/+34
|
* osd: Added support for mapping files to sdlgame joystick provider and made ↵ Vas Crabb2023-01-144-134/+197
| | | | | | | | | | | | | | | | | 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.
* -osd: Improved SDL Game Controller joystick provider: Vas Crabb2023-01-132-178/+375
| | | | | | | | | * Allow fallback to joystick API for devices without game controller mappings. * Detect controller reconnection. * Force Switch Pro Controller ZL/ZR to act like buttons. * Added button names for Google Stadia controller. * Also fixed dumb copy/paste error on my part in Windows clipboard code.
* osd: Fixed names of DualSense controller buttons with SDL Game Controller ↵ Vas Crabb2023-01-131-3/+30
| | | | provider.
* osd: Fixed names of face buttons on Switch Pro Controller with SDL Game ↵ Vas Crabb2023-01-131-2/+2
| | | | Controller provider.
* osd: Include mapping string in verbose output when enumerating SDL game ↵ Vas Crabb2023-01-131-1/+11
| | | | controllers.
* -osd: Better XInput and SDL game controller input enhancements: Vas Crabb2023-01-126-429/+1371
| | | | | | | | | | | | | | | * Added initial support for XInput controller subtypes, starting with driving, arcade and flight controllers. * Check XInput capabilities to ignore buttons and hats that aren't present. * Added preliminary SDL Game Controller joystick provider. Reconnection and mixed Game Controller/Joystick devices are unsupported. * Show the input token for the highlighted control on input device menus. -ui: Allow menus to set required space above and below menu when metrics change. Fixes the initial bad layout on the system selecton menu, or bad layout after resizing windows.