Skip to content

Commit

Permalink
Miscellaneous fixes and refactoring:
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cuavas committed Jan 27, 2023
1 parent 536c6ee commit 2498f2b
Show file tree
Hide file tree
Showing 95 changed files with 1,832 additions and 1,686 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/bgfxshaders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Rebuild BGFX shaders
on:
push:
paths:
- '.github/**'
- '.github/workflows/**'
- 'src/osd/modules/render/bgfx/shaders/**'
pull_request:
paths:
- '.github/**'
- '.github/workflows/**'
- 'src/osd/modules/render/bgfx/shaders/**'

permissions:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI (Linux)
on:
push:
paths:
- '.github/**'
- '.github/workflows/**'
- '3rdparty/**'
- 'hash/**'
- 'scripts/**'
Expand All @@ -12,7 +12,7 @@ on:
- 'makefile'
pull_request:
paths:
- '.github/**'
- '.github/workflows/**'
- '3rdparty/**'
- 'hash/**'
- 'scripts/**'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name: CI (macOS)
on:
push:
paths:
- '.github/**'
- '.github/workflows/**'
- '3rdparty/**'
- 'scripts/**'
- 'src/**'
- 'COPYING'
- 'makefile'
pull_request:
paths:
- '.github/**'
- '.github/workflows/**'
- '3rdparty/**'
- 'scripts/**'
- 'src/**'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name: CI (Windows)
on:
push:
paths:
- '.github/**'
- '.github/workflows/**'
- '3rdparty/**'
- 'scripts/**'
- 'src/**'
- 'COPYING'
- 'makefile'
pull_request:
paths:
- '.github/**'
- '.github/workflows/**'
- '3rdparty/**'
- 'scripts/**'
- 'src/**'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Build documentation
on:
push:
paths:
- '.github/**'
- '.github/workflows/**'
- 'docs/**'
pull_request:
paths:
- '.github/**'
- '.github/workflows/**'
- 'docs/**'

permissions:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/hash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ name: XML/JSON validation
on:
push:
paths:
- '.github/**'
- '.github/workflows/**'
- 'ctrlr/*'
- 'hash/*'
- 'plugins/**'
pull_request:
paths:
- '.github/**'
- '.github/workflows/**'
- 'ctrlr/*'
- 'hash/*'
- 'plugins/**'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/language.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Compile UI translations
on:
push:
paths:
- '.github/**'
- '.github/workflows/**'
- 'language/**'
pull_request:
paths:
- '.github/**'
- '.github/workflows/**'
- 'language/**'

permissions:
Expand Down
2 changes: 1 addition & 1 deletion android-project/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2022, MAMEdev and contributors
Copyright (c) 1997-2023, MAMEdev and contributors
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
114 changes: 78 additions & 36 deletions docs/source/commandline/commandline-all.rst
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ Example:
.. rubric:: Footnotes
.. [#JIPAutoWindows] On Windows, auto will default to ``winhybrid``.
.. [#JIPAutoWindows] On Windows native, auto will default to ``winhybrid``.
.. [#JIPAutoSDL] On SDL, auto will default to ``sdlgame``.
Expand Down Expand Up @@ -1002,6 +1002,21 @@ Example:
mame mk2 -joystickprovider winhybrid
.. _mame-commandline-midiprovider:
**-midiprovider** *<module>*
Chooses how MAME will communicate with MIDI devices and applications (e.g.
music keyboards and synthesisers). Supported options are ``pm`` to use the
PortMidi library, or ``none`` to disable MIDI input and output (MIDI files
can still be played). The default is ``auto``, which will use PortMidi if
available.
Example:
.. code-block:: bash
mame -midiprovider none dx100 -midiin canyon.mid
.. _mame-commandline-cliverbs:
Expand Down Expand Up @@ -2092,35 +2107,35 @@ Core Video Options
Generally Available:
| Using ``bgfx`` specifies the new hardware accelerated renderer.
|
| Using ``opengl`` tells MAME to render video using OpenGL acceleration.
|
| Using ``none`` displays no windows and does no drawing. This is primarily present for doing CPU benchmarks without the overhead of the video system.
|
* Using ``bgfx`` specifies the new hardware accelerated renderer.
* Using ``opengl`` tells MAME to render video using OpenGL acceleration.
* Using ``none`` displays no windows and does no drawing. This is primarily
intended for benchmarking emulation without the overhead of the video
system.
On Windows:
| Using ``gdi`` tells MAME to render video using older standard Windows graphics drawing calls. This is the slowest but most compatible option on older versions of Windows.
|
| Using ``d3d`` tells MAME to use Direct3D for rendering. This produces the better quality output than ``gdi`` and enables additional rendering options. It is recommended if you have a semi-recent (2002+) video card or onboard Intel video of the HD3000 line or better.
|
* Using ``gdi`` tells MAME to render video using older standard Windows
graphics drawing calls. This is the slowest but most compatible option on
older versions of Windows or buggy graphics hardware drivers.
* Using ``d3d`` tells MAME to use Direct3D 9 for rendering. This produces
better quality output than ``gdi`` and enables additional rendering
options. It is recommended if you have a 3D-capable video card or onboard
Intel video of the HD3000 line or better.
On other platforms (including SDL on Windows):
| Using ``accel`` tells MAME to render video using SDL's 2D acceleration if possible.
|
| Using ``soft`` uses software rendering for video output. This isn't as fast or as nice as OpenGL but will work on any platform.
|
* Using ``accel`` tells MAME to render video using SDLs 2D acceleration if
possible.
* Using ``soft`` uses software rendering for video output. This isnt as
fast or as nice as OpenGL, but it will work on any platform.
Defaults:
| The default on Windows is ``d3d``.
|
| The default for Mac OS X is ``opengl`` because OS X is guaranteed to have a compliant OpenGL stack.
|
| The default on all other systems is ``soft``.
|
* The default on Windows is ``d3d``.
* The default for macOS is ``opengl`` because OS X is guaranteed to have a
compliant OpenGL stack.
* The default on all other systems is ``soft``.
Example:
.. code-block:: bash
Expand Down Expand Up @@ -3331,17 +3346,17 @@ Core Input Options
**-joystick_deadzone** *<value>* / **-joy_deadzone** *<value>* / **-jdz** *<value>*
If you play with an analog joystick, the center can drift a little.
joystick_deadzone tells how far along an axis you must move before the axis
starts to change. This option expects a float in the range of 0.0 to 1.0.
Where 0 is the center of the joystick and 1 is the outer limit.
If you play with an analog joystick, the center can drift a little.
joystick_deadzone tells how far along an axis you must move before the axis
starts to change. This option expects a float in the range of 0.0 to 1.0.
Where 0 is the center of the joystick and 1 is the outer limit.
The default is ``0.3``.
The default is ``0.15``.
Example:
.. code-block:: bash
mame sinistar -joystick_deadzone 0.45
mame sinistar -joystick_deadzone 0.3
.. _mame-commandline-joysticksaturation:
Expand All @@ -3360,6 +3375,29 @@ Core Input Options
mame sinistar -joystick_saturation 1.0
.. _mame-commandline-joystickthreshold:
**-joystick_threshold** *<value>* / **joy_threshold** *<value>* / **-jthresh** *<value>*
When a joystick axis (or other absolute analog axis) is assigned to a
digital input, this controls how far it must be moved from the neutral
position (or centre) to be considered active or switched on. This option
expects a float in the range of 0.0 to 1.0, where 0 means any movement from
the neutral position is considered active, and 1 means only the outer limits
are considered active. This threshold is **not** adjusted to the range
between the dead zone and saturation point.
Note that if a :ref:`joystick map <mame-commandline-joystickmap>` is
configured, that will take precedence over this setting when a joystick’s
main X/Y axes are assigned to digital inputs.
The default is ``0.3``.
Example:
.. code-block:: bash
mame raiden -joystick_threshold 0.2
.. _mame-commandline-natural:
**\-[no]natural**
Expand All @@ -3376,18 +3414,22 @@ Core Input Options
presses/releases the emulated key.
In "natural keyboard" mode, MAME attempts to translate characters to
keystrokes. The OS translates keystrokes to characters
(similarly when you type into a text editor), and MAME attempts to translate
these characters to emulated keystrokes.
keystrokes. The OS translates keystrokes to characters (similarly to when
you type into a text editor), and MAME attempts to translate these
characters to emulated keystrokes.
**There are a number of unavoidable limitations in "natural keyboard" mode:**
* The emulated system driver and/or keyboard device or has to support it.
* The selected keyboard *must* match the keyboard layout selected in the emulated OS!
* Keystrokes that don't produce characters can't be translated. (e.g. pressing a modifier on its own such as **shift**, **ctrl**, or **alt**)
* Holding a key until the character repeats will cause the emulated key to be pressed repeatedly as opposed to being held down.
* Dead key sequences are cumbersome to use at best.
* It won't work at all if IME edit is involved. (e.g. for Chinese/Japanese/Korean)
* The emulated system driver and/or keyboard device has to support it.
* The selected keyboard layout *must* match the keyboard layout selected in
the emulated OS!
* Keystrokes that don’t produce characters can’t be translated (e.g.
pressing a modifier on its own such as **shift**, **ctrl**, or **alt**).
* Holding a key until the character repeats will cause the emulated key to
be pressed repeatedly as opposed to being held down.
* Dead key sequences are cumbersome to use at best.
* It won’t work at all if IME edit is involved (e.g. for Chinese, Japanese
or Korean language input).
Example:
.. code-block:: bash
Expand Down
2 changes: 2 additions & 0 deletions docs/source/commandline/commandline-index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ OSD-related Options
| :ref:`mouseprovider <mame-commandline-mouseprovider>`
| :ref:`lightgunprovider <mame-commandline-lightgunprovider>`
| :ref:`joystickprovider <mame-commandline-joystickprovider>`
| :ref:`midiprovider <mame-commandline-midiprovider>`

OSD CLI Verbs
Expand Down Expand Up @@ -266,6 +267,7 @@ Core Input Options
| :ref:`joystick_map <mame-commandline-joystickmap>`
| :ref:`joystick_deadzone <mame-commandline-joystickdeadzone>`
| :ref:`joystick_saturation <mame-commandline-joysticksaturation>`
| :ref:`joystick_threshold <mame-commandline-joystickthreshold>`
| :ref:`[no]natural <mame-commandline-natural>`
| :ref:`[no]joystick_contradictory <mame-commandline-joystickcontradictory>`
| :ref:`coin_impulse <mame-commandline-coinimpulse>`
Expand Down
Loading

0 comments on commit 2498f2b

Please sign in to comment.