Commit graph

40056 commits

Author SHA1 Message Date
Shawn Hoffman
63680f23d7 msvc: disable building std modules
fixes build failures related to pch
2023-05-23 17:07:56 -07:00
Admiral H. Curtiss
532c6a8485
Merge pull request #11840 from krnlyng/blr_and_block_map_fixes
Blr and block map fixes
2023-05-23 23:09:21 +02:00
Franz-Josef Haider
8943a9a369 Jit: Add missing call to InitBLROptimization for extra performance 2023-05-23 23:49:29 +03:00
Franz-Josef Haider
68aab70c75 Jit: Fix block map fallback in Arm64 case. 2023-05-23 23:20:08 +03:00
Admiral H. Curtiss
60cb88d379
Merge pull request #11838 from brad0/discordpresence_warning_fix
Fix s_using_custom_client warning with DiscordPresence
2023-05-23 20:59:21 +02:00
Admiral H. Curtiss
df06ae2257
Merge pull request #11837 from brad0/aes_silence_warning
Silence AES warning
2023-05-23 09:20:38 +02:00
Admiral H. Curtiss
572e6486ce
Merge pull request #11836 from brad0/openbsd_socket_header
Fix for Socket header for OpenBSD
2023-05-23 09:19:55 +02:00
Brad Smith
cf06da8fea Fix s_using_custom_client warning with DiscordPresence
/home/ports/pobj/dolphin-5.0.0.20230429/dolphin-5.0.0.20230429/Source/Core/UICommon/DiscordPresence.cpp:27:13: warning: unused variable 's_using_custom_client' [-Wunused-variable]
static bool s_using_custom_client = false;
            ^
2023-05-23 00:07:06 -04:00
Brad Smith
49afa23f95 Silence AES warning
This warning came about after 46ad8b9d68

In file included from /home/ports/pobj/dolphin-5.0.0.20230429/dolphin-5.0.0.20230429/Source/Core/Core/IOS/WFS/WFSI.cpp:4:
/home/ports/pobj/dolphin-5.0.0.20230429/dolphin-5.0.0.20230429/Source/Core/Core/IOS/WFS/WFSI.h:54:6: warning: private field 'm_aes_key' is not used [-Wunused-private-field]
  u8 m_aes_key[0x10] = {};
     ^
2023-05-22 23:34:19 -04:00
Brad Smith
7d26f4ff8e Fix for Socket header for OpenBSD 2023-05-22 23:07:33 -04:00
Admiral H. Curtiss
68c3b1fb7d
Merge pull request #11830 from shuffle2/vs17.6
update to VS 17.6
2023-05-23 00:37:01 +02:00
JosJuice
8a78538b2d Android: Don't show analytics dialog for destroyed activity
Should fix one of the reported crashes on Google Play. The issue can
happen if you leave the activity during directory initialization.
2023-05-22 11:10:13 +02:00
Admiral H. Curtiss
8fd61d0b54
Merge pull request #11737 from krnlyng/block_map
Jit: Improve block lookup performance through a shm memory segment.
2023-05-21 04:48:23 +02:00
Admiral H. Curtiss
ef95d942e1
Merge pull request #11763 from LillyJadeKatrin/retroachievements-memory-events
RetroAchievements Memory, Events, and Awarding
2023-05-21 03:20:34 +02:00
Admiral H. Curtiss
d59b61c87e
Merge pull request #11832 from OatmealDome/steamrt-qt-6
DolphinQt: Adjust variable name for Qt root directory in steamrt builds
2023-05-21 02:53:34 +02:00
OatmealDome
b7389bc7bc DolphinQt: Adjust variable name for Qt root directory in steamrt builds 2023-05-20 20:32:43 -04:00
Franz-Josef Haider
859da32a6c Jit: Improve block lookup performance through a shm memory segment.
By using a shm memory segment for the fast_block_map that is sparsely
allocated (i.e. on write by the OS) instead of a statically allocated
array we can make the block lookup faster by:
* Having a bigger space available for lookup that doesn't take up
  too much memory, because the OS will only allocate the needed
  pages when written to.
* Decrease the time spent to lookup a block in the assembly dispatcher
  due to less comparisions and shorter code (for example the pc check
  has been entirely dropped since only the msrBits need to be validated).

When the JIT block cache is full the shm segment will also be released
and reallocated to avoid allocating too much memory. It will also be
reset when the instruction cache is flushed by the PPC code to avoid
having stale entries.

Also fallback to the original method in case the memory segment couldn't
be allocated.
2023-05-20 16:26:55 +03:00
Jeffrey Bosboom
620955d397 XInput2: Listen to master devices only
A comment removed by this commit gives two reasons for listening to
slave devices, both of which no longer apply:

- "Only slaves emit raw motion events": perhaps this was true when the
comment was written, but now master devices provide raw motion events
along with the other raw events.

- "Selecting slave keyboards avoids dealing with key focus": we get raw
key events regardless of the focus.

Listening to both master and slave devices results in duplicate raw
events.  For button and key events, that's a tiny waste of time setting
the update flag a second time, but for raw mouse events the raw motion
will be processed twice.  That makes this commit a user-facing change.
2023-05-19 14:20:10 -07:00
Jeffrey Bosboom
b2a98c41ee XInput2: Use raw events and queries for buttons and keys
In X, the ButtonPress events generated when a mouse button is pressed
have a special property: if they don't activate an existing passive
grab, the X server automatically activates the "implicit passive grab"
on behalf of the client the event is delivered to.  This ensures the
ButtonRelease event is delivered to the same client even if the pointer
moves between windows, but it also causes all events from that pointer
to be delivered exclusively to that client.  As a consequence of the
implicit passive grab, for each window, only one client can listen for
ButtonPress events; any further listeners would never receive the event.

XInput 1 made the implicit grab optional and explicit by allowing
clients to listen for DeviceButtonPress events without
DeviceButtonPressGrab events.  XInput 2 does not have a separate grab
event class, but multiple clients can listen for XI_ButtonPress on the
same window.  When a button is pressed, the X server first tries to
deliver an XI_ButtonPress event; if no clients want it, then the server
tries to deliver a DeviceButtonPress event; if no clients want it, then
the server tries to deliver a ButtonPress event.  Once an event has been
delivered, event processing stops and earlier protocol levels are not
considered.  The reason for this rule is not obviously documented, but
it is probably because of the implicit passive grab; a client receiving
a ButtonPress event assumes it is the only client receiving that event,
and later protocols maintain that property for backward compatibility.

Before this commit, Dolphin listened for XI_ButtonPress events on the
root window.  This interferes with window managers that expect to
receive ButtonPress events on the root window, such as awesome and
Openbox.  In Openbox, applications are often launched from a menu
activated by clicking on the root window, and desktops are switched by
scroll wheel input on the root window.  This makes normal use of other
applications difficult when Dolphin is open (though Openbox keyboard
shortcuts still work).  Conversely, Dolphin only receives XI_ButtonPress
events for clicks on the root window or window decorations (title bars),
not on Dolphin's windows' content or the render window.  In window
managers that use a "virtual root window" covering the actual root
window, such as Mutter running in X, Dolphin and the window manager do
not conflict, but clicks delivered to other applications using XInput2
(for testing, try xinput --test-xi2) are not seen by Dolphin, which is
relevant when background input is enabled.

This commit changes Dolphin to listen for XI_RawButtonPress (and the raw
versions of other events); Dolphin was already listening to XI_RawMotion
for raw mouse movement.  Raw events are always and exclusively delivered
to the root window and are delivered to every client listening for them,
so Dolphin will not interfere with (or be interfered with by) other
applications listening for events.

As part of being raw, button numbers and keycodes in raw events have not
had mapping applied.  If a left-handed user swapped the left and right
buttons on their mouse, raw events do not reflect that.  It is possible
to query the mappings for each device and apply them manually, but that
would require a fair amount of code, including listening for mapping
changes.

Instead, Dolphin now uses the events only to set a "changed" flag, then
queries the current button and key state after processing all events.
Dolphin was already querying the pointer to get its absolute position
and querying the keyboard to filter the key bitmap it created from
events; now Dolphin also uses the button state from the pointer query
and uses the keyboard query directly.

Queries have a performance cost because they are synchronous requests to
the X server (Dolphin waits for the result).  Commit 2b640a4f made the
pointer query conditional on receiving a motion event to "cut down on
round trips", but commit bbb12a75 added an unconditional keyboard query,
and there have apparently been no performance complaints.  This commit
queries the pointer slightly more often (on button events in addition to
motion), but only queries the keyboard after key events, so the total
rate of queries should be substantially reduced.

Fixes: https://bugs.dolphin-emu.org/issues/10668
2023-05-19 14:20:10 -07:00
Jeffrey Bosboom
46540ea42b XInput2: Request XInput 2.1
We need XInput 2.1 to get raw events on the root window even while
another client has a grab.  We currently use raw events for relative
mouse input, and upcoming commits will use raw events for buttons and
keys.
2023-05-19 14:20:09 -07:00
Jeffrey Bosboom
a902480cb0 XInput2: Make button state a u32
Because we care how many bits it has, not its arithmetic range.  No
functional change on all supported platforms.
2023-05-19 14:20:09 -07:00
Admiral H. Curtiss
4efa10c170
Merge pull request #11751 from noahpistilli/discord-rpc
UICommon/DiscordPresence: Use GameTDB covers for RPC
2023-05-19 19:35:17 +02:00
Admiral H. Curtiss
50fe493990
Merge pull request #11739 from OatmealDome/iokit-be-gone
InputCommon: Remove OSX (IOKit) input backend
2023-05-19 19:31:40 +02:00
Admiral H. Curtiss
279fcafdc3
Merge pull request #11758 from jbosboom/xinput2-client-pointer
XInput2: Accept input from keyboards other than the first master
2023-05-19 19:29:24 +02:00
Admiral H. Curtiss
3905288465
Merge pull request #11816 from MarioPartyNetplay/gmpe01-fixes
Update Mario Party 4 cheats
2023-05-19 19:28:10 +02:00
Admiral H. Curtiss
86f1ef1e33
Merge pull request #11707 from TellowKrinkle/CMakeIconv
CMake: Use find_package and imported targets for Iconv
2023-05-19 19:27:16 +02:00
Admiral H. Curtiss
82ecbbe795
Merge pull request #11822 from AdmiralCurtiss/win-large-memarena
Common/MemArenaWin: Improve file mapping logic.
2023-05-19 19:24:31 +02:00
Admiral H. Curtiss
8342164dbd
Common/MemArena: Pass shared memory base file name to GrabSHMSegment(). 2023-05-19 18:53:08 +02:00
Admiral H. Curtiss
ff5bcba966
Common/MemArenaWin: Handle file mappings >= 4GB. 2023-05-19 18:44:32 +02:00
Admiral H. Curtiss
b0d7fa9eb1
Merge pull request #11823 from AdmiralCurtiss/mmap-android
Common/MemArenaAndroid: Keep fastmem region mapped.
2023-05-19 18:42:33 +02:00
JosJuice
11768e3dd3
Merge pull request #11829 from lioncash/strutil
Common/StringUtil: Move some utilities into the Common namespace
2023-05-17 09:13:36 +02:00
Shawn Hoffman
7512964b2b update readme 2023-05-16 20:40:20 -07:00
Shawn Hoffman
ac7003a1ac Revert "windows: temporarily hardcode VCToolsVersion to 14.34.31931.0"
This reverts commit 3961afdbb9.
2023-05-16 20:24:45 -07:00
Shawn Hoffman
519da43b0a Revert "workaround msvc optimizer bug"
This reverts commit 28956cc6c2.
2023-05-16 20:23:25 -07:00
Shawn Hoffman
7feb6fda83 bump minimum VS version to 17.6 2023-05-16 20:21:36 -07:00
Mai
fede2ab9a9
Merge pull request #11828 from JosJuice/wia-convert-comments
DiscIO: Improve comments in WIARVZFileReader::Convert
2023-05-16 14:39:59 -04:00
Lioncash
1a2b48c204 StringUtil: Move ThousandSeparate() into Common namespace 2023-05-16 14:26:33 -04:00
Lioncash
954afd81ec StringUtil: Move CommandLineToUtf8Argv() into Common namespace 2023-05-16 14:23:21 -04:00
Lioncash
d368c989e7 StringUtil: Move GetEscapedHtml() into Common namespace 2023-05-16 14:21:19 -04:00
Lioncash
21df3ca572 StringUtil: Move IsPrintableCharacter() into Common namespace 2023-05-16 14:17:54 -04:00
Lioncash
a9f1edeb61 StringUtil: Move IsAlpha() into Common namespace 2023-05-16 14:11:02 -04:00
JosJuice
192081d2f1 DiscIO: Improve comments in WIARVZFileReader::Convert
Just some clarifications and typo fixes.
2023-05-16 18:58:07 +02:00
Léo Lam
e0ef474d95
Merge pull request #11825 from AdmiralCurtiss/ios-split-es-fs
IOS: Further deglobalization and emulation/maintainance code splitting.
2023-05-15 22:16:22 +01:00
Admiral H. Curtiss
28b82ff8d8
IOS/EmulationKernel: Remove m_device_map_mutex, m_device_map is only modified in the constructor and destructor. 2023-05-15 20:54:21 +02:00
Admiral H. Curtiss
b8f3a47fba
IOS: Move more emulation-only stuff from Kernel to EmulationKernel. 2023-05-15 20:41:49 +02:00
Admiral H. Curtiss
3d767edd8a
IOS/FS: Split FSDevice into FSCore and FSDevice.
FSCore implements the core functionality that can also be used outside of emulation. FSDevice implements the IOS device and is only available during emulation.
2023-05-15 20:41:47 +02:00
Admiral H. Curtiss
6a339cbdb3
IOS/ES: Split ESDevice into ESCore and ESDevice.
ESCore implements the core functionality that can also be used outside of emulation. ESDevice implements the IOS device and is only available during emulation.
2023-05-15 20:41:05 +02:00
Mai
361a8b2c8e
Merge pull request #11827 from AdmiralCurtiss/ctest-output-on-failure
CMake: Set --output-on-failure flag for unittests target.
2023-05-14 00:40:11 -04:00
Admiral H. Curtiss
df458aed89
CMake: Set --output-on-failure flag for unittests target. 2023-05-14 04:52:50 +02:00
Admiral H. Curtiss
27d90a7d7b
Merge pull request #11779 from ArcaneNibble/sd
Support Steam Deck controls natively through hidraw
2023-05-12 22:10:31 +02:00