Commit Graph

25257 Commits

Author SHA1 Message Date
cb854d7832 AudioCommon/WASAPI: Construct std::thread with invoke semantics instead of a lambda 2021-01-12 19:25:40 +01:00
11c5150c16 AudioCommon/WASAPI: Factorize device enumeration logic into a function to greatly reduce code duplication 2021-01-12 19:25:38 +01:00
c373890505 AudioCommon/WASAPI: Do volume adjustment only when really needed
This skips a potentially costly loop if volume is 100% or 0%,
as for former there is no need for volume adjustment,
while latter can be solved by specifying a AUDCLNT_BUFFERFLAGS_SILENT flag
2021-01-12 19:24:49 +01:00
991b3ba8c2 AudioCommon/WASAPI: Remove thread unsafe nullptr checks giving a false sense of safety 2021-01-12 19:24:49 +01:00
5dbbf36563 AudioCommon/WASAPI: Use std::string_view where applicable 2021-01-12 19:24:46 +01:00
7d59ad262f AudioCommon/WASAPI: Use leaner memory model on m_running, no need for a full barrier 2021-01-12 19:21:54 +01:00
ee60be4501 AudioCommon/WASAPI: Simplify thread synchronization model by not detaching WASAPI handler thread 2021-01-12 19:21:54 +01:00
c5a372ab2a AudioCommon/WASAPI: Use WRL/WIL whenever possible
This fixes numerous resource leaks, as not every return path cleaned every created resource
Now they are all managed automatically and "commited" to WASAPIStream class fields only
after it's certain they initialized properly
2021-01-12 19:21:22 +01:00
374629ef30 AudioCommon: Make HandleWinAPI handle all success return values properly, not just S_OK 2021-01-12 19:18:48 +01:00
d55f9369c7 Use GX_CMD_UNKNOWN_METRICS instead of magic number 0x44 2021-01-11 12:41:04 -08:00
fc65f65891 BitUtils: cleanup constexpr usage for msvc clz 2021-01-10 10:06:30 -08:00
65ecf1e43e BitUtils: loosen clz to inline on msvc/arm64 2021-01-09 23:44:00 -08:00
LC
a613c2a5e4 Merge pull request #9429 from Sintendo/jit64fixoverflow
Jit64: Fix FinalizeCarryOverflow XER[OV/SO]
2021-01-10 01:58:06 -05:00
LC
59fa613020 Merge pull request #9431 from shuffle2/msvc-gdbstub
msbuild: enable USE_GDBSTUB
2021-01-10 01:56:46 -05:00
LC
75e19a0c29 Merge pull request #9430 from shuffle2/vsupdate
Bump msvc version check and revert a msvc workaround
2021-01-10 01:46:28 -05:00
f0a6244768 msbuild: enable USE_GDBSTUB
this does nothing about it actually being usable
2021-01-09 22:26:55 -08:00
1e5e5ea855 BitUtils: initialize variables
fixes C3615 on some msvc/cmake configs
2021-01-09 22:18:29 -08:00
cce275c16e Revert "msvc: temporary workaround for C4789 false positive"
This reverts commit deb73d0167.
2021-01-09 19:22:36 -08:00
305cd31bd9 Jit64: Fix FinalizeCarryOverflow XER[OV/SO]
FinalizeCarryOverflow didn't maintain XER[OV/SO] properly due to an
oversight. Here's the code it would generate:

0:  9c                      pushf
1:  80 65 3b fe             and    BYTE PTR [rbp+0x3b],0xfe
5:  71 04                   jno    b <jno>
7:  c6 45 3b 03             mov    BYTE PTR [rbp+0x3b],0x3
000000000000000b <jno>:
b:  9d                      popf

At first glance it seems reasonable. The host flags are carefully
preserved with PUSHF. The AND instruction clears XER[OV]. Next, an
conditional branch checks the host's overflow flag and, if needed, skips
over a MOV that sets XER[OV/SO]. Finally, host flags are restored with
POPF.

However, the AND instruction also clears the host's overflow flag. As a
result, the branch that follows it is always taken and the MOV is always
skipped. The end result is that XER[OV] is always cleared while XER[SO]
is left unchanged.

Putting POPF immediately after the AND would fix this, but we already
have GenerateOverflow doing it correctly (and without the PUSHF/POPF
shenanigans too). So let's just use that instead.
2021-01-09 22:52:18 +01:00
4cdcbb6ab2 Merge pull request #9308 from smurf3tte/re23_patch
Patches for Resident Evil 2/3 audio issues
2021-01-06 01:52:15 +01:00
0b1db65aa1 Merge pull request #9405 from Filoppi/patch-7
Rename "Use Fullscreen" setting to "Start in Fullscreen"
2021-01-06 01:44:46 +01:00
27013e8d18 Merge pull request #9300 from leoetlino/ncd-wd-fixes
IOS: WD and NCD fixes
2021-01-06 00:51:33 +01:00
eafb9de047 Merge pull request #9323 from waddlesplash/haiku
Rehabilitate Haiku support.
2021-01-05 16:09:43 +01:00
840ecfb32f Merge pull request #9409 from AdmiralCurtiss/wii-save-import-tmd
Make WiiSave::Import() behave closer to the Wii System Menu's SD Card save copying.
2021-01-05 15:36:36 +01:00
a5a6ef8512 Fix a couple of typos
[committer note: fixed commit message style]
2021-01-05 15:24:21 +01:00
0805b58302 DolphinQt: Remove some useless includes
[committer note: fixed commit message style]
2021-01-05 15:24:13 +01:00
3acd1726b9 Core: Fix variable naming conventions
[committer note: squashed two commits]
2021-01-05 15:23:40 +01:00
ee25f03ff9 Merge pull request #9418 from Filoppi/patch-10
Fix DualShockUDP not adding/removing devices correctly
2021-01-05 15:15:53 +01:00
bd89523e63 Merge pull request #9392 from smurf3tte/audio_wmask
DSP: Fix write masks on AUDIO_*/AR_* MMIO registers
2021-01-05 15:08:06 +01:00
1e4a1bee43 Fix DualShockUDP not adding/removing devices correctly
-If adding 2 devices with the same name, they their unique id wouldn't be increased, causing a conflict.
-Removing a device wouldn't actually remove it from the internal devices list because the list of devices had already been updated when going through it.
-It was possible to remove devices belonging to other sources by adding a device with the same name and then removing it.
2021-01-03 21:06:06 +02:00
6106d6481f BitUtils: __builtin_clz is undefined when value == 0 2021-01-03 17:35:15 +00:00
LC
4b9259d691 Merge pull request #9415 from Filoppi/patch-8
Fix cursor going to +infinite if the window size was 0
2021-01-03 11:26:11 -05:00
8ae0bf93e7 JitArm64: Do not use offsetof on non-standard-layout types
Applying PR #8687 to Arm64 JIT.
2021-01-03 15:26:01 +00:00
2df11d3911 Rehabilitate Haiku support. 2021-01-02 16:54:24 -05:00
8813ba69f5 Fix Quartz cursor going to +infinite if the window size was 0 2021-01-02 19:55:19 +02:00
2932b5f8cd Qt: Give better error messages when Wii save importing fails. 2021-01-02 17:46:12 +01:00
d9c686db30 WiiSave: Delete existing save, if any, before importing one. 2021-01-02 17:46:12 +01:00
700d53e00f WiiSave: In Import(), make sure the TMD exists or can be reinstalled before allowing save to be imported. 2021-01-02 17:46:11 +01:00
46e4c17db3 WiiUtils: Add utility functions to handle prep-work for importing 'SD-card export' style Wii saves. 2021-01-02 17:46:11 +01:00
5a5c815ff0 Fix DInput cursor going to +infinite if the window size was 0 2021-01-02 18:33:13 +02:00
75f35393c3 Fix XInput2 cursor going to +infinite if the window size was 0 2021-01-02 18:30:14 +02:00
36af39853d Arm64Emitter: Remove unused OpType enum
This isn't used anywhere, so we can remove it.
2021-01-01 11:06:05 -05:00
95cc53edec Arm64Emitter: Convert ArithOption enums into enum classes
Makes the enums strongly typed. While we're at it, we can also make
these enums private.
2021-01-01 07:10:41 -05:00
452aad29f1 Merge pull request #9401 from lioncash/jittable
JitArm64_Tables: Construct tables at compile-time
2021-01-01 01:22:49 +01:00
344a74aa11 Merge pull request #9396 from lioncash/arm
JitArm64_RegCache: Interface cleanup
2021-01-01 01:03:55 +01:00
f59ee87031 Merge pull request #9402 from lioncash/emitter
Arm64Emitter: Interface cleanup
2021-01-01 00:52:40 +01:00
7abe1085e3 IOS/ES: Pass relevant caller title information to ImportTmd() and ExportTitleInit(). 2020-12-31 17:13:46 +01:00
57c59c18d4 Rename "Use Fullscreen" setting to "Start in Fullscreen"
The name was confusing as changing it at runtime would not change the window to fullscreen, as it effectively only affects the start of the emulation.
Also blocked the ability to change it when the emulation is running, to be more inline with other similar settings, like "Render to main Window".
2020-12-31 13:39:45 +02:00
7bf590ee5a Merge pull request #9403 from lioncash/guard
ArmCommon: Add missing header guard
2020-12-31 12:17:28 +01:00
e45aa019ec ArmCommon: Mark NO_COND as constexpr
Allows it to be used in compile-time expressions if ever necessary.
2020-12-30 20:54:05 -05:00