summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/sdl
Commit message (Collapse)AuthorAgeFilesLines
* Cleaned up unsupportable legacy stuff: Vas Crabb2026-04-061-22/+1
| | | | | | | | | | | | | | | | | | | | cpu/drcbex86.cpp: Removed i686 recompiler back-end. Without a practical way to make Windows i686 builds, it's just going to rot. Also, x86-64 is now older than Pac-Man was when MAME was initially created. It's dead on the desktop tools: Removed aueffectutil - it's no longer useful. emu/video/rgbutil.cpp: Removed Altivec/VMX bilinear filtering implementation. PowerPC on desktop is dead. file/posixptty.cpp, sdl, sdl3, scripts: Removed support for SysV operating systems. They’re dead on the desktop. scripts: Removed outdated Lua compatibility macros. They weren't doing anything sice we updated to Lua 5.4 (the compatibility options changed, but we just left the old macros in place, which no longer had any effect).
* osd/sdl: process events after raising window on macOS to ensure input focus ↵ Matt Furniss2026-03-221-1/+11
| | | | | | | | | | | (#15132) On macOS, the window may not have acquired input focus by the time SDL_RaiseWindow returns. Pumping events after raising ensures the FOCUS_GAINED event is dequeued and m_focus_window is set before the input modules start polling, preventing the intermittent loss of keyboard and mouse input on startup. Fixes mamedev/mame#10612
* Initial support for SDL3. [R. Belmont, Vas Crabb] arbee2026-02-071-1/+1
| | | | | | | | | * SDL3 is the default for macOS targets. Linux/Windows can build with OSD=sdl3 while we wait for better distro support for SDL3. Both X11 and Wayland sessions are fully supported on Linux. * SDL3 -sound=sdl supports both input and output. All other video, sound, and input functionality should otherwise be the same for now. SDL 3.4+ multiple keyboard/mouse support is planned.
* Made PTR64 a makefile-only thing - it isn't necessary in the code. Vas Crabb2025-04-201-1/+0
|
* Natural keyboard improvements AJR2024-12-041-1/+3
| | | | | | | - NUL is no longer a reserved character, and PORT_CHAR(0) is meaningful now. The ioport_field structure now uses a reserved Unicode character rather than 0 as a filler. - PORT_CHAR() with no arguments (formerly illegal) may be used to skip over shift positions that produce no useful codes. * ioport.h: Use the empty string rather than nullptr as default tag for ioport_condition. (ioport_condition::operator== was blindly passing the null pointers to strcmp.)
* osd/windows, osd/sdl: Only check for hold/drag conversion on losing pointer ↵ Vas Crabb2024-11-181-1/+1
| | | | if it hasn't already happened.
* sdl/window.cpp: Remove assert(0 <= info->clickcnt) (#12951) ajrhacker2024-11-151-3/+1
|
* -osd: Update slider list on demand rather than on frame updated (fixes MT08857). Vas Crabb2024-04-272-28/+0
| | | | -konami/konamigq.cpp: No need to cancel a newly allocated timer.
* input/input_sdl.cpp: Added an SDL lightgun provider. Vas Crabb2024-04-262-0/+3
| | | | | | | | | | This does essentially the same thing as the Win32 lightgun provider, mapping the absolute pointer position over the window to gun axes. Also added a bunch of const in the windows input handling code. docs: Bumped version, as features that are not in a releaesd version of MAME are now documented.
* -midway/williams.cpp: Cleaned up ROM loading for Defender hardware, further ↵ Vas Crabb2024-04-191-1/+0
| | | | | | simplified class hierarchy. -osd/sdl/video.cpp: Fixed a class memory access warning (osd_window_config initialises all members to zero in constructor).
* Initial touch input support: Vas Crabb2024-04-126-103/+604
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Feed mouse/pen/touch pointer events through UI input manager with Win32 and SDL. * Started migrating UI code to use new API and reworking mouse/touch interaction. * emu/render.cpp: Support pressing multiple clickable layout items simultaneously. * emu/render.cpp: Allow UI elements to be drawn in any window. * emu/rendlay.cpp, luaengine_render.cpp: Added layout view events for pointer input. * ui/ui.cpp: Allow the UI handler to control pointer display. * ui/analogipt.cpp: Added mouse/touch and more keys for navigating field state list. * ui/menu.cpp: Use vertical swipe to scroll and horizontal swipe to adjust. * ui/menu.cpp: Draw after processing input - greatly improves responsiveness. * ui/menu.cpp: Ignore keyboard/gamepad input during pointer actions. * ui/selmenu.cpp: Made left/right info pane arrows repeat when held. * ui/selmenu.cpp: Use middle click to move keyboard focus. * ui/selmenu.cpp: Let filter list scroll if it's too tall, and use a bit of horizontal padding. * ui/selmenu.cpp: Improved divider sizing. * ui/state.cpp: Don't allow clicks to pass through the confirm deletion prompt to the menu. * ui/simpleselgame.cpp: Fixed error message display and graphics/sound status not showing. * ui/simpleselgame.cpp: Allow tap/click to dismiss error message. * ui/utils.cpp: Show UI for choice filters when there are no choices - it's less confusing. * modules/input/input_sdl.cpp: Made scaling for mouse scroll better match RawInput and DirectInput. * modules/input/input_rawinput.cpp: Added support for horizontal scroll axis. * modules/input/input_win32.cpp: Added support for scroll axes and more buttons to mouse/lightgun. * modules/debugger/debugimgui.cpp: Don't fight over events with the UI manager - it breaks menus. * osd/windows/window.cpp: Translate mouse position to window cooridinates for scroll wheel events. * osd/sdl/window.cpp: Supply last mouse position for scroll wheel events if possible. * scripts/build/complay.py: Made zero input mask an error - it was only being used to block clicks.
* -osd/mac, osd/sdl: Show prescale popup when it hasn't changed due to hitting ↵ Vas Crabb2024-02-181-1/+1
| | | | | | | | | the limit. * This makes it easier to see that you’ve hit the limit and MAME isn't just ignoring your keystrokes. -emu/inpttype.ipp: Restored tabulation.
* sdl modify_prescale: don't indicate max value hap2024-02-171-1/+1
|
* osdsdl: move prescale keys from ctrl+f6/f7 to alt+f8/f9 hap2024-02-172-16/+16
|
* - osd sdl default keys: remove ctrl-blocks on f3 and f4, move opengl filter ↵ hap2024-02-161-31/+16
| | | | | | | from lctrl+f5 to lalt+f10, - osd windows default keys: move post processing key from lctrl+lalt+f5 to lalt+f10, - mame default keys: move rewind step from shit+tilde to shift+f4, move cheat from shift+f6 to shift+f8, move quick save/load from (none) to shift+f6/f7
* Fixed OSD interaction with updated default keys. [R. Belmont] arbee2024-02-131-5/+10
|
* render/drawbgfx.cpp: Added initial support for Wayland on Linux. (#11451) Julian Sikorski2023-09-291-4/+0
|
* osd/sdl: Don't specify SDL_WINDOW_BORDERLESS for full-screen windows. (#11546) Davidian10242023-09-121-1/+1
| | | May address GitHub #7532 and #7922.
* osd/sdl: Fixed interpretation of result of SDL_GetDesktopDisplayMode. (#11547) Davidian10242023-09-121-2/+2
| | | Fixes display mode not being printed.
* osd/mac, osd/sdl: Really inhibit full screen toggle in debug mode to prevent ↵ AJR2023-05-231-2/+2
| | | | accidental crashes
* Skeleton driver for 600 Cellular Activation Tester (#11225) MooglyGuy2023-05-131-1/+1
| | | | | | | | | | | | | | | | | * New systems marked not working ------------------------------ 600 Cellular Activation Tester [Ryan Holtz, Leo Romo] -m6801.cpp: Fixed HD6303R to use an internal map, removed internal-only handlers from associated drivers. [Ryan Holtz] -video.cpp: Raised maximum prescale value to 20 to account for very small LCDs. [Ryan Holtz] -screen.cpp: Replaced old MCFG_ references in a warning message with member function names. [Ryan Holtz] * -timekpr: Added Dallas DS1643, a clone of the STMicro M48T58. [Ryan Holtz]
* cpu/nec: Fixed build; also, srcclean Vas Crabb2023-03-261-1/+1
|
* osd/modules/input: Always use DirectInput with desktop window in background ↵ Vas Crabb2023-02-281-0/+2
| | | | | | | | | | | | | | | | | | | mode. There are multiple issues with what MAME was doing, but the most glaring is that it violates the DirectInput interface contract that requires the window associated with an open device must not be destroyed. See documentation for IDirectInputDevice8::SetCooperativeLevel: "This parameter must be a valid top-level window handle that belongs to the process. The window associated with the device must not be destroyed while it is still active in a DirectInput device." The previous code also prevented DirectInput controllers from working when using multiple windows if any window other than the first window had focus. Also fixed SDL builds not correctly recognising when all windows lose focus, and save state menu not appearing.
* Removed local copy of SDL source and update Android build support. (#10899) Miodrag Milanović2023-02-272-0/+14
| | | | | | | | | * Removed SDL2 source. * Updated gradle. * Updated SDL2 Java support glue code. * Increased minimum supported Android API version to 24. * Updated required asset files for Android app. * Added proper tag for Android logging. * Added SDL2 hint to make BGFX work on Android.
* osd/sdl: Do not raise fatal error on -video auto -videodriver wayland. (#10924) Julian Sikorski2023-02-261-1/+1
|
* Update accumulating relative inputs exactly once per frame. Vas Crabb2023-02-242-3/+3
| | | | | | | | | | | | | This fixes "amplification" effects that would happen if the frame rate rose above 100 Hz (whether by unthrottling or otherwise). Synchronise with wall clock any time inputs are read. Not doing this has weird effects on relative inputs with frame skipping and contributes to unresponsiveness of menus. Reduce visual latency for mouse movement on menus when paused or skipping frames. The rest of the code changes to menus won't provide benefits until draw can happen after event handling.
* osd: Cleaner way of dealing with input updates. Vas Crabb2023-02-233-5/+1
|
* osd: Don't pump events when reading inputs. Vas Crabb2023-02-232-11/+1
| | | | | | 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.
* osd: Removed support for SDL < 2.0.6; apple/apple2video.cpp: Code style ↵ Vas Crabb2023-02-211-22/+0
| | | | cleanups.
* Input refactoring: Vas Crabb2023-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Small batch of input refactoring: Vas Crabb2023-02-051-1/+0
| | | | | | | | | | | | | | | | | | | | | 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.
* osd: Fixed BGFX crash on toggling fullscreen on Linux. Vas Crabb2023-02-021-0/+3
| | | | Also fixed draw13.cpp upsetting older versions of clang.
* osd: Turned video modules into actual modules, fixed various issues. Vas Crabb2023-02-015-305/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Various input and OSD refactoring: Vas Crabb2023-01-298-568/+1149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-152-35/+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.
* Clean up #includes in src/osd (#10029) ajrhacker2022-07-043-5/+5
| | | | | * Clean up #includes in src/osd * render/bgfx/view.cpp: Add license header
* 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
|
* srcclean and manual tidying up in preparation for 0.242 release Vas Crabb2022-03-271-6/+6
|
* sdl/window: add error retval check for bgfx on fallback hap2022-03-251-3/+3
|
* sdl/window: fix possible compile problem with init fallbacks hap2022-03-171-3/+5
|
* Updated BGFX fixes; verified as working on Linux and Windows. (#9420) MooglyGuy2022-03-151-13/+41
| | | | | | | * -bgfx: Improved stability when encountering missing files, and improved multi-window stability. [Ryan Holtz] * -osd: Added video-init fallback functionality to other OSDs. [Ryan Holtz] * -bgfx: Fixed issues from the previous batch of changes. [Ryan Holtz] * -osdwindow: Remove no-longer-needed addition of post_create(). [Ryan Holtz]
* Revert "More BGFX stability improvements (missing files + multi-window) (#9410)" Vas Crabb2022-03-161-41/+13
| | | | This reverts commit f5b75b74393646d1dc082ec807279451dc481854.
* More BGFX stability improvements (missing files + multi-window) (#9410) MooglyGuy2022-03-141-13/+41
| | | | | * -bgfx: Improved stability when encountering missing files, and improved multi-window stability. [Ryan Holtz] * -osd: Added video-init fallback functionality to other OSDs. [Ryan Holtz]
* sdl: Keep -video soft as the default for Emscripten for now Justin Kerk2022-02-191-0/+4
|
* sdl: -video auto now means "bgfx" on all platforms. [R. Belmont] arbee2022-02-181-6/+0
|