Commit Graph

15 Commits

Author SHA1 Message Date
Vas Crabb
b67b969bf0 -Improved some Lua APIs:
* Moved several machine lifecycle callbacks to the notifier/subscriber
  model.  The old callback registration model is still available for
  them for now, but prints a deprecation warning.
* Added pre-save/post-load notifications.
* Use a single allocated timer rather than one anonymous timer per
  waiter.  Waiters no longer prevent saved states from being loaded.
* Clean up outstanding waiters on stop or state load rather than just
  leaking them.
* Started documenting parts of the emulator interface object that should
  be relatively stable.

-imagedev/avivideo.cpp: Fixed an object leak on unload.  Also changed
 some other media image devices to use smart pointers.
2023-04-07 06:20:40 +10:00
Vas Crabb
00f317b3d3 -ui/menu.cpp: Don't pass IPT_UI_BACK event to the implementation when dismissing the menu.
-plugins/autofire, plugins/inputmacro: Don't be so eager to create empty settings folders.
2023-03-23 03:39:54 +11:00
Vas Crabb
16e709ad82 plugins/autofire, plugins/inputmacro: Use clear_value to release I/O port fields. 2022-11-06 02:46:39 +11:00
Vas Crabb
de9ed12186 plugins: Reduced amnesia for autofire and inputmacro plugins.
Made autofire and inputmacro plugins capable of remembering settings if
the host input device for the binding is missing or if an input for a
slot device that isn't present is referenced.
2021-11-05 02:46:04 +11:00
Vas Crabb
6e355f86c8 frontend: Don't let the non-menus get as far as trying to draw. 2021-11-04 10:32:24 +11:00
Vas Crabb
8c6cb643e3 plugins: Simplify logic in autofire and inputmacro plugins to try and avoid leaking state across sessions. 2021-11-04 09:55:26 +11:00
Vas Crabb
d64ea5331b
-frontend: Refactored menu event handling and fixed a number of issues. (#8777)
* 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.
2021-10-31 12:31:16 +11:00
Vas Crabb
4601e60391 plugins: Use SPDX short identifiers for licenses in exports (more precise and easier to localise), use CC0 for hiscore plugin rather than CC0. 2021-10-25 01:57:07 +11:00
Vas Crabb
33f5ab983d -Cleaned up CI targets:
* Restricted Linux CI build to only run on changes to code,
  translations, software lists, and build scripts.
* Restricted Windows/macOS CO to only run on changes to code and build
  scripts.  They provide nothing over Linux for the other stuff.
* Added plugin properties and controller file validation to the "hash"
  workflow.
* Added a workflow for building documentation, so pull requests that
  affect documentation will at least get a basic check in advance.

-plugins/autofire: Bumped version as configuration format has changed.
2021-10-22 02:46:52 +11:00
Vas Crabb
0a9ea09a9a Tie up a few loose ends:
debugger: Octal cheats for octal address spaces.

frontend: Pass events for automatically generated menu items to the
plugin - they will have index zero.

frontend: Don't try calling the data plugin from the main menu if the
system isn't starting yet - doing so will prevent the data plugin from
loading at all.
2021-10-20 02:03:43 +11:00
Vas Crabb
9e36b6a6d9 More Lua interface cleanup - it's simpler with cleaner underlyng APIs.
Made the sound manager mute controls readable, and got rid of system
enable since it just controls system mute anyway.  This was causing
confusion: phantom2 was trying to use both independentlyt casuing the
mute bit to be ignored.

THe Lua interface changes are mostly changing methods to properties,
some renames to make things clearer, and some additional properties for
better control over snapshots.
2020-12-27 01:32:37 +11:00
cracyc
0ec88f2ff7 plugins/autofire: permit input sequences (nw) 2019-11-20 22:35:13 -06:00
Jack Li
2da86cda04 Change autofire config directory to homepath (#5129)
* Revert "Used set_folder to avoid hardcoding plugin name in settings path"

This reverts commit 76884986fd8630f81cfc838aa42f264fdcec2ea9.

* Changed autofire config directory to homepath

* Bumped autofire plugin version
2019-05-30 14:31:57 -04:00
Jack Li
27f66693c5 Autofire plugin: Save/load fixes (#5093)
* Fixed bugs related to reloading roms

Soft resets would reload autofire settings without saving them first, causing the settings to be lost. This commit adds a check to only reload from the settings file if loading a different rom than before.

Hard resets would leave bad references lying around, causing MAME to crash under certain circumstances (i.e. resetting while in the edit menu and entering the menu again). This commit makes sure to properly clean up and reinitialize menu and button states when resetting.

* Used set_folder to avoid hardcoding plugin name in settings path

* Bumped autofire plugin version
2019-05-21 18:44:44 -04:00
Jack Li
0040650300 Add plugin for autofire (#5050)
* Hardcoded autofire plugin

* Changed register_frame to register_frame_done, removed pause check

* Added support for multiple buttons loaded from a file

* Implemented saving settings on quit

* Fixed multiple keybindings for same button from overwriting each other

* Replaced double-quotes with single-quotes

* Refactored saving/loading into a separate module

* Changed button format to use input_code rather than string token

Settings format is unchanged (still saved as string token).

* Rewrote table initialization in save/load

* Implemented menus

* Added helper messages for "on frames"/"off frames"
2019-05-14 10:26:27 -04:00