summaryrefslogtreecommitdiffstatshomepage
path: root/plugins/timer/init.lua
Commit message (Collapse)AuthorAgeFilesLines
* -Improved some Lua APIs: Vas Crabb2023-04-071-4/+7
| | | | | | | | | | | | | | | | * 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.
* Lua engine improvements (#9453) Vas Crabb2022-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | Made auto-boot script errors and plugin bootstrap errors fatal. Run auto-boot scripts in a sandbox. Globals can be accessed, but not set. The sandbox is cleared on hard reset, but not on soft reset. Added (hopefully) useful to string metafunctions to device_t and address space that show short names and tags. Fixed issues in plugins that surface when strict type checking is enabled, as this means numbers and nil are not automatically converted to strings. Plugins should be tested with debug builds to check for this. Made save item read_block raise an error on invalid arguments rather than returning an empty string, and made it use luaL_buffer directly rather than using the helper wrapper. Changed some more function bindings to use set_function to avoid issues related to ThePhD/sol2#608, and got rid of some unnecessary lambda captures.
* plugins: Work around menu not remembering selection when ref is nullptr. Vas Crabb2021-11-081-1/+3
|
* plugins: Rewrote timer plugin fixing multiple issues. Vas Crabb2021-11-061-82/+44
| | | | | | | | | | | | | | | | | | | | Added emulated time recording as well as wall clock time. Fixed recording time for multiple software items per system. An incorrect constraint on the database table meant that time was only being recorded for a single software item per system. Detect the "empty" driver so the time spent at the selection menu isn't recorded (you'd get multiple entries for this due to the way options leak when returning to the system selection menu). Included schema migration code to update existing timer plugin databases. Also replaced some unnecessary floating point code with integer maths, added log messages, and made the plugin unload unload its database access code during emulation. Changed other plugins' use of paths with trailing slashes as this causes stat to fail on Windows.
* -frontend: Refactored menu event handling and fixed a number of issues. (#8777) Vas Crabb2021-10-311-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* plugins: Use SPDX short identifiers for licenses in exports (more precise ↵ Vas Crabb2021-10-251-1/+1
| | | | and easier to localise), use CC0 for hiscore plugin rather than CC0.
* plugins/timer: Fixed ticking when menu is left on the screen. Vas Crabb2021-10-221-5/+11
|
* Tie up a few loose ends: Vas Crabb2021-10-201-7/+4
| | | | | | | | | | | 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.
* Mostly revert "Create console history file in homepath (#8026)" Vas Crabb2021-05-071-2/+2
| | | | | | The change to make the console plugin work is preserved. This reverts commit 25137717c9392d142650fcd679b09c400a2f5c4a.
* Create console history file in homepath (#8026) Szunti2021-05-031-2/+2
| | | | | | | | | | | * Fix console history path, homepath is a core option * Create missing directories recursively in lua plugins. * Add lfs to global environment in a less magical way. require normally doesn't bind the name globally just returns the module, mame sets a preloader that does bind lfs globally, but maybe it's less surprising to do it explicitly
* More Lua interface cleanup - it's simpler with cleaner underlyng APIs. Vas Crabb2020-12-271-1/+1
| | | | | | | | | | | 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.
* plugins: Replace environment variable substitution function with core version AJR2020-12-081-1/+1
|
* plugins: gettextify localizable strings (nw) cracyc2017-09-031-4/+4
|
* srcclean (nw) Vas Crabb2016-11-271-11/+11
|
* added OPTION_HOMEPATH to point to read/write folder,for now used by LUA ↵ Miodrag Milanovic2016-11-121-2/+3
| | | | | | scripts (nw) Copied all needed files so plugins could be started under UWP
* stupid copy/paste (nw) Miodrag Milanovic2016-11-081-1/+0
|
* Made timer plugin use sqlite3 (nw) Miodrag Milanovic2016-11-081-31/+41
|
* srcclean on lua plugins, too Vas Crabb2016-08-301-1/+1
|
* plugins/timer: don't fail if file is corrupt (nw) cracyc2016-04-241-0/+6
|
* luaengine: make flags explicit (nw) cracyc2016-04-091-6/+6
|
* plugins/timer: add play count (nw) cracyc2016-04-081-3/+10
|
* plugins/timer: save to the correct file (nw) cracyc2016-04-081-12/+23
|
* oops++ (nw) cracyc2016-04-071-2/+2
|
* plugins/timer: add sample plugin for game time [Carl] cracyc2016-04-071-0/+75