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/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.
ui/analogipt.cpp: Fixed bar graph display for fields with ranges
that wrap through zero.
emu/inputdev.cpp: Separateed analog axis deadzone and switch threshold
settings, reduced default deadzone, and fixed a potential division by
zero if the deadzone and saturation settings are equal.
emu/ioport.cpp: Fixed behaviour of absolute analog fields where range
passes through zero - it previously only worked for specific
combinations of mask, minimum and default. Removed a workaround from
universal/getaway.cpp that is no longer necessary.
emu/input.cpp: Fixed unintuitive behaviour when an absolute field is
assigned an OR combination of a relative control folled by an absolute
control (e.g. Mouse X or Joy 1 LSX). Also fixed reading axis input
sequences where an axis code is followed by a switch code (these can
only be produced by manually editing configuration files, not through
MAME's UI), and fixed the returned type when multiple relative axes sum
to zero.
osd/modules/input_dinput.cpp: Fixed hat switches being stuck in up
position when input is suspended in the background
taito/taitoio_yoke.cpp: Give throttle control a distinct type, and don't
auto-centre.
osd: Added option to select MIDI provider module (currently only
PortMidi and the dummy module are available). Also put various things
in namespaces, and fixed builds including SDL sound module with native
Windows OSD.
emu/validity.cpp: Added check to catch I/O port fields using UI input
types.
emu/inpttype.ipp: Renamed inputs that were causing confusion. "Bill"
and "Track" were causing confusion for translators and hence likely
causing confusion for many users, especially those who are not native
English speakers. "Track" as an abbreviation for "Trackball" was
frequently being mistranslated, e.g. in the sense of a CD track
selection button or even in the sense of a railway track. There's no
reason to abbreviate it. "Bill" in the US English sense as a banknote
is too ambiguous and was causing confusion for translators. It's better
to use the less ambiguous "Banknote". Corrected Greek translations of
"Trackball".
Don't run GitHub Actions on issue template changes.
Updated Chinese UI translations. [YuiFAN]
Updated Ukrainian UI translation. [Stanley Kid]
gbcolor.xml: Demoted beastfgt to partially supported (HUD blank on GBC),
and demoted emochndx to unsupported due to all kinds of broken
behaviour. Also added chongwu title from title screen as another
alt_title - it's different to the cartridge label.
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.
Some minor fixes and missed the auto translated "Driver -> System" since in Greek changed the gender and so the article as well. (Driver=Male, System=Neutral ). Check the other translations as well in case something similar happened.
Added menus for controlling toggle inputs, and showing recognised input
devices and control state. Moved input menu options off main menu to a
submenu, as there are a lot of them now.
Moved menu heading drawing into base class, added headings to more
menus, and made headings more consistent with the menu items used to
reach them. Also made terminology more consistent.
Changed the default names for buttons and hat switches/D-pads to use
1-based numbering. DirectInput still returns 0-based button numbers for
some devices.
Removed local copy of MinGW xaudio2.h as it’s now included in the MSYS2
package. Also fixed building the DirectSound sound output module with
the SDL OSD on Windows - the Windows headers are sensitive to include
order.
Started adding documentation for menus, to hopefully help people find
menus they remember seeing but can't recall how to access.
For translators, this makes terminology more consistent. In particular:
* "Settings" is preferred over "configuration" in a number of places, as
the latter can be construed as referring specifically to settings
stored in .cfg files in the cfg_directory folder. Also, references to
saving machine configuration could be interpreted as relating to the
settings on the "Machine Configuration" menu.
* The controls on host input devices (e.g. keys, buttons, joystick axes)
are referred to as "controls", while emulated inputs are referred to
as "inputs".
* The menus for assigning host controls to emulated inputs are called
"input assignments" menus to distinguish them from other input
settings menus.
* Combinations of controls that can be assigned to emulated inputs are
referred to as "combinations" rather than "sequences".
* The potentially confusing term "ROM set" has been removed altogether.
Use "short name" to refer to a device or system's identifier.
* "System" is used in almost places to refer to a complete, runnable
system rather than "Machine".
* "Driver" is now only used to refer to source files where systems or
devices are defined - it is no longer used to refer to individual
systems.
* A few more menus have message context for the messages. This makes it
a bit easier to guess where the messages are used. It also means you
can use different translations in different places if necessary (e.g.
if the same English text should be translated differently as an item
in one menu and as a heading in another).
Added pseudo format specifiers to controller port names: %p for player
and %% for literal percent symbol. This lets you get the localised
player identifier in overridden input names (see NES and Neo-Geo for
examples), and reduces the number of messages to translate.
For translators, the new messages are mostly previously existing
messages with wording adjusted for clarity (e.g. referring to "media"
rather than "ROMs" in several places, as things like disk and tape
images are included). It's also possible to localise the "???"
dipslayed for an input without a valid name, but that should never
actually appear in practice.
For tranlators, the main changes are:
* The former "device mapping" menu is now "input device options" and
includes the input provider module options.
* The analog controls menu (where sensitivity, auto-centre, etc. is
configured) is now localisable.
* The timecode logging features (used when making gameplay videos) have
been moved to a plugin, and display messages are localisable.
* There are a few extra messages for the autofire and input macro
plugins to handle cases where a configured input is not present.
* The timer plugin has options to show wall clock time (real time
elapsed according to host OS clock) or emulated time.