| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Feed mouse/pen/touch pointer events through UI input manager with Win32 and SDL.
* Started migrating UI code to use new API and reworking mouse/touch interaction.
* emu/render.cpp: Support pressing multiple clickable layout items simultaneously.
* emu/render.cpp: Allow UI elements to be drawn in any window.
* emu/rendlay.cpp, luaengine_render.cpp: Added layout view events for pointer input.
* ui/ui.cpp: Allow the UI handler to control pointer display.
* ui/analogipt.cpp: Added mouse/touch and more keys for navigating field state list.
* ui/menu.cpp: Use vertical swipe to scroll and horizontal swipe to adjust.
* ui/menu.cpp: Draw after processing input - greatly improves responsiveness.
* ui/menu.cpp: Ignore keyboard/gamepad input during pointer actions.
* ui/selmenu.cpp: Made left/right info pane arrows repeat when held.
* ui/selmenu.cpp: Use middle click to move keyboard focus.
* ui/selmenu.cpp: Let filter list scroll if it's too tall, and use a bit of horizontal padding.
* ui/selmenu.cpp: Improved divider sizing.
* ui/state.cpp: Don't allow clicks to pass through the confirm deletion prompt to the menu.
* ui/simpleselgame.cpp: Fixed error message display and graphics/sound status not showing.
* ui/simpleselgame.cpp: Allow tap/click to dismiss error message.
* ui/utils.cpp: Show UI for choice filters when there are no choices - it's less confusing.
* modules/input/input_sdl.cpp: Made scaling for mouse scroll better match RawInput and DirectInput.
* modules/input/input_rawinput.cpp: Added support for horizontal scroll axis.
* modules/input/input_win32.cpp: Added support for scroll axes and more buttons to mouse/lightgun.
* modules/debugger/debugimgui.cpp: Don't fight over events with the UI manager - it breaks menus.
* osd/windows/window.cpp: Translate mouse position to window cooridinates for scroll wheel events.
* osd/sdl/window.cpp: Supply last mouse position for scroll wheel events if possible.
* scripts/build/complay.py: Made zero input mask an error - it was only being used to block clicks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
input_common.h: Got rid of the DirectInput key code macros. DirectInput
headers are always available on Windows - it's just an opportunity for
bygs.
input_common.cpp: Added default names for keys mapped to MAME's "other
switch" type.
input_rawinput.cpp: Simulate Pause key being held for 30ms, similarly to
what's done for Caps Lock on macOS with SDL. Also added a gross hack to
give "correct" names for Pause and Num Lock.
input_sdl.cpp: Get default key names from SDL. Not really that useful
as it isn't aware of the current keyboard layout. Key map files are
still needed for anything other than a US ANSI layout.
Also added some comments.
|
|
|
|
| |
newer DualShock/DualSense controllers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mode.
There are multiple issues with what MAME was doing, but the most glaring
is that it violates the DirectInput interface contract that requires the
window associated with an open device must not be destroyed. See
documentation for IDirectInputDevice8::SetCooperativeLevel: "This
parameter must be a valid top-level window handle that belongs to the
process. The window associated with the device must not be destroyed
while it is still active in a DirectInput device."
The previous code also prevented DirectInput controllers from working
when using multiple windows if any window other than the first window
had focus.
Also fixed SDL builds not correctly recognising when all windows lose
focus, and save state menu not appearing.
|
|
|
|
|
| |
Gets rid of some state in the winhybrid joystick module that's only used
during initialisation.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
This was a drain on performance. If anything is trying to poll inputs
in a loop, it needs to call input_update() to ensure it gets up-to-date
state.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
emu/input.cpp: Fixed regression in display of some joystick inputs.
osd/interface: Split up interface classes into a few more files to
reduce where the input device interface class needs to be included.
Made OSD independent of concrete input_device class.
osd/modules/input, emu/inputdev.cpp, emu/ioport.cpp: Allow input devices
to provide tokens for controls without standard item types and
additional default input assignments. Fixes issues assigning Yen and
Backslash on Japanese keyboards.
ui/textbox.cpp: Added a fixed-content text box menu class for future
use.
Got main.h out of emu.h as it’s only used in a very small number of
places, mostly for getting the application name. Added eminline.h to
attotime.h as it's used without emu.h. Cleaned up forward declarations
in emufwd.h a little.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't ignore the return status of OSD module initialisation. Attempt to
fall back to an alternate module if the selected module fails to
initialise. Log more useful diagnostic information at verbose level.
Fixed BGFX crash on exit after toggling fullscreen. Also persist more
settings than just the selected chains across toggling fullscreen.
Turned video modules into OSD modules in the same sense as all the other
OSD modules. They now use the same selection/fallback mechanism as all
the other modules without special extra code in the OSD implementations.
Untangled some object ownership mess. Windows own renderers, OSD
objects own windows. Fixed a refrence loop that caused the first window
object to always leak.
Don't create renderer object until after underlying window has been
created. Fixed issues with order of creation/destruction when toggling
fullscreen or changing prescale in fullscreen with -switchres in SDL
builds.
Use more smart pointers in BGFX and Direct3D render modules. Most of
the code now reutrns a smart pointer when handing over ownership or a
naked pointer when retaining ownership. Fixed a few leaks and
simplified cleanup code.
Encapsulated various OSD modules better.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
osd: Supply OSD object to modules on initialisation. Encapsulated some
event handling in the OSD objects rather than leaving it in free
functions. Put various stuff in namespaces.
osd/modules/input: Enabled dinput, xinput and winhybrid modules for
Windows SDL builds, and enabled background input for dinput and xinput
(and by extension winhybrid) modules. Also fixed some COM and X11
resource leaks.
osd/modules/input/input_sdl.cpp: Flipped SDL mouse button order to match
Windows, and exposed vertical and horizontal scroll as Z and rZ axes.
Moved SDL UI event handling out of input devices into OSD object.
osd/modules/input_rawinput.cpp: Changed lightgun Z axis token so it's
correctly identified as a relative axis (it maps to the scroll wheel
equivalent).
osd: Added an option to choose the network provider module. Mostly
useful if you build with both TUN/TAP and pcap support included, or if
you want to disable emulated networking completely.
emu/input.cpp: Use a better strategy for assembling input code names
that uses fewer temporary strings and doesn't require use of the
non-Unicode-aware space trimming function (fixes MT08552).
osd/modules/input_dinput.cpp: Improved polling logic.
osd: Made various parts of the input code less dependent on concrete emu
objects, and reduced inappropriately passing around the machine object.
Made input modules less dependent on OSD implementation. Encapsulated
some stuff and got rid of some vestigial newui and SDL1 support code.
Cleaned up some interfaces. Moved OSD options classes to their own
files.
Prepare to remove main.h from emu.h - it's mostly used to get the
application name, which the vast majority of emulated devices don't need
to do.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dinput, xinput: Use proper item IDs for hat switches rather than
"other switch".
* xinput: Map right thumb stick to Z/rZ for consistency with SDL and
DirectInput.
* xinput: Map triggers to additional absolute axes 1 and 2.
* xinput: Map start and back buttons to start and select.
* Added default assignments for player 5-10 start/select.
* Added default assignments for 5P-8P start and coin 5-8.
-namco/namcos2.cpp: Changed collective pitch control to AD Stick Z.
|
|
|
|
|
|
|
|
|
|
| |
Optimised the scheduler's handling of unscheduled timers - gives a 50%
performance improvement in some timer-heavy drivers.
Added better endianness swizzling helpers.
Got rid of some of the OSD input modules' dependence on concrete input
classes from emu.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
|
|
|
| |
* Bumped target windows version to 6.0.0 (Vista).
* Use WRL COM pointers to manage some COM-like objects.
* Cleaned up logging in DirectSound module.
* Cleaned up includes in Windows input modules.
* Switched to Common Item Dialogs in Windows debugger.
* Replaced disabled code that never really worked with a TODO comment.
|
|
|
| |
Also improved display name scheme for joystick axes and buttons.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Removed support for DirectInput 7 and earlier. It hasn't been tested in
years, and it's not relevant on any supported OS. DirectInput is
effectively finalised at version 8, and is unlikely to get an API update
in the future.
Use more string[_view] and fewer C strings, and tightened up scope of a
few things.
|
|
|
|
|
|
|
|
|
|
| |
* osdcomm.h: Move definition of EQUIVALENT_ARRAY to coretmpl.h
* sharc.cpp, gt64xxx.cpp, ym2413.cpp, gb_lcd.cpp, snes_ppu.cpp: Use STRUCT_MEMBER for save state registration
* gio/newport.cpp, megadrive/svp.cpp, nes_ctrl/bcbattle.cpp, arm7.cpp, tms9995.cpp, pckeybrd.cpp, sa1110.cpp, sa1111.cpp, jangou_blitter.cpp, vic4567.cpp: Use std::fill(_n) instead of memset
* emucore.h: Remove obsolete typedef
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
existing window (#5381)
* Creating an -attach_window command line parameter on Windows to attach
to an existing window
* Moved -attach_window option to Windows-specific code
* Created an osd_set_aggressive_input_focus() function and exposed to LUA
* Created a dummy implementation of osd_set_aggressive_input_focus() for
SDL
|
| |
|
|
|
|
|
| |
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8
also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
|
|
|
|
| |
utf16_char, unicode_char (nw)
|
|
|
|
|
| |
utf8_from_[a|w|t]string ==> osd::text::from_[a|w|t]string
[a|w|t]string_from_utf8 ==> osd::text::to_[a|w|t]string
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds id() property to input_device, which represents the
unique device id. This allows the osd layer when creating a device to
pass a friendly display name along with a unique identifier.
Currently the device id is only used to map a physical controller device
to controller id, but can be used more generally in the future. For raw
input devices, we use the full raw input name as the device id. For all
other devices, we fall back to device name as the device id. The
"uniqueness" of the device id is not currently enforced in code.
|
| |
|
| |
|
|
|
|
| |
to inline functions (nw)
|
|
|
|
| |
std::wstring
|
| |
|
|
|
|
|
| |
This is a central cross-platform facility to dynamically bind functions from shared libraries.
Updated all OSD modules to use it.
|
| |
|
| |
|
|
|
|
| |
DirectInput7 compile.
|
| |
|
|
|
|
| |
This reverts commit 5e831f6506ee06f8c30cb113551ee0fec53804db.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Unified renderer in osd_window as std::unique_ptr
Made windows all std::shared_ptr<window_type>
Made window lists std::list<std::shared_ptr<window_type>>
Updated OSD SDL worker_param to not use malloc (not compatible with smart
pointers)
Made renderer pointer to window a weak reference. May not be available
during destruction of the window.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
The reset function for the device was overwriting the axis information previously obtained. Changed it to correctly only reset the state member.
|
|
|
|
| |
resources.
|