summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/input/input_sdlcommon.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Patched up some gaps in functionality and fixed some bugs. Vas Crabb2022-09-021-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ui: Added some missing functionality: * Added an option to copy input device IDs to the relevant menus. * Added an item for setting the software lists files path (-hashpath) to the folder setup menu. * Allow pasting text from clipboard in most places that allow typing (searching, entering filenames, entering barcodes). * Changed the software selection menu heading to be a bit less misleading. * Made barcode menu less eager to rebuild itself unnecessarily, and removed some confusing and apparently pointless code. Exposed more Lua bindings: * Added low-level palette objects. * Added indexed bitmap types. * Added a bitmap method for extracting pixels from a rectangular area as a packed binary string. * Changed screen device pixels method to return width and height in addition to the pixels. osd: Added some functionality and cleaned up a little: * Added a function for copying text to the clipboard. * Moved function for converting Windows error codes to standard error conditions to winutil.cpp so it can be used from more places. * Removed duplicate declaration of osd_get_clipboard_text and made the function noexcept (including fixing implementations). * Made macOS implementation of osd_get_clipboard_text skip the encoding conversion if it finds UTF-8 text first. * Changed the default -uimodekey setting so it doesn't lose the "not shift" that stops the default from interfering with UI paste. Various bug fixes: * util/unicode.cpp: Fixed the version of utf8_from_uchar that returns std::string blowing up on invalid codepoints. * util/bitmap.h: Fixed wrapping constructors for indexed bitmaps taking the wrong parameter type (nothing was using them before). * util/bitmap.cpp: Fixed potential use-after-free issues with bitmap palettes. * emu/input.cpp, emu/inputdev.cpp: Log 1-based device numbers, matching what's shown in the internal UI and used in tokens in CFG files. * emu/emumem.cpp: Added the bank tag to a fatal error message where it was missing. docs: Reworked and expanded documentation on configuring stable controller IDs. For translators, the changes are quite minor: * There's a menu item for copying a device ID to the clipboard, and associated success/failure messages. * There's the menu item for setting the software list file search path. * One of the lines in the software selection menu heading has changes as it could be interpreted as implying it showed a software list name.
* input_sdlcommon.cpp: Move devmap_init down into class AJR2022-06-181-4/+46
|
* osd/modules/input: Detect joystick reconnection with SDL. (#9605) Vas Crabb2022-04-241-1/+1
| | | Also improved display name scheme for joystick axes and buttons.
* -frontend: Refactored menu event handling and fixed a number of issues. (#8777) Vas Crabb2021-10-311-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Moved common code for drawing about box, info viewer, and other text box menus to a base class; removed the last of the info viewer logic and the multi-line item hack from the base menu class. * Added previous/next group navigation for general inputs and plugin input selection menus. * Moved message catalog logic to lib/util, allowing osd and emu to use localised messages. * Made the base menu class use the UI manager’s feature for holding session state rather than a static map and mutex. * Improved menu event handling model, and fixed many issues, particularly with menus behaving badly when hidden/shown. * Added better support for menus that don’t participate in the usual menu stack, like the menuless sliders and the save/load state menus. * Made a number of menus refresh state when being shown after being hidden (fixes MT08121 among other issues). * Fixed indication of mounted slot option in the slot option details menu. * Improved appearance of background menus when emulation isn't running - draw all menus in the stack, and darken the background menus to make the edges of the active menu clearer. * Fixed locale issues in -listxml. -debugger: Made GUI debuggers more uniform. * Added new memory view features to Win32 debugger. * Fixed spelling of hexadecimal in Cocoa debugger and added decimal address option. * Fixed duplicate keyboard shortcut in Cocoa debugger (Shift-Cmd-D was both new device window and 64-bit float format). * Made keyboard shortcuts slightly more consistent across debuggers. -plugins: Moved input selection menu and sequence polling code to a common library. Fixed the issue that prevented keyboard inputs being mapped with -steadykey on. -docs: Started adding some documentation for MAME's internal UI, and updated the list of example front-ends. -Regenerated message catalog sources. For translators, the new strings are mostly: * The names of the inputs provided by the OS-dependent layer for things like fullscreen and video features. These show up in the user interface inputs menu. * The names for automatically generated views. These show up in the video options menu - test with a system with a lot of screens to see more variants. * The input macro plugin UI. * A few format strings for analog input assignments. * A few strings for the about box header.
* frontend: Keep cleaning up. Vas Crabb2021-10-111-4/+0
| | | | | | | | | | | | | | | | | | | Got rid of one of the UI audit inputs. There only needs to be one, and the options can be presented in the confirmation menu. Two secret keystrokes is too confusing. Also got rid of the long-obsolete UI Toggle Debugger input. Added audit media button to the toolbar so it's a bit less opaque, and it can be accessed with a mouse/trackball (not just by knowing the key mapping). Made default I/O port names localisable. Made autofire plugin save port fields using the { port, mask, type } tuple, the same way MAME does. Unfortunately this will break existing autofire configuration, but it should be more stable going forward. Added some more UI keys to the default key mappings documentation.
* -A few incremental UI code improvements: Vas Crabb2021-03-121-23/+13
| | | | | | | | | * Simplified message when toggling UI controls. * Show actual configured UI toggle key, not misleading hard-coded text. * Push window activated/deactivated events to UI manager. * Simplified SDL window event handling code - events are pretty precise. -Miscellaneous code cleanup.
* Add "Non-Integer Scaling" and "Keep Aspect" settings to UI video options ↵ AJR2020-12-171-10/+0
| | | | menu and remove SDL hotkeys for same
* Fix most implicit fallthrough warnings from clang Vas Crabb2020-11-171-1/+1
|
* use C++ library includes (nw) firewave2020-01-221-2/+2
|
* UI input menu: treat codes containing a postive and negative of the same ↵ Vas Crabb2019-11-211-1/+1
| | | | | | | | thing as invalid (e.g. A S not A) ioport.cpp: * better than 50% reduction in compile time, and better locality for static data * better encapsulation, const correctness and noexcept usage
* Fix debug assert failure when using SDL fullscreen toggle (nw) AJR2018-08-061-1/+2
|
* Change window handle storage to template instead of void* (nw) (#1725) Brad Hughes2016-11-171-1/+1
| | | | * Change window handle storage to template instead of void* (nw)
* srcclean and translation regeneration Vas Crabb2016-08-291-1/+1
|
* osd input code cleanup (nw) Brad Hughes2016-08-221-13/+20
|
* Remap "P1 Mahjong Score" to / key for OS X AJR2016-08-091-0/+8
|
* Move window_list to osd_common_t Brad Hughes2016-06-111-1/+1
|
* Unify window_list in Windows and SDL OSD Brad Hughes2016-06-101-2/+2
|
* RIP sdlinc.h couriersud2016-05-061-1/+1
|
* Revert "Temp revert of Brad changes (nw)" Miodrag Milanovic2016-04-251-5/+6
| | | | This reverts commit 5e831f6506ee06f8c30cb113551ee0fec53804db.
* Temp revert of Brad changes (nw) Miodrag Milanovic2016-04-251-6/+5
|
* Various cleanups suggested by static analyzer (nw) Miodrag Milanovic2016-04-241-3/+3
|
* Split UI and frontend part from core [Miodrag Milanovic] Miodrag Milanovic2016-04-231-1/+1
|
* Refactor OSD window. Brad Hughes2016-04-211-5/+6
| | | | | | | | | | Unified renderer in osd_window as std::unique_ptr Made windows all std::shared_ptr<window_type> Made window lists std::list<std::shared_ptr<window_type>> Updated OSD SDL worker_param to not use malloc (not compatible with smart pointers) Made renderer pointer to window a weak reference. May not be available during destruction of the window.
* Standardize platform window pointer storage in osd_window. Brad Hughes2016-04-181-1/+1
| | | | Also encapsulate show/hide capture/release cursor functionality.
* Add AVI writing to bgfx, nw therealmogminer@gmail.com2016-04-171-1/+8
|
* Iterate over core classes C++11 style AJR2016-03-311-25/+24
| | | | | | | | C++11 range-based for loops can now iterate over simple_list, tagged_list, core_options, device_t::subdevice_list, device_t::interface_list, render_primitive_list and all subclasses of the above, and much code has been refactored to use them. Most core classes that have these lists as members now have methods that return the lists themselves, replacing most of the methods that returned the object at an owned list's head. (A few have been retained due to their use in drivers or OSD.) device_t now manages subdevice and interface lists through subclasses, but has given up the work of adding and removing subdevices to machine_config. memory_manager has its tagged lists exposed, though the old rooted tag lookup methods have been removed (they were privatized already).
* Cleanups and version bump Miodrag Milanovic2016-03-301-1/+1
|
* Handle a couple more SDL window events to track focus in input module. Brad Hughes2016-03-191-0/+5
|
* Fix SDL input focus tracking bug plus remove references to USE_OLD_SDL_INPUT ↵ Brad Hughes2016-03-191-3/+10
| | | | compiler directive from the input refactor.
* Refactor OSD input into modules Brad Hughes2016-02-281-0/+283