summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame/luaengine_input.cpp
Commit message (Collapse)AuthorAgeFilesLines
* -util/corealloc.h: Reduced make_unique_clear to a single variant for POD arrays. Vas Crabb2022-04-031-0/+10
| | | | | | | | | | | | | | | | | | * Enabled GCC lifetime dead store elimination optimisation. * emu/device.h: Don't pre-clear memory for drivers. Ivan Vangelista fixed at least the majority of things that crashed outright, and Robbbert initialised variables that coverity complained about. It's unlikely anything will break due to this. * sound/discrete.h: Explicitly initialise members of discrete "devices" to zero. I don't see a way around doing this in headers due to the macro soup used to build the constructors. * sound/mos6581.cpp: Moved creation of the SID core to device_start and explictly initialised members of the SID core structures. These structures are in internal headers, so they won't cause downstream recompiles. -Lua engine: Made I/O port manager type_seq a bit more tolerant of omitted arguments.
* emu/devcb.h: Cleaned up a little using C++17 type traits helpers. Vas Crabb2022-02-281-6/+10
| | | | | Also made Lua I/O port field sensitivity nil for digital fields and put in some more const.
* Lua engine: Make setting analog I/O port field values user-friendly. (#9322) feos2022-02-281-0/+11
| | | | | Exposed minimum/maximum values for analog fields. together with defvalue, they can be used to check range of values and neutral position. Previously you had to send a normalised value between -65535 and 65535 which would be scaled depending on machine specifics. You could read the scaled value from the port, but you couldn't send scaled values in. This allows scripts to set scaled values as seen by the machine.
* Clean up various loose ends: Vas Crabb2022-02-031-5/+26
| | | | | | | | | | | | | | | | | | | | | frontend: Exposed debug symbol tables and parsed expressions to Lua (these can be used when the debugger is not active). Also made it simpler to walk input types. imagedev/bitbngr.cpp: Added software list loader support (used by sitcom). sitcom.cpp: Replaced bankdev with a memory view. Also added a bar graph for the timer DAC output, and made the DL1414 displays squarer in the layout like they are in real life. They still don't look right because the internal segment drawing code doen't draw the segments the right width. docs: Fixed broken links and added missing links in command line options index. Also removed documentation for an option that no longer exists and fixed some inconsistent terminology. Separated includes by module in various drivers.
* -emu/ioport.cpp: Fixed some default setting handling issues. Vas Crabb2021-11-041-15/+34
| | | | | | | | | | | | | | | | | | | | | | * Issues were unlikely to actually manifest unless you use controller configuration files to change specific system input defaults. -src/emu/output.h: Added size accessor to multi-element output finder. * std::size will work on the top rank of an outut finder now. Sorry for hitting emu.h again so soon. -lua: Exposed a couple more input related things. * Exposed constructor and a few methods on input_seq required for scripts to properly clear assignments or restore default settings. * Exposed ioport_manager::set_type_seq which is required to configure general input assignments properly. * Removed unnecessary use of sol::overload in favour of optional parameters. * Updated documentation and also fixed a few errors. -docs: Added description for axis setting assignments.
* -emu/ioport.cpp: Fixed "MAME lost my joystick settings!!!1!11! Vas Crabb2021-11-031-0/+6
| | | | -plugins: Gave the timecode plugin an option to count emulated frames.
* plugins: Moved the timecode recording functionality to a plugin. Vas Crabb2021-11-021-1/+1
|
* API cleanups and miscellaneous fixes. Vas Crabb2021-07-151-1/+1
| | | | | | | | | | | | | | | | emu/ioport.cpp: Allow controller files to override input sequences for inputs that don't use defaults, and to override the toggle setting for digital inputs. emu/config.cpp: Expose configuration level (mostly matters for controller files), improved verbose diagnostic messages, and moved a few things out of the global and preprocessor namespaces. docs: Added documentation for some controller configuration file features. The device mapping feature documentation will be merged in at some point. util/unicode.cpp, emu/input.cpp: API cleanups.
* input.cpp, inputdev.cpp: Convert a few more functions to use std::string_view AJR2021-02-031-1/+1
|
* natkeyboard: Remove from ioport_manager AJR2020-12-261-1/+0
|
* Expose a couple more things to Lua so the plugins can show the actual key ↵ Vas Crabb2020-12-271-5/+25
| | | | mapped to UI clear.
* Lua engine: fix a dumb copy/paste error and an unused lambda capture from ↵ Vas Crabb2020-12-161-1/+1
| | | | previous commit.
* -Lua cleanup and documentation migration checkpoint. Vas Crabb2020-12-161-213/+35
| | | | | | | | | | | | | | | | | | | | * Cleaned up some more of the Lua inteface. Mostly replacing methods with properties, some consistency fixes, a few renames, some more exposed functionality, and a couple of properties that have no business being set from scripts made read-only. * Moved a lot more Lua documentation out of source comments into the documentation, and expanded on it in the process. * Got more UI code out of the input manager. * Changed input sequence poller to a polymorphic class where you specify your intention upfront. * Changed the cheat plugin to use UI Clear to clear hotkey assignments and leave them unchanged if the user starts assignment but doesn't press any switches. * Ported AJR's fix for over-eager double-click recognition from SDL to Windows OSD. -goldnpkr.cpp: Cleaned up inputs, using standard keyout and payout types and key assignments.
* -luaengine.cpp: Clean up render classes and expose screen image adjustments. Vas Crabb2020-12-131-22/+1
| | | | | | | | | | | | | | | | | | | | | * Started moving Lua class reference to docs. Expecting people to find the class reference material in the source isn’t going to help make it approachable. The docs allow longer explanations, better formatting, and cross reference links. * Added another layout scripting example to the docs. -goldnpkr.cpp: Minor clean-up. * Improved the short names for Witch Card and Witch Game clone sets. * Made Witch Up & Down artwork clickable. * Added working Video Klein sets where the parent is a working Video Klein set to the tiny subtarget. * Removed history from the header comment - we have version control for a readon.
* luaengine_input.cpp: Fix clang error: lambda capture 'this' is not used ↵ AJR2020-12-081-1/+1
| | | | [-Werror,-Wunused-lambda-capture]
* -Lua engine cleanup, input edition: Vas Crabb2020-12-091-220/+415
| | | | | | | | | | | | | | | | | | | * Modernised and cleaned up Lua bindings for input classes. * Exposed the input_sequence_poller class to Lua and updated the autofire and cheat plugins to use it, rather than continuing to pretend it's part of the input manager. * Exposed more of the natural keyboard manager, including the ability to enable/disable individual keyboard and keypad devices like you can from the keyboard mode menu. * Exposed a few more things on ioport_port and input_device. -plugins/cheat: Fixed menu item not updating visually when disabling a cheat with UI Left. -plugins/cheatfind: Fixed not finding the first screen after screen enumerator was exposed as an object rather than using a table. -bwidow.cpp, pacman.cpp: Minor cleanup to recent changes.
* Expose enough of the layout system to Lua to allow position and colour to be ↵ Vas Crabb2020-12-051-1/+1
| | | | animated.
* frontend: split lua_engine user type registrations across a few files to ↵ Vas Crabb2020-11-161-0/+441
make it a bit more manageable