Commit Graph

36124 Commits

Author SHA1 Message Date
Brad Smith ba2ccf3889 Set default sound backend on OpenBSD to cubeb
Set the default sound backend to cubeb instead of the default
being none.
2024-04-14 18:47:20 -04:00
Dentomologist 37b89d5b71 GameList: Show (Disc 1) for first disc of two-disc games
Append disc label to the first disc of two-disc games too, rather than
only labelling the second disc.
2024-04-14 13:55:18 -07:00
Jordan Woyak 637ae12ff4
Merge pull request #12703 from nlebeck/settingshandler-nomove-2
Pass `SettingsHandler` buffers by const ref instead of rvalue ref (since the contents are copied either way)
2024-04-13 17:10:11 -05:00
JosJuice 5456d990d1 Android/ControllerInterface: Run the init code
This was broken by a9a9fdd9e9. Because Init didn't run, the Android
input backend would crash whenever it tried to call into JVM code.
2024-04-13 22:39:10 +02:00
Tilka e62d8ecfa8
Merge pull request #12632 from jordan-woyak/input-backend-impls
Implement missing InputBackend classes.
2024-04-13 11:56:27 +01:00
mitaclaw 672be6a8cf PPCSymbolDB: GetDescription by std::string_view
Should save a lot of deep copies.
2024-04-13 00:19:01 -07:00
Admiral H. Curtiss 1bfeeb8a63
Merge pull request #12693 from Tilka/zelda3
DSPHLE/Zelda: simplify AFC decoding
2024-04-13 03:57:13 +02:00
Niel Lebeck d2b96736e0 Pass SettingsHandler buffers by const ref instead of rvalue ref 2024-04-12 18:50:21 -07:00
Admiral H. Curtiss b3939052b4
Merge pull request #12436 from Filoppi/frame-dump-raw-internal-resolution
Frame dump at raw internal resolution
2024-04-13 03:39:37 +02:00
Admiral H. Curtiss 2f13be5a2d
VideoConfig: Adjust FrameDumpResolutionType enum class to style guidelines 2024-04-13 03:21:39 +02:00
Admiral H. Curtiss 107379bf74
Merge pull request #12569 from GregoireLD/dolphin-GBAProfilePathFix
Fix path-loading of GBA map configurations
2024-04-13 02:46:07 +02:00
Admiral H. Curtiss 3a0720dd1f
Merge pull request #12681 from nlebeck/taskviewmodel-refactor
Refactor `TaskViewModel` to track task-related state in a single `MutableLiveData` instance
2024-04-13 01:42:12 +02:00
Admiral H. Curtiss b623a36005
Merge pull request #12688 from JosJuice/android-alert-synchronize
Android: Fix race condition in displayAlertMsg
2024-04-13 01:40:30 +02:00
Admiral H. Curtiss d58c998d6d
Merge pull request #12696 from mitaclaw/verify-widget-core-state-slot
VerifyWidget: Listen for Core::State OnEmulationStateChanged
2024-04-13 01:39:32 +02:00
Admiral H. Curtiss 0c1a76398b
Merge pull request #12691 from mitaclaw/jit-profiling-restoration
JitCache: Software Profiling Restoration
2024-04-13 01:35:25 +02:00
Jordan Woyak 9321318cb6 DolphinQt: Ensure controller settings show the game-controller indicator while expression editing. 2024-04-12 15:54:18 -05:00
Jordan Woyak e9fe0d3d5b NumericSetting: Stop values from binding to numbered input names. 2024-04-12 15:54:18 -05:00
Jordan Woyak 5039072ae9 ExpressionParser: Support unary plus operator. 2024-04-12 15:52:35 -05:00
Tilka 2011c7a448
Merge pull request #12697 from JosJuice/no-getpointer-part-4
VideoCommon: Remove calls to GetPointer
2024-04-12 20:01:09 +01:00
Tilka 9a9be5ca51
Merge pull request #12614 from nlebeck/settingshandler-edgecase
Add SettingsHandler unit tests exercising the edge case fixed in PR #8704
2024-04-12 17:32:51 +01:00
Tilka 771858b182
Merge pull request #12701 from Tilka/usbwait
Qt: trigger first USB device scan without a timer
2024-04-12 14:25:45 +01:00
Tilka 1fa5c3485c
Merge pull request #12699 from mitaclaw/cached-interpreter-perfmon-optimization
CachedInterpreter: Skip Updating Instruction PERFMON When There Are None
2024-04-11 16:19:42 +01:00
Tillmann Karras 99a8849125 Qt: trigger first USB device scan without a timer
Currently the dialog makes you wait one second before it shows anything.
Instead, trigger the first scan manually.
2024-04-11 16:48:10 +02:00
mitaclaw bc7b11517f MenuBar: Optimize SearchInstruction 2024-04-10 17:00:45 -07:00
mitaclaw 3073e8fd40 CachedInterpreter: Skip Updating Instruction PERFMON When There Are None 2024-04-10 04:09:37 -07:00
iwubcode abf380b705 VideoCommon: add xfb hash values (if available) to present information 2024-04-09 18:59:33 -05:00
iwubcode e5b7b2e9ee VideoCommon: add xfbs presented to video events 2024-04-09 18:57:32 -05:00
mitaclaw 94712ea06f Android: Access Software JIT Profiling 2024-04-09 13:43:32 -07:00
mitaclaw 6dad5cee65 DolphinQt: Access Software JIT Profiling 2024-04-09 13:43:32 -07:00
mitaclaw 30c63fa4a6 Common: Remove Unused PerformanceCounter Code 2024-04-09 13:43:32 -07:00
mitaclaw ee8bcf2ccc JitCache: Software Profiling Restoration
Rekindle software JIT profiling with a std::chrono conversion and a config connection.
2024-04-09 13:43:31 -07:00
mitaclaw fe8f836668 VerifyWidget: Listen for Core::State OnEmulationStateChanged 2024-04-09 12:13:02 -07:00
JosJuice 54773bc5d2 VideoCommon: Remove calls to GetPointer
This fourth part of my series of patches to get rid of unsafe uses of
GetPointer takes care of the "easy" cases in VideoCommon. Three uses of
GetPointer now remain in Dolphin: VertexLoaderManager, TextureInfo, and
the software renderer's TextureSampler.
2024-04-09 21:08:57 +02:00
Admiral H. Curtiss 69aca2fbfc
Merge pull request #11141 from JosJuice/jit64-soft-fma-nans-preserve
Jit64: Preserve inputs when software_fma && m_accurate_nans
2024-04-09 06:04:21 +02:00
Admiral H. Curtiss 35836225c5
Merge pull request #12646 from mitaclaw/ppc-cache-global-system
PPCCache: Avoid Global System Accessor
2024-04-09 05:57:57 +02:00
Admiral H. Curtiss e77def0478
Merge pull request #12690 from JosJuice/no-getpointer-part-3
IOS::HLE::BluetoothEmuDevice: Remove calls to GetPointer
2024-04-09 05:53:56 +02:00
mitaclaw cf74c0d683 PPCCache: Avoid Global System Accessor 2024-04-08 19:49:57 -07:00
mitaclaw eb92d6f0a8 Core::GetState: Avoid Global System Accessor 2024-04-08 16:23:23 -07:00
Filoppi 66592f79f2 Video: remove enforced resolution least common multiple of 4 when dumping screenshots and not videos (only videos encoders have this limit).
NOTE: this will likely trigger FIFOCI differences.
2024-04-08 22:54:45 +03:00
Filoppi 72db62e178 Video: split frame dumping settings into 3 resolution dumping modes
also polish aspect ratio related code for clarity
2024-04-08 22:54:45 +03:00
Niel Lebeck d7836efa1a Refactor TaskViewModel to track task-related state in a single MutableLiveData instance 2024-04-07 17:10:02 -07:00
Tillmann Karras 5db9924d13 DSPHLE/Zelda: set COMBINED_CMD_0D flag appropriately
All relevant games other than Pikmin 1 Wii seem to always set the two
dwords to zero, so previously they were ignored during command dispatch
and now we still ignore them but in the right place.
2024-04-07 18:53:01 +01:00
Tillmann Karras 8533b5649e DSPHLE/Zelda: simplify AFC decoding 2024-04-07 10:55:21 +01:00
mitaclaw be27c4f877 NativeLibrary: Create displayToastMsg Method 2024-04-06 15:41:23 -07:00
Tillmann Karras d1db347c8a evdev: close file descriptors in a separate thread
For some reason Linux is surprisingly slow at closing file descriptors
of event devices. This commit improves GUI startup times on my computer
by about 1.5 seconds.
2024-04-06 20:58:17 +01:00
JosJuice 5e58a46361 Jit64: Preserve inputs when software_fma && m_accurate_nans
When writing the software FMA code, I didn't realize that we can't
overwrite d if d is the same register as one of the inputs and
HandleNaNs is going to be called. This fixes that.
2024-04-06 21:38:58 +02:00
JosJuice f40dc7b5f9 IOS::HLE::BluetoothEmuDevice: Remove calls to GetPointer
Part 3 of stopping using GetPointer. This gets rid of the last
GetPointer call in IOS, which I skipped in part 1.
2024-04-06 21:04:54 +02:00
Sepalani 07a2429367 BBA/HLE: Fix network_ref coding style 2024-04-06 21:43:48 +04:00
Sepalani f3194b777b BBA/HLE: Move polling data logic into a method 2024-04-06 21:43:48 +04:00
Sepalani fbebbcc0fd BBA/HLE: Move functions to anonymous namespace 2024-04-06 21:43:48 +04:00
Sepalani 6e2a081cb9 BBA/HLE: Loop over network_ref once 2024-04-06 21:43:48 +04:00
Sepalani 9e0bf29329 BBA/HLE: Move GetSlot methods 2024-04-06 21:43:48 +04:00
Sepalani 5388f35cc4 BBA/HLE: Add NetworkRef::Clear method 2024-04-06 21:43:48 +04:00
Sepalani e915f990bb BBA/HLE: Make network_ref into a class 2024-04-06 21:43:48 +04:00
Tillmann Karras 9c705f1011 Movie: simplify silly loop 2024-04-06 18:28:43 +01:00
JosJuice 9ca9d073df Android: Fix race condition in displayAlertMsg
It was possible for sAlertMessageLock.notify() to be called before
sAlertMessageLock.wait(), causing Dolphin to deadlock. In particular,
this was guaranteed to happen if displayAlertMsg was called from the UI
thread while the emulation activity is being destroyed, because
runOnUiThread runs the passed-in anonymous function immediately when
called from the UI thread.

By replacing Object.wait/Object.notify with Semaphore.acquire/
Semaphore.release, it no longer matters what order the methods are
called in.
2024-04-05 22:46:48 +02:00
Admiral H. Curtiss d3073353a7
Merge pull request #12555 from sepalani/bba-connecting
BBA/HLE: Don't assume connect is successful
2024-04-05 21:29:10 +02:00
JosJuice eef71d50c3 Android: Unset STRIKE_THRU_TEXT_FLAG for editable settings
Because SettingViewHolder is used in RecyclerViews, we have to
explicitly unset STRIKE_THRU_TEXT_FLAG when we don't want it, otherwise
it might be left over from when the SettingViewHolder was representing
a different setting.
2024-04-05 20:14:41 +02:00
Admiral H. Curtiss ad331205d1
Merge pull request #12684 from Pokechu22/invalid-vertex-component
Fix out of bounds accesses for invalid vertex component formats
2024-04-04 22:10:18 +02:00
Pokechu22 a3951dc2d7 Fix out of bounds accesses for invalid vertex component formats
On all platforms, this would result in out of bounds accesses when getting the component sizes (which uses stuff from VertexLoader_Position.h/VertexLoader_TextCoord.h/VertexLoader_Normal.h). On platforms other than x64 and ARM64, this would also be out of bounds accesses when getting function pointers for the non-JIT vertex loader (in VertexLoader_Position.cpp etc.). Usually both of these would get data from other entries in the same multi-dimensional array, but the last few entries would be truly out of bounds. This does mean that an out of bounds function pointer can be called on platforms that don't have a JIT vertex loader, but it is limited to invalid component formats with values 5/6/7 due to the size of the bitfield the formats come from, so it seems unlikely that this could be exploited in practice.

This issue affects a few games; Def Jam: Fight for New York (https://bugs.dolphin-emu.org/issues/12719) and Fifa Street are known to be affected.

I have not done any hardware testing for this PR specifically, though I *think* I previously determined that at least a value of 5 behaves the same as float (4). That's what I implemented in any case. I did previously determine that both Def Jam: Fight for New York and Fifa Street use an invalid normal format, but don't actually have lighting enabled when that normal vector is used, so it doesn't change rendering in practice.

The color component format also has two invalid values, but VertexLoader_Color.h/.cpp do check for those invalid ones and return a default value instead of doing an out of bounds access.
2024-04-04 12:50:34 -07:00
Admiral H. Curtiss 4312840a4b
Merge pull request #12678 from JosJuice/no-getpointer-part-2
HW: Remove calls to GetPointer
2024-04-04 21:43:57 +02:00
Admiral H. Curtiss db8b2942aa
Merge pull request #12683 from LillyJadeKatrin/retroachievements-submodule-update
Update rcheevos submodule to newest master.
2024-04-04 21:14:44 +02:00
Admiral H. Curtiss 0aa92f7a56
Merge pull request #12685 from JosJuice/get-pointer-for-range-zero-size
Memmap: Don't show panic alert for 0 length range
2024-04-04 21:08:53 +02:00
JosJuice fad57b648f Memmap: Don't show panic alert for 0 length range
IOS::HLE::IOCtlVRequest::Dump sometimes tries to call GetPointerForRange
with an address of 0 and a size of 0. Address 0 is valid, but we were
mistakenly also trying to check that address 3FFFFFFF is valid, which it
isn't.

Fixes https://bugs.dolphin-emu.org/issues/13514.
2024-04-04 18:56:17 +02:00
LillyJadeKatrin 225a6da074 Update rcheevos submodule to newest master. 2024-04-03 15:03:36 -04:00
Filoppi 1f34adf216 Video: move all padding added for frame dumping to a single function,
which also avoids the output window from being resized randomly to be a multiple of 4
2024-04-03 13:32:01 +03:00
Filoppi d6230bbad8 Video: Change the frame dumper to actually use the raw emulation output resolution, avoiding any scaling if possible.
This should make comparisons much more reliable as pixels wouldn't be smushed together or stretched.
2024-04-03 13:32:01 +03:00
OatmealDome 4421cc471d
Merge pull request #12631 from jordan-woyak/remove-osx-input-leftovers
InputCommon: Remove some IOKit leftovers.
2024-04-01 17:05:13 -04:00
Dentomologist ac4fd2297f CheatsManager: Allow making the window smaller
Move CheatManager's child widgets into scroll areas to allow making the
window smaller than the default.

In CheatSearchWidget, enable word wrapping for the label describing the
address space and search type to help it fit better inside a narrower
window.
2024-03-31 13:17:56 -07:00
JosJuice ad43b03253 HW: Remove calls to GetPointer
Typically when someone uses GetPointer, it's because they want to read
from a range of memory. GetPointer is unsafe to use for this. While it
does check that the passed-in address is valid, it doesn't know the size
of the range that will be accessed, so it can't check that the end
address is valid. The safer alternative GetPointerForRange should be
used instead.

Note that there is still the problem of many callers not checking for
nullptr.

This is part 2 of a series of changes removing the use of GetPointer
throughout the code base. After this, VideoCommon is the one major part
of Dolphin that remains.
2024-03-31 21:58:05 +02:00
Admiral H. Curtiss a5e410df11
Merge pull request #12671 from JosJuice/no-getpointer-part-1
IOS: Remove calls to GetPointer
2024-03-31 21:16:19 +02:00
JosJuice 9873bcfb2b IOS: Remove calls to GetPointer
Typically when someone uses GetPointer, it's because they want to read
from a range of memory. GetPointer is unsafe to use for this. While it
does check that the passed-in address is valid, it doesn't know the size
of the range that will be accessed, so it can't check that the end
address is valid. The safer alternative GetPointerForRange should be
used instead.

Note that there is still the problem of many callers not checking for
nullptr.

This is the first part of a series of changes that will remove the usage
of GetPointer in different parts of the code base. This commit gets rid
of every GetPointer call from our IOS code except for a particularly
tricky one in BluetoothEmuDevice.
2024-03-31 10:22:02 +02:00
Admiral H. Curtiss dcae03a112
Merge pull request #12665 from Pokechu22/dsp-hle-asnd-2024
DSPHLE: Implement 2024 libasnd uCodes
2024-03-31 06:42:59 +02:00
Admiral H. Curtiss 1331332d38
Merge pull request #12656 from jordan-woyak/texture-dump-no-dups
VideoCommon: Scan texture dumping directory + subdirectories to not re-dump existing files.
2024-03-31 06:40:04 +02:00
Admiral H. Curtiss f3bf5d175e
Merge pull request #12609 from JosJuice/aspect-ratio-description
DolphinQt: Tweak the aspect ratio setting description
2024-03-31 06:39:36 +02:00
Admiral H. Curtiss a2074a8583
Merge pull request #12645 from mitaclaw/ppc-symbols-signal
DolphinQt: A Ubiquitous Signal For When Symbols Change
2024-03-31 06:36:09 +02:00
Admiral H. Curtiss 6e5f8d6692
Merge pull request #12640 from jordan-woyak/sdl-cleanup
SDL: Cleanups
2024-03-31 06:33:50 +02:00
JosJuice fb75ae410f Jit64: Clean up ExtractWithByteOffset
RCOpArg::ExtractWithByteOffset is only used in one place: a special case
of rlwinmx. ExtractWithByteOffset first stores the value of the
specified register into m_ppc_state (unless it's already there), and
then returns an offset into m_ppc_state. Our use of this function has
two undesirable properties (except in the trivial case `offset == 0`):

1. ExtractWithByteOffset calls StoreFromRegister without going through
   any of the usual functions. This violated an assumption I made when
   working on my constant propagation PR and led to a hard-to-find bug.
2. If the specified register is in a host register and is dirty,
   ExtractWithByteOffset will store its value to m_ppc_state even when
   it's unnecessary. In particular, this always happens when rlwinmx
   uses the same register as input and output, since rlwinmx always
   allocates a host register for the output and marks it as dirty.

Since ExtractWithByteOffset is only used in one place, I figure we might
as well inline it there. This commit does that, and also alters
rlwinmx's logic so the special case code is only triggered when the
input is already in m_ppc_state.

Input in `m_ppc_state`, before (11 bytes):

mov         esi, dword ptr [rbp-104]
mov         dword ptr [rbp-104], esi
movzx       esi, byte ptr [rbp-101]

Input in `m_ppc_state`, after (5 bytes):

movzx       esi, byte ptr [rbp-101]

Input in host register, before (8 bytes):

mov         dword ptr [rbp-104], esi
movzx       esi, byte ptr [rbp-101]

Input in host register, after (3 bytes):

shr         edi, 0x18
2024-03-30 22:47:44 +01:00
Jordan Woyak 86102e7ce9
Merge pull request #12670 from mitaclaw/branchwatch-fileutil-copy-paste
FileUtil: Fix BranchWatch User Path
2024-03-29 13:46:20 -05:00
mitaclaw 88dadf81d4 FileUtil: Fix BranchWatch User Path
I mistakenly put `D_DUMP_IDX` here instead of `D_DUMPDEBUG_IDX`.
2024-03-29 11:05:45 -07:00
JosJuice fbc3539b4e
Merge pull request #12666 from Matt-Swift/master
Add tapserver BBA and Modem Adapter UI options to Android
2024-03-29 15:37:57 +01:00
JosJuice f30d3c9092
Merge pull request #12662 from JosJuice/jitarm64-imm-rc0-sxtw
JitArm64: Skip SXTW in ComputeRC0(u64)
2024-03-29 15:36:33 +01:00
JosJuice 5f6a054ffc
Merge pull request #12661 from Sintendo/arm64divwux
JitArm64: Optimize divwux
2024-03-29 15:36:18 +01:00
mitaclaw 6e6b298030 Core::RunOnCPUThread: Avoid Global System Accessor 2024-03-28 10:10:03 -07:00
JMC47 aea1f64873
Merge pull request #12659 from mitaclaw/qt-debug-font
DolphinQt Settings: Signal Debug Font By Const Reference
2024-03-28 13:04:39 -04:00
JMC47 aa9601a563
Merge pull request #12658 from mitaclaw/core-global-system-2b
Core: Remove RunAsCPUThread
2024-03-28 13:04:08 -04:00
mitaclaw b52a08d533 DolphinQt: A Ubiquitous Signal For When Symbols Change
There were three distinct mechanisms for signaling symbol changes in DolphinQt: `Host::NotifyMapLoaded`, `MenuBar::NotifySymbolsUpdated`, and `CodeViewWidget::SymbolsChanged`. The behavior of these signals has been consolidated into the new `Host::PPCSymbolsUpdated` signal, which can be emitted from anywhere in DolphinQt to properly update symbols everywhere in DolphinQt.
2024-03-28 09:57:22 -07:00
Matt 39f5597089 Add tapserver BBA and Modem Adapter UI config to Android
This PR simply exposes the tapserver options in Serial Port 1 on Android. They already exist and work, but are not selectable. I've tested the tapserver options myself with Phantasy Star Online Episode I & II and they work fine.
2024-03-25 17:37:29 +00:00
JosJuice 06329ecfc7 Core: Fix IPL device m_cursor overflow
Not sure if the behavior I'm implementing here is what real hardware
does, but since this is a buffer overflow, I'd like to get it fixed
quickly. Hardware verification can happen later.

https://bugs.dolphin-emu.org/issues/13506
2024-03-25 18:31:36 +01:00
JosJuice d57c68a625 Core: Get rid of IPL device macros
Having to look up macros that are defined elsewhere makes the code
harder to reason about. The macros don't remove enough repetition to
justify their existence in my opinion.
2024-03-25 17:55:13 +01:00
Pokechu22 cd5f6ddd9b DSPHLE: Implement 2024 libasnd uCodes 2024-03-24 11:59:32 -07:00
Pokechu22 c85f5f8023 DSPHLE: Redefine asnd SwapLeftRight to apply to old versions 2024-03-24 11:58:04 -07:00
JosJuice 28da3160c3 DolphinQt: Tweak the aspect ratio setting description
With this, I intend to make it clearer that Auto, Force 4:3, Force 16:9
and Custom are really the same thing, just with the aspect ratio of the
simulated TV being selected in a different way. I also extended the
introduction in a way I feel will clarify things but which you are
welcome to bikeshed :)

I was thinking of this during the review of 41b19e262f, but wanted to
put it in a separate PR as to avoid blocking it on bikeshedding.

I'm a bit unsure what to do about the word "analog" in "analog TV". I
felt that repeating it for each of these options would be too
repetitive. I suppose there's a reason why we used the word originally,
but digital TVs do give you basically the same aspect ratio for GC/Wii
games as analog TVs. (Of course, whether it's 4:3-like or 16:9-like
depends on what aspect ratio you set in the TV's settings, but that's
the case for widescreen CRTs too.)
2024-03-24 15:18:58 +01:00
Jordan Woyak 38117ef066 DolphinQt: Update AboutDialog to include number of commits ahead of master. 2024-03-23 16:48:52 -05:00
Jordan Woyak 02f57a4778 Replace SCM_IS_MASTER with SCM_COMMITS_AHEAD_MASTER 2024-03-23 16:48:52 -05:00
Bram Speeckaert 2580837c60 JitArm64: Optimize divwux
When the divisor is a constant value, we can emit more efficient code.
For powers of two, we can use bit shifts. For other values, we can
instead use a multiplication by magic constant method.

- Example 1 - Division by 16 (power of two)
Before:
mov    w24, #0x10                ; =16
udiv   w27, w25, w24

After:
lsr    w27, w25, #4

- Example 2 - Division by 10 (fast)
Before:
mov    w25, #0xa                 ; =10
udiv   w27, w26, w25

After:
mov    w27, #0xcccd              ; =52429
movk   w27, #0xcccc, lsl #16
umull  x27, w26, w27
lsr    x27, x27, #35

- Example 3 - Division by 127 (slow)
Before:
mov    w26, #0x7f                ; =127
udiv   w27, w27, w26

After:
mov    w26, #0x408               ; =1032
movk   w26, #0x8102, lsl #16
umaddl x27, w27, w26, x26
lsr    x27, x27, #38
2024-03-23 20:13:15 +01:00
Bram Speeckaert 749ee2ff5e Jit64: Refactor divwux
Now that we've moved the logic to DivUtils, refactor the Jit64 code to
use it.
2024-03-23 20:13:15 +01:00
Bram Speeckaert 825a10616c DivUtils: Add unsigned division magic function
Takes the logic from Jit64 and moves it into DivUtils, so it can be
reused by other backends as well.
2024-03-23 20:13:15 +01:00
JosJuice 9f0a7c9875 JitArm64: Skip SXTW in ComputeRC0(u64)
MOVI2R can set the upper bits to ones for free by using MOVN instead of
MOVZ.
2024-03-23 14:30:00 +01:00
mitaclaw 73f9904f2a Core: Remove RunAsCPUThread
It's a fine function, but CPUThreadGuard is more vogue. Also, its potential for being confused with RunOnCPUThread will not be missed.
2024-03-23 03:33:26 -07:00
mitaclaw ae5da02cde DolphinQt Settings: Signal Debug Font By Const Reference 2024-03-22 07:52:52 -07:00
Admiral H. Curtiss 3948ac9513
Merge pull request #12606 from mitaclaw/state-global-system
State: Avoid Global System Accessor
2024-03-22 04:27:12 +01:00
Admiral H. Curtiss f814dc58b5
Merge pull request #12620 from mitaclaw/jit-interface-cpu-thread-guard
JitInterface::ClearCache: Modernize With CPUThreadGuard
2024-03-22 04:17:33 +01:00
Admiral H. Curtiss f8fdaf9b94
Merge pull request #12648 from mitaclaw/core-global-system
Core: Avoid (Some) Global System Accessor
2024-03-22 04:13:01 +01:00
Admiral H. Curtiss 4f3b4471f2
Merge pull request #12654 from jordan-woyak/gcadapter-timeout
GCAdapter: Adjust libusb transfer timeout to 100ms.
2024-03-22 02:55:30 +01:00
Admiral H. Curtiss b510ac89a3
Merge pull request #12355 from fuzziqersoftware/tapserver-modem-adapter
Implement tapserver-based modem adapter
2024-03-22 02:47:06 +01:00
Admiral H. Curtiss f535b61d5d
Merge pull request #12652 from iwubcode/json_util_update
Common: add even more json utility functions
2024-03-22 02:45:58 +01:00
Jordan Woyak 550e008774 VideoCommon: Scan texture dumping directory + subdirectories to not re-dump existing files. 2024-03-21 20:27:34 -05:00
Admiral H. Curtiss 2d5286d2e2
Merge pull request #12642 from jordan-woyak/state-write-osd-errors
Core/State: Display messages on state write failures.
2024-03-21 03:55:05 +01:00
JMC47 03f2b99ffe
Merge pull request #12603 from Sam-Belliveau/oklab_resampling
Add HDR to Metal + Perceptual HDR
2024-03-20 22:45:10 -04:00
Admiral H. Curtiss b19cf1f962
Merge pull request #12650 from jordan-woyak/balloon-tip-multimon
DolphinQt: Fix BalloonTip positioning on secondary monitors.
2024-03-21 03:33:43 +01:00
Admiral H. Curtiss 7f1e7314de
Merge pull request #12649 from mitaclaw/kill-is-running-in-current-thread
Core: Remove Unused IsRunningInCurrentThread Function
2024-03-21 03:32:48 +01:00
Jordan Woyak f922129255 Core/State: Display messages on state write failures. 2024-03-20 20:38:04 -05:00
Jordan Woyak 76a74daac2
Merge pull request #12641 from jordan-woyak/d3d-before-ogl
VideoCommon: Prefer D3D11/12 over OpenGL on Windows.
2024-03-20 18:21:48 -05:00
Jordan Woyak 719d76ab2e GCAdapter: Adjust libusb transfer timeout to 100ms. 2024-03-20 18:02:06 -05:00
iwubcode 146504d635 Common: add json utility functions 'ReadStringFromJson' and 'ReadBoolFromJson' to match 'ReadNumericFromJson' functionality for other data types, similarly support other data types for 'ToJsonArray' 2024-03-20 17:34:25 -05:00
iwubcode 69694494ce Common: update 'ReadNumericOrDefault' to 'ReadNumericFromJson' and have it return an optional, this provides the caller with more flexibility 2024-03-20 17:34:25 -05:00
Jordan Woyak 647eba36f3 DolphinQt: Fix BalloonTip positioning on secondary monitors. 2024-03-20 03:13:11 -05:00
mitaclaw 11b628f250 Core: Remove Unused IsRunningInCurrentThread Function 2024-03-18 07:18:41 -07:00
mitaclaw f09b71582e Core: Avoid (Some) Global System Accessor 2024-03-18 01:35:42 -07:00
Martin Michelsen f7a0147176 prevent backpressure when m_read_enabled is not set 2024-03-17 18:37:55 -07:00
Martin Michelsen 3e9ac1aaf3 fix tapserver SIGPIPE handling on Linux 2024-03-17 18:37:55 -07:00
Martin Michelsen 5d8a01cba7 respond to further review feedback 2024-03-17 18:37:55 -07:00
Martin Michelsen 7775ea325f close modem socket after joining read thread 2024-03-17 18:37:55 -07:00
Martin Michelsen 9d0d2f0a40 handle ATH0 command 2024-03-17 18:37:55 -07:00
Martin Michelsen 12a7e17a41 fix warnings in windows build 2024-03-17 18:37:55 -07:00
Martin Michelsen 9cf8131b23 respond to review feedback on tapserver implementation 2024-03-17 18:37:55 -07:00
Martin Michelsen dcb7a72c14 add modem files to windows build 2024-03-17 18:37:55 -07:00
Martin Michelsen 02deaa6748 Implement GC modem adapter
This implements the GameCube modem adapter. This implementation is stable but not perfect; it drops frames if the receive FIFO length is exceeded. This is probably due to the unimplemented interrupt mentioned in the comments. If the tapserver end of the connection is aware of this limitation, it's easily circumvented by lowering the MTU of the link, but ideally this wouldn't be necessary.

This has been tested with a couple of different versions of Phantasy Star Online, including Episodes 1 & 2 Trial Edition. The Trial Edition is the only version of the game that supports the Modem Adapter and not the Broadband Adapter, which is what made this commit necessary in the first place.
2024-03-17 18:37:55 -07:00
Martin Michelsen 083116a89c rewrite tapserver interface for better error handling 2024-03-17 18:37:55 -07:00
Martin Michelsen a36600ae50 add TAPServer.cpp to Windows build 2024-03-17 18:37:55 -07:00
Martin Michelsen f90812d8e1 fix android syntax error 2024-03-17 18:37:55 -07:00
Martin Michelsen 0c364cbb4c implement tapserver BBA on all platforms
This expands the tapserver BBA interface to be available on all platforms. tapserver itself is still macOS-only, but newserv (the PSO server) is not, and it can directly accept local and remote tapserver connections as well. This makes the tapserver interface potentially useful on all platforms.
2024-03-17 18:37:55 -07:00
Admiral H. Curtiss 85dee300b5
Merge pull request #12644 from jordan-woyak/ar-multi
DolphinQt: Allow Cheat Search to create multiple AR codes.
2024-03-17 16:26:38 +01:00
Admiral H. Curtiss c964d552c9
Merge pull request #12616 from mitaclaw/dvd-interface-cpu-thread-guard
DVDInterface: Modernize With CPUThreadGuard
2024-03-17 16:14:56 +01:00
Jordan Woyak c202b55bd4 DolphinQt: Allow Cheat Search to create multiple AR codes when selecting multiple lines. 2024-03-17 01:29:39 -05:00
Admiral H. Curtiss 1ee923fd3d
Merge pull request #12630 from mitaclaw/ppc-symbols-global
PPCSymbolDB: Move instance to PowerPCManager
2024-03-17 06:03:05 +01:00
Tillmann Karras d933e58d9a Cubeb: check correct log level 2024-03-17 01:33:42 +00:00
Jordan Woyak ac5c2d9bf2 VideoCommon: Prefer D3D11/12 over OpenGL on Windows. 2024-03-15 19:51:04 -05:00
Jordan Woyak 3a85725ffa SDL: Remove duplicate button/hat Inputs. Hide duplicate Axis Inputs. 2024-03-14 23:50:17 -05:00
Jordan Woyak ee43c9508c ControllerInterface: Add IsHidden function to Control interface. 2024-03-14 23:43:58 -05:00
Jordan Woyak 0538366326 SDL: Deduplicate Motor logic with templates. 2024-03-14 23:43:58 -05:00
Jordan Woyak 0fff8374d0 SDL: Move class definition out of header. 2024-03-14 23:43:58 -05:00
Admiral H. Curtiss 369502b49b
Merge pull request #12635 from jordan-woyak/ir-passthrough-indicator
DolphinQt: Add IRPassthrough indicator.
2024-03-15 03:07:19 +01:00
Admiral H. Curtiss 9cdd571745
Merge pull request #12633 from LillyJadeKatrin/retroachievements-toggle-spam
Added locks to achievement runtime calls
2024-03-15 02:58:02 +01:00
Admiral H. Curtiss fe64289391
Merge pull request #12637 from CrossVR/disable-vcpkg
VSProps: Set VcpkgEnabled to false
2024-03-15 02:57:00 +01:00
Admiral H. Curtiss 2620f73b8c
Merge pull request #12638 from Tilka/cubeb
Cubeb: change log level from NOTICE to INFO
2024-03-15 02:55:28 +01:00
LillyJadeKatrin 08ecefe0f7 Added locks to achievement runtime calls
Testing found that spamming toggles for Enable Leaderboards etc risked leaderboards being deleted while the runtime was in the process of recalculating them; this should clear up those conflicts.
2024-03-14 14:32:47 -04:00
mitaclaw c24fa93965 PPCSymbolDB: Move instance to PowerPCManager 2024-03-13 22:58:14 -07:00
Tillmann Karras 4d9038c7c3 Cubeb: change log level from NOTICE to INFO
Cubeb logs a message at CUBEB_LOG_NORMAL verbosity every time you start
or stop a stream which can get a bit annoying when using frame advance
at Dolphin's default verbosity.
2024-03-14 00:31:02 +00:00
Jules Blok 07448dcc81 VSProps: Set VcpkgEnabled to false
We don't rely on vcpkg for dependencies
2024-03-13 16:37:18 +01:00
Sepalani da86c2bcc6 BBA/HLE: Don't assume connect is successful 2024-03-12 12:25:42 +04:00
mitaclaw c377c1e21e CheatsManager/CheatSearchWidget: Avoid Global System Accessor
OnResetClicked and GenerateARCode appear to have been using the CPUThreadGuard in error.
2024-03-11 20:51:15 -07:00
Admiral H. Curtiss 551dcec0b1
Merge pull request #12602 from mitaclaw/qt-memory-global-system
Memory(View)Widget: Avoid Global System Accessor
2024-03-12 04:12:52 +01:00
Admiral H. Curtiss 6ccf35ad4d
Merge pull request #12600 from lioncash/dspreg
DSPJitRegCache: Take DynamicReg instances by reference in FlushRegs()
2024-03-12 04:02:09 +01:00
Jordan Woyak 62caa24d40 DolphinQt: Add IRPassthrough indicator. 2024-03-11 21:40:53 -05:00
Admiral H. Curtiss d35a88564f
Merge pull request #12608 from mitaclaw/bootmanager-global-system
BootManager: Avoid Global System Accessor
2024-03-12 03:39:48 +01:00
Admiral H. Curtiss 72bcdadc16
Merge pull request #12492 from AdmiralCurtiss/wiimote-ir-passthrough
Implement IR passthrough for emulated Wiimotes
2024-03-12 03:27:07 +01:00
Admiral H. Curtiss cda008bd10
Merge pull request #12533 from sepalani/bba-psh-ack
BBA/HLE: Add missing PSH flag
2024-03-12 03:09:11 +01:00
Jordan Woyak f86e9e9cbd
Merge pull request #12610 from mitaclaw/branch-watch-dialog-gcc
BranchWatchDialog: Fix GCC Warnings
2024-03-11 17:36:21 -05:00
Admiral H. Curtiss f6f435e624
WiimoteEmu: Set sensible defaults for IR Object expressions. 2024-03-11 22:51:57 +01:00
Admiral H. Curtiss 617fcc3cf8
WiimoteEmu: Add user-accessible controls that report the desired state of the IR camera objects. 2024-03-11 22:49:19 +01:00
Admiral H. Curtiss c3903fcc7e
InputCommon/WiimoteController: Add inputs that report the raw IR objects seen by the Wiimote. 2024-03-11 22:46:05 +01:00
Admiral H. Curtiss 9c68b156d1
Core/HW/WiimoteCommon: Add a method to DataReport to query the format of the stored IR data. 2024-03-11 22:27:16 +01:00
Admiral H. Curtiss eced34f3f3
Core/HW/WiimoteEmu: Allow storing and reporting up to 4 camera objects, like a real Wiimote. 2024-03-11 22:27:16 +01:00
Jordan Woyak 5c656a2b6f
Merge pull request #12623 from eltociear/patch-1
WiimoteReal: fix typo in WiimoteReal.cpp
2024-03-11 12:19:46 -05:00
Jordan Woyak a9a9fdd9e9 InputCommon: Add Android InputBackend class. 2024-03-11 03:25:31 -05:00
Jordan Woyak 8583b6751a InputCommon: Handle window change in Quartz. 2024-03-11 03:25:31 -05:00
Jordan Woyak 3665f7abac InputCommon: Implement xlib window change logic. 2024-03-11 03:25:31 -05:00
Jordan Woyak 341f99a3f1 InputCommon: Add Win32 InputBackend class. 2024-03-11 03:25:31 -05:00
Jordan Woyak 2ac59bf581 InputCommon: Add Pipes InputBackend class. 2024-03-11 03:05:52 -05:00
Jordan Woyak 8098be3dfa InputCommon: Add XInput2 InputBackend class. 2024-03-11 03:05:52 -05:00
Jordan Woyak 498584ac77 InputCommon: Add Quartz InputBackend class. 2024-03-11 03:05:52 -05:00
Jordan Woyak 9941c54911 InputCommon: Provide WindowSystemInfo getter for ControllerInterface. 2024-03-11 01:31:05 -05:00
Jordan Woyak b23dbad098 InputCommon: Remove some IOKit leftovers. 2024-03-11 01:11:13 -05:00
Sam Belliveau 153d0201a8 Add HDR to Metal 2024-03-10 03:25:33 -04:00
Admiral H. Curtiss b89a88afbc
Merge pull request #12615 from mitaclaw/ppc-symbol-db-member
PPCSymbolDB: Eliminate Redundant Member
2024-03-10 06:18:23 +01:00
Admiral H. Curtiss adac827a04
Merge pull request #12625 from mitaclaw/Wshadow-uncaptured-local
CMakeLists: Add Clang's Specific WShadow Diagnostics
2024-03-10 00:59:20 +01:00
mitaclaw f71f2c6ba1 CMakeLists: Add Clang's Specific WShadow Diagnostics
For parity with GCC.
2024-03-09 15:34:39 -08:00
Admiral H. Curtiss ef75a6ff23
Merge pull request #12622 from mitaclaw/branch-watch-dialog-errata
BranchWatchDialog: Fix Misc. Errata
2024-03-10 00:06:21 +01:00
LillyJadeKatrin 5418e89523 Adjusted achievement progress updates to duration short 2024-03-08 23:26:56 -05:00
mitaclaw fe61efcd7a DVDInterface: Modernize With CPUThreadGuard 2024-03-08 15:17:41 -08:00
MikeIsAStar 11dd5ba485 MMU: Remove erroneous continue statement
The updated behavior more closely emulates the functionality of physical hardware.
2024-03-08 16:36:38 -05:00
mitaclaw 0645b4d579 BranchWatchDialog: Fix Misc. Errata
Window icon was missing from QDialog lacking a parent.
Giving the QDialog a parent revealed I had failed to make it properly non-modal, necessitating further changes.
Settings save less often, now only upon destruction.
Construction of BranchWatchDialog is now deferred.
2024-03-07 15:59:03 -08:00
Niel Lebeck 9029b7a082 Add SettingsHandler unit tests exercising the edge case in PR #8704 2024-03-06 22:08:30 -08:00
mitaclaw 0f36654d2b PPCSymbolDB: Eliminate Redundant Member
This can be accessed through the CPUThreadGuard.
2024-03-06 21:44:53 -08:00
Ikko Eltociear Ashimine 7b0d4f0578
WiimoteReal: fix typo in WiimoteReal.cpp
continous -> continuous
2024-03-07 01:27:39 +09:00
mitaclaw 4568446398 JitInterface::ClearCache: Modernize With CPUThreadGuard
It is recommended to view this diff with whitespace changes hidden.
2024-03-04 19:45:34 -08:00
LillyJadeKatrin 085c17aed4 Remove the update callback on all events
Not only was the extra call to the update callback in the AchievementEventHandler method unnecessary, it was getting called on events that don't even need to be tracked here, causing a lot of lag when it turned out one achievement was repeatedly spamming Achievement Reset Events as a shortcut.
2024-03-04 20:04:08 -05:00
OatmealDome 6372bf51eb
Merge pull request #12597 from nlebeck/settingshandler-unittests-thirdtry
Add some simple unit tests for SettingsHandler
2024-03-03 18:13:45 -05:00
OatmealDome aba9b110e8
Merge pull request #12612 from LillyJadeKatrin/retroachievements-logout-bug
Don't Publish Unofficial Achievements
2024-03-03 14:51:04 -05:00
JMC47 93c95ee1a3
Merge pull request #12592 from LillyJadeKatrin/retroachievements-enable-hardcore
Properly enable RetroAchievements hardcore mode
2024-03-03 13:20:23 -05:00
LillyJadeKatrin f556f646a2 Don't Publish Unofficial Achievements
Check an achievement's category and only request RetroAchievements to award if it is CORE and not UNOFFICIAL.
2024-03-03 12:58:20 -05:00
mitaclaw 8d5e39751e BranchWatchDialog: Fix GCC Warnings
GCC can't lambda right.
2024-03-02 07:53:23 -08:00
Admiral H. Curtiss 58616a6e4c
Merge pull request #12438 from Filoppi/custom_relative_aspect_ratio
Add Custom Relative and Raw (Squared Pixels) aspect ratios
2024-03-02 14:14:19 +01:00
Admiral H. Curtiss f2e04e0603
Merge pull request #12359 from mitaclaw/code-diff-dialog-refresh
BranchWatchDialog: A Total Replacement for CodeDiffDialog
2024-03-02 14:13:54 +01:00
Admiral H. Curtiss 8840f7f8bc
Merge pull request #12599 from lioncash/vertman
VertexManagerBase: Initialize m_ticks_elapsed on construction
2024-03-02 14:11:23 +01:00
mitaclaw 16c609dcd4 BootManager: Avoid Global System Accessor 2024-03-01 23:39:04 -08:00
Niel Lebeck 0344ec6d79 Add simple unit tests for SettingsHandler 2024-03-01 20:52:45 -08:00
Naim2000 f208b320a3 AesDevice: fix key & iv arrays 2024-03-01 15:00:28 -05:00
mitaclaw 0d4cb5ddc7 State: Avoid Global System Accessor 2024-03-01 10:52:50 -08:00
mitaclaw 26141eece8 Memory(View)Widget: Avoid Global System Accessor 2024-03-01 07:09:20 -08:00
Filoppi 41b19e262f Add custom relative and raw (squared pixels) aspect ratio modes 2024-02-29 21:11:19 +02:00
Lioncash e52109a356 DSPJitRegCache: Take DynamicReg instances by reference in FlushRegs()
A DynamicReg instance is 80 bytes in size, so this just gets rid of some
unnecessary copy churn.
2024-02-28 10:27:35 -05:00
Lioncash 7bf77a56f4 VertexManagerBase: Initialize m_ticks_elapsed on construction
Ensures that this always has a deterministic value on construction like
everything else in the class.
2024-02-28 10:21:08 -05:00
Mai 5a81916ee9
Merge pull request #12598 from mitaclaw/case-insensitive
CodeWidget: Simplify Case-Insensitive Contains
2024-02-28 08:48:10 -05:00
mitaclaw 8eeb93d51a CodeWidget: Simplify Case-Insensitive Contains 2024-02-27 12:03:38 -08:00
mitaclaw 8134c8a572 BranchWatchDialog: A Total Replacement for CodeDiffDialog
With a purpose-built Branch Watch feature built into the emulated system: BranchWatchDialog, replacing CodeDiffDialog, is now better than ever!
2024-02-27 11:40:58 -08:00
mitaclaw fd8f2c7822 JitArm64: Install BranchWatch 2024-02-26 19:38:27 -08:00
mitaclaw 7cccedca1e Jit64: Install BranchWatch 2024-02-26 19:38:27 -08:00
mitaclaw 2aa250a68a Interpreter: Install BranchWatch 2024-02-26 19:38:27 -08:00
mitaclaw 67f60bec7e PowerPC: Implement BranchWatch
This new component can track code paths by watching branch hits.
2024-02-26 19:38:27 -08:00
LillyJadeKatrin 56b82e764c Clear active challenges when game closes
Failing to do this was causing challenge icons to carry over into the next game if a game was closed while the icons were active, even if the next game to run was a completely different game entirely with completely different badges.
2024-02-26 22:21:05 -05:00
Admiral H. Curtiss 5090a028e6
Merge pull request #12435 from Filoppi/fix-aspect-ratio-stuck
Fix aspect ratio heuristics getting stuck to a state
2024-02-20 21:36:43 +01:00
Filoppi 48fbbdba7c Video: update widescreen heuristic code to never get stuck to specific old values when changing settings 2024-02-20 22:26:19 +02:00
LillyJadeKatrin d66b96b1c0 Properly enable RetroAchievements hardcore mode
RetroAchievements plans to use the user_agent in unlock requests to determine which software version was used to play the game, and can filter older software versions out. As such, I have been given the go-ahead to remove the hardcoded line that forces hardcore to always be false.
2024-02-20 12:59:01 -05:00
Filoppi 3f102ea8c2 Video: Make the game resolution (within the window) snap to the XFB size if they are within a ~1 pixel treshold on one axis only.
This takes care of making the image clearer in some edge cases where the game was already running at near perfect
 4:3 with no stretching, and the VI aspect ratio didn't match the XFB by one pixel, making the image stretched and blurry.
-Video: Fix `FindClosestIntegerResolution() using the window aspect ratio and not the draw aspect ratio, causing it to prefer
 stretching over black bars in cases when it wasn't desirable.
2024-02-20 03:09:11 +02:00
Filoppi 95ee0ac781 Video: Fix aspect ratio heuristics getting stuck to widescreen (or to non widescreen) (`m_is_game_widescreen` variable) if the user first forced the aspect ratio to 16:9/4:3 and then set it back to Auto. 2024-02-20 02:42:52 +02:00
Admiral H. Curtiss ccf2435047
Merge pull request #12586 from LillyJadeKatrin/retroachievements-pointspread-fix
Fixes to Achievement points count/mastery
2024-02-19 02:41:14 +01:00
LillyJadeKatrin e5b73fec08 Fixes to Achievement points count/mastery
Two minor updates to improve the Achievement Manager's handling of a player's completion rate.
One, UnlockStatus and the unlock map now track achievement category, such that TallyScore does not count unofficial achievements in counts/points.
Two, the determinations for mastery/completion are now improved to check (1) that the achievement triggering this is CORE (not UNOFFICIAL) and (2) that it has not already been unlocked at this level on the site, which should be sufficient to determine that the unlocking of this particular achievement completes/masters the game.
2024-02-18 19:27:18 -05:00
Mai 22d96ef5b5
Merge pull request #12590 from iwubcode/graphics_mod_action_factory_name
VideoCommon: move factory names to be a static inside each action class
2024-02-18 17:13:03 -05:00
Mai 27415b0ba1
Merge pull request #12587 from AdmiralCurtiss/localtime
Core: Fix crash when inspecting a savestate with a timestamp that causes localtime() to error out
2024-02-18 17:12:29 -05:00
iwubcode a1147dae6e VideoCommon: move factory names to be a static inside each action class, so that they can be reused in the future for serialization 2024-02-18 15:45:10 -06:00
Admiral H. Curtiss 638808c944
IOS/FS: Display the invalid path in the ASSERT in BuildFilename(). 2024-02-18 20:06:32 +01:00
Admiral H. Curtiss 0157166940
Merge pull request #12585 from iwubcode/json_util_vec3
Common: add json utility functions for Vec3 serialization
2024-02-18 19:02:59 +01:00
iwubcode edbf8f1772 Common: add json utility functions for Vec3 serialization 2024-02-17 22:06:06 -06:00
Admiral H. Curtiss d3140e72c3
Core: Fix crash when inspecting a savestate with a timestamp that causes localtime() to error out. 2024-02-18 04:45:37 +01:00
Admiral H. Curtiss 52410813f2
Common: Add utility function that wraps localtime_s() or localtime_t(). 2024-02-18 04:40:25 +01:00
Admiral H. Curtiss 982ad93355
Merge pull request #12582 from LillyJadeKatrin/retroachievements-bugfix-2
Improved achievements disabled messaging
2024-02-18 03:49:44 +01:00
Admiral H. Curtiss 9b5fd5d34e
Merge pull request #12281 from TellowKrinkle/AsahiGL33
VideoCommon: Don't use indexed output for fbfetch
2024-02-18 02:33:50 +01:00
Dentomologist 56ff19c513 BalloonTip: Rework BalloonTip drawing
* Fix irregularly shaped corners
* Remove extra space for BalloonTips with no message or no title
* When the target tip location is not on a screen, put the tooltip on
  the mouse's screen instead of the primary screen
* Fix description getting cut off when the title was too long
* Expose border width as a parameter
* Fix spacing and sizing issues with larger border widths
2024-02-17 12:36:19 -08:00
Mai 21300bb21b
Merge pull request #12457 from iwubcode/asset_memory_limit
VideoCommon: handle asset memory going over reserved limit correctly
2024-02-16 15:46:52 -05:00
LillyJadeKatrin 394af40db5 Improved achievements disabled messaging
Most obviously, there is no longer a warning message to the player in the achievement window that achievements are disabled if a game is not currently running.
2024-02-15 16:33:18 -05:00
Dentomologist a1d6a54eaa DolphinTool: Fix parsing of command line bzip2 flag
Use "bzip2" instead of "bzip" in optparse's compression choices for the
convert command. This is both more accurate and matches what the
ParseCompressionTypeString function expects.

The mismatch between the two parsing functions prevented compression
using bzip2 because either ParseCompressionTypeString or optparse would
generate an error when using "bzip" or "bzip2" respectively.

Fixes https://bugs.dolphin-emu.org/issues/13427
2024-02-13 12:44:03 -08:00
Mai a583526a1c
Merge pull request #12575 from n8pjl/werror-nonnull
IOFile: avoid clearing errors on null file struct
2024-02-13 07:43:19 -05:00
Mai 9e6d701fbc
Merge pull request #12577 from iwubcode/mesh_for_asset_loader
VideoCommon: make mesh asset data loadable by asset loader
2024-02-13 07:42:57 -05:00
iwubcode 2ab877586d VideoCommon: make mesh asset data loadable by asset loader 2024-02-12 21:45:32 -06:00
Admiral H. Curtiss f0d363eea7
Core/DSPHLE: Construct accelerator in AX and AXWii constructors.
This fixes an issue introduced by 3b0444be6b
where the m_accelerator would not be initialized when loading a savestate if
the current UCode mismatched the UCode in the savestate, leading to a crash.
2024-02-12 04:18:18 +01:00
Peter Lafreniere 3da2e15e6b IOFile: avoid clearing errors on null file struct
When performing a default compilation with recent GCC & glibc,
the use of -Werror=nonnull causes a build error.

The error is given as IOFile::ClearError() can call std::clearerr()
with a null file, which can trigger a null-pointer dereference in libc.

Change the std::clearerr() call to be conditional on a file being open.
2024-02-11 20:55:31 -05:00
Mai aa66842172
Merge pull request #12574 from sepalani/exi-exit
EXI: Don't kill Dolphin when receiving BBA_IOB
2024-02-11 20:32:33 -05:00
iwubcode 60772ed9d2 VideoCommon: add functionality to prepare for a mesh asset that is loaded from a GLTF file 2024-02-11 13:28:00 -06:00
iwubcode ecfcae8718 Externals: add tinygltf, a library used to load or save GLTF mesh files 2024-02-11 13:26:39 -06:00
Sepalani 7c276c1993 EXI: Don't kill Dolphin when receiving BBA_IOB
According to @Kirbymimi it doesn't crash on real hardware.

Testing was done by sending many UDP packets to an unbound port.
2024-02-11 23:15:23 +04:00
Mai 80d77ac0b4
Merge pull request #12568 from noahpistilli/kd-register-default-id
IOS/KD: Correctly handle registration of the default user ID
2024-02-11 13:52:40 -05:00
Mai dd15c012f3
Merge pull request #12573 from JosJuice/android-wii-menu-download-size
Android: Mention download size in the Wii Menu not installed message
2024-02-11 13:52:01 -05:00
Mai 9b3fdfb37b
Merge pull request #12572 from JosJuice/android-menu-init-guard
Android: Don't check Wii Menu version before directory initialization
2024-02-11 13:51:30 -05:00
JosJuice b404da78c4 Android: Mention download size in the Wii Menu not installed message
Google Play's policies require us to tell the user the size of any large
download.

The size seems to vary by just a megabyte or two across regions in my
testing, so I'm listing a rough size for all the regions.

I'm also taking the opportunity to shorten the message to make it easier
to read.
2024-02-11 11:34:51 +01:00
JosJuice 06964a921d Android: Don't check Wii Menu version before directory initialization
Fixes a crash.
2024-02-11 11:15:18 +01:00
JosJuice 48ae529762 Android: Update Load Wii System Menu string in onPrepareOptionsMenu
Because the wording of the Load Wii System Menu string can change
depending on the contents of the NAND, we should update that menu item in
a method that's guaranteed to get called every time the user opens the
menu rather than one that's only guaranteed to be called once.
2024-02-11 10:58:42 +01:00
Admiral H. Curtiss e6ee217a7c
Core: Move Emulation IOS instance to System. 2024-02-07 22:07:30 +01:00
Mai ca81d8b8a6
Merge pull request #12565 from LillyJadeKatrin/retroachievements-bugfix
Retain Save State Folder
2024-02-07 14:03:12 -05:00
Gregoire L. D. d17495a75a Fix loading GBA configurations 2024-02-07 19:15:27 +01:00
Sketch 33dd3b078c Correctly log register errors 2024-02-07 09:36:36 -05:00
TellowKrinkle 5949911a5a VideoCommon: Don't use indexed output for fbfetch
A nonzero index makes no sense, and Mesa doesn't like it when you supply an index
2024-02-07 03:52:31 +01:00
JosJuice b5c5371848 Arm64Emitter: Don't optimize ADD to MOV for SP
Unlike ADD (immediate), MOV (register) treats SP as ZR. Therefore the
ADDI2R optimization that was added in 67791d227c can't optimize ADD to
MOV when exactly one of the registers is SP.

There currently isn't any code in Dolphin that calls ADDI2R with
parameters that would trigger this case.
2024-02-06 21:58:07 +01:00
LillyJadeKatrin 1ed7b35710 Retain Save State Folder
Adds a setting field under the hood to retain which folder the player last saved/loaded a state to/from, so that the dialog box to select a state to save/load reopens at that folder.
2024-02-05 19:44:09 -05:00
Mai 9240f579ea
Merge pull request #12561 from JosJuice/profile-consistency
InputCommon: Fix profile path inconsistencies
2024-02-05 09:47:08 -05:00
JosJuice 1315b54ffa InputCommon: Use distinct values for profile key
Because the last commit made us use separate folders for GCPad and
GCKey profiles, we should also use separate game INI keys for them.
Otherwise setting e.g. PadProfile1 in a game INI will make both GCPad
and GCKey try to load it, typically with one of them succeeding and the
other one showing a panic alert due to the profile not existing in its
folder.

Better do this breaking change for GCKeys in the same PR as the other
breaking change rather than later.
2024-02-04 17:55:08 +01:00
JosJuice 6cf55ab1ee InputCommon: Unify GetProfileName and GetProfileDirectoryName
After reading the previous commit, you might think "hold on, what's the
difference between GetProfileName and GetProfileDirectoryName"? These
two are being used for the exact same thing - figuring out where
profiles are stored - yet they return different values for certain
controllers like GC keyboards! As far as I can tell, the existing code
has been broken for GC keyboards since they were introduced a decade
ago. The GUI (and more recently, also InputCycler) would write and read
profiles in one location, and our code for loading profiles specified in
a game INI file would read profiles in another location.

This commit gets rid of the set of values used by the game INI code in
favor of the other set. This does breaking existing setups where a
GCKey profile has been configured in a game INI, but I think the number
of working such setups is vanishingly small. The alternative would make
existing GCKey profiles go missing from the profile dropdown in the GUI,
which I think would be more disruptive. The alternative would also force
new GCKey profiles into the same directory as GCPad profiles.

This commit also fixes a regression from d6c0f8e749. The Android GUI was
using GetProfileName to figure out what key to use in the game INI,
which made it use incorrect game INI entries for GameCube controller
profiles but not Wii Remote profiles. Now the Android GUI uses
GetProfileKey for this, fixing the problem.
2024-02-04 17:55:08 +01:00
JosJuice 2bcf70af3f InputCommon: Refactor away InputConfig::LoadConfig's switch case
By having getters for this information, other code that needs access to
the same information can call the getters instead of duplicating the
information.
2024-02-04 16:46:10 +01:00
Sepalani 1831a8cec5 BBA/HLE: Add missing PSH flag 2024-02-03 10:12:07 +04:00
Admiral H. Curtiss abbc4bd0bd
Merge pull request #12551 from lioncash/cheev
AchievementManager: Minor cleanup
2024-02-03 03:01:56 +01:00
Admiral H. Curtiss 4e3886e7e8
Merge pull request #12557 from mitaclaw/cpu-thread-guarantees-1
CheatSearch: Remove redundant lambdas
2024-02-03 02:45:06 +01:00
Admiral H. Curtiss df5baab873
Merge pull request #12550 from lioncash/dead
VertexLoaderManager: Remove unused entry struct
2024-02-03 02:38:02 +01:00
Lioncash 4f40bdf501 VertexLoaderManager: Use fill() in Init()
Same behavior, less code.
2024-02-01 23:04:40 -05:00
Lioncash ea95c82a01 VertexLoaderManager: Remove unused entry struct
This isn't used anywhere, so it can be removed.
2024-02-01 23:04:39 -05:00
Lioncash db80abbadd AchievementManager: Tidy up GetRichPresence()
This can be a direct return.
2024-02-01 23:03:24 -05:00
Lioncash c14414a151 AchievementManager: clear name in CloseGame()/LogOut()
A little more idiomatic.
2024-02-01 23:03:24 -05:00
Lioncash 2d8af7b7f8 AchievementManager: Replace memsets where applicable
We can just use brace initialization to zero these out. Smaller to
write and a little quicker to read.
2024-02-01 23:03:24 -05:00
Lioncash 184fe932ed AchievementManager: std::move leaderboard info in FetchBoardInfo()
Avoids churning some allocations.
2024-02-01 23:03:24 -05:00
Lioncash 76c381e6f7 AchievementManager: Ensure update callback is always valid
This way we don't need to do any validity checking aside from the
initial setting of the callback. Also cuts down on line noise.
2024-02-01 23:03:23 -05:00
Lioncash 2b83cc739a AchievementManager: Convert .compare() into equality operators
These perform a default comparison, which is the same as using the
equality operators.
2024-02-01 23:03:23 -05:00
Lioncash 394418b415 AchievementManager: Remove unnecessary .get()
Same behavior, less code.
2024-02-01 23:03:23 -05:00
Lioncash 161efff6c9 AchievementManager: Remove long qualifier
We can remove the long qualifying on some ResponseType instances to
lessen the amount of reading.
2024-02-01 23:03:23 -05:00
Lioncash 7096f99f79 CustomPipeline: Mark arrays as constexpr
Ensures that these go into the ro section.
2024-02-01 23:02:45 -05:00
Lioncash 59211589b9 CustomPipeline: Make use of emplace_back() in GlobalConflicts()
We can use the string_view arguments to directly construct strings
inside of the global_result vector.
2024-02-01 23:02:45 -05:00
Lioncash 353ceedb50 CustomPipeline: Resolve unused variable warning
We can just use holds_alternative here instead.
2024-02-01 23:02:45 -05:00
mitaclaw 085c4d154e CheatSearch: Remove redundant lambdas
Core::RunAsCPUThread is obsoleted by CPUThreadGuard reference already passed into the function. The nonsense lambda in CheatSearchWidget is from changes in fdb7328c73.
2024-02-01 19:54:47 -08:00
Admiral H. Curtiss 951be30891
Core: Fix booting titles from NAND. 2024-02-01 19:50:20 +01:00
Admiral H. Curtiss 14121c5504
Core/ConfigManager: Remove dead bAutomaticStart flag. 2024-01-31 22:53:43 +01:00
Admiral H. Curtiss da6b5dd38a
Merge pull request #12546 from lioncash/event
VideoCommon/Statistics: Remove global system accessor from s_after_frame_event
2024-01-31 21:16:21 +01:00
Admiral H. Curtiss 18abf7c768
Merge pull request #12544 from lioncash/getmod
GraphicsModGroup: Allow heterogenous lookup for GetMod()
2024-01-31 20:17:26 +01:00
Admiral H. Curtiss 202c10d757
Merge pull request #12547 from lioncash/movie
Core/Movie: Remove lingering global system instance accessors
2024-01-31 20:12:07 +01:00
Lioncash 5ade2e39ef Core/Movie: Remove lingering global system instance accessors
The movie manager is already passed in a reference to the relevant
system, so we can use that instead.
2024-01-31 13:30:24 -05:00
Lioncash 16d8b6e6b3 Common/HookableEvent: std::move callback instance in Register()
Potentially avoids reallocations if the capture buffer of the callback
is quite large.
2024-01-31 13:16:50 -05:00
Lioncash cac66317aa VideoCommon/Statistics: Remove global system accessor from s_after_frame_event
Instead, we make the event take a reference to the system and then pass
it in when the event is triggered.

This does introduce two other accessors, but these are much easier to
refactor out over time, and without modification to the existing event
interface.
2024-01-31 13:12:09 -05:00
Lioncash 0dfefacdf4 VertexLoaderBase: Collapse std namespace for hash and mark noexcept
Makes the hash specialization a little less noisy. Also we mark it
noexcept, since hashes shouldn't be throwing exceptions (and this can be
optimized on).
2024-01-31 12:43:00 -05:00
Lioncash 8e4b2565cd TextureConfig: Collapse std namespace for hash
Lets us collapse the namespacing and make the specialization a little
less noisy.
2024-01-31 12:41:33 -05:00
Lioncash b63dcd504d RenderState: Collapse std namespace for hash
We can specify the namespace on the hash to make the specialization a
little less noisy.
2024-01-31 12:40:10 -05:00
Lioncash 5bfaa3a966 NativeVertexFormat: Collapse std namespace and mark hash noexcept
We can just tag the std:: onto the end of the specialization to make it
less noisy.

Also mark it as noexcept, since hashes shouldn't throw exceptions.
2024-01-31 12:37:44 -05:00
Lioncash 40b050fe37 GraphicsModGroup: std::move graphics_mod in Load()
The config object is quite heavyweight, so we should move this instead
of copying.
2024-01-31 12:27:43 -05:00
Lioncash ccacda5e2c GraphicsModGroup: Simplify try_add_mod()
We can use contains() here, and also move the mod config if it's valid
instead of copying it, since it contains quite a bit of allocated data.
2024-01-31 12:23:21 -05:00
Lioncash 81aca79145 GraphicsModListWidget: Pass optional by const reference
All we do is read from it, so we don't need to copy the string if we
happen to have one.
2024-01-31 12:09:35 -05:00
Lioncash a1879ea099 GraphicsModGroup: Allow heterogenous lookup for GetMod()
Allows using keys that aren't directly std::string as the key. This lets
us use std::string_view for the incoming path name, making it more
flexible with other string types.
2024-01-31 12:05:17 -05:00
Mai 30fdf25f8f
Merge pull request #12542 from AdmiralCurtiss/system-sconfig
Migrate m_is_mios and bWii from SConfig to System.
2024-01-31 09:57:17 -05:00
Admiral H. Curtiss 9a3e770c23
Migrate SConfig::bWii to System. 2024-01-31 12:54:07 +01:00
Mai e0828815e7
Merge pull request #12540 from mitaclaw/encode-reg-to-64
Add Missing EncodeRegTo64 in JitArm64::dcbx
2024-01-30 13:08:03 -05:00
mitaclaw 45481620b8 Add Missing EncodeRegTo64 in JitArm64::dcbx
ARM64FloatEmitter::ABI_PushRegisters expects an XReg temporary, not a WReg.
2024-01-30 03:06:32 -08:00
Admiral H. Curtiss 8d515d407c
Migrate SConfig::m_is_mios to System. 2024-01-30 03:45:17 +01:00
luc-git d124fcbb0d
DolphinQt/RenderWidget: Add comments for SetCursorLocked() on Linux.
Co-authored-by: Admiral H. Curtiss <pikachu025@gmail.com>
2024-01-30 01:06:30 +01:00
LillyJadeKatrin fd99a5db9a Reverse endianness of achievement memory peeks
rcheevos expects these multi-byte peeks to have the opposite endianness so they need to be swapped before rcheevos gets them.
2024-01-29 11:55:49 -05:00
TellowKrinkle b7a451fc87 VideoCommon: Post to analytics when bug is overridden 2024-01-28 23:24:23 -06:00
TellowKrinkle 99f0c3fa01 VideoCommon: Add ability for backends to override bugs 2024-01-28 23:24:22 -06:00
TellowKrinkle 463269f704 VideoBackends:Multiple: Split up BUG_BROKEN_SUBGROUP_OPS
We now use subgroup ops for more than just a minor performance optimization
2024-01-28 23:20:39 -06:00
Admiral H. Curtiss 8482a50154
Merge pull request #12530 from iwubcode/custom_shaders_compilation_fixes
VideoCommon: fix some issues when compiling custom shaders
2024-01-28 14:30:37 +01:00
Admiral H. Curtiss 4843705061
Merge pull request #12534 from iwubcode/custom-pipeline-refactor
VideoCommon: refactor the custom pipeline logic to be reusable
2024-01-28 14:28:23 +01:00
Admiral H. Curtiss c9715e7e7d
Merge pull request #12535 from iwubcode/vertexmanager_draw_refactor
VideoCommon: refactor drawing into its own function
2024-01-28 14:27:41 +01:00
Admiral H. Curtiss 0405b4dcc2
Merge pull request #12536 from LillyJadeKatrin/retroachievements-bugfix
Removed post data from Achievement request logs
2024-01-28 14:26:09 +01:00
TellowKrinkle 6243e50b21 VideoBackends:MTL: Use SPIRV 1.5
Allows non-constant simd broadcast, which is used by the ascii art shader
2024-01-27 18:47:13 -06:00
LillyJadeKatrin f25bdda728 Removed post data from Achievement request logs
post_data included passwords and API keys in plaintext so continuing to include it in logs is a security liability.
2024-01-27 18:50:27 -05:00
JosJuice 990303a028
Merge pull request #12519 from lioncash/leak
PostProcessing: Don't potentially leak memory in BlitFromTexture()
2024-01-27 22:29:45 +01:00
iwubcode c34b3ae390 VideoCommon: refactor drawing into its own function 2024-01-27 14:45:34 -06:00
iwubcode 3e3967ff94 VideoCommon: refactor the custom pipeline logic in the graphics mod action into a separate class, so it is reusable 2024-01-27 00:12:49 -06:00
Admiral H. Curtiss e740e32562
Merge pull request #12522 from lioncash/ppcanalyst
PPCAnalyst: Merge duplicate expression in ReorderInstructionsCore()
2024-01-26 20:29:16 +01:00
Admiral H. Curtiss b0491c2ce8
Merge pull request #12529 from iwubcode/math_determinant
Common: add determinant functions to Matrix33 and Matrix44
2024-01-26 19:13:38 +01:00
Admiral H. Curtiss b09b59c125
Merge pull request #12521 from lioncash/reent
Core: Make use of reentrant time utilities where applicable
2024-01-26 18:55:26 +01:00
Admiral H. Curtiss 460ab609d0
Merge pull request #12524 from lioncash/memb
Jit64AsmCommon: Remove redundant m_jit member from CommonAsmRoutines
2024-01-26 18:53:44 +01:00
Admiral H. Curtiss c3652a7129
Merge pull request #12532 from lioncash/json
GraphicsMod/ShaderAsset: Lessen object churn a little bit
2024-01-26 18:52:52 +01:00
Mai a553308775
Merge pull request #12443 from iwubcode/custom_pipeline_action_material_cubemap
VideoCommon: update custom pipeline action to support a variety of texture samplers, support for materials, and more!
2024-01-26 12:39:37 -05:00
iwubcode b37f096f4b Common: add determinant functions to Matrix33 and Matrix44 2024-01-24 23:02:57 -06:00
Lioncash 7a59ecc39d GraphicsTarget: Reduce object churn a little 2024-01-24 23:00:01 -05:00
Lioncash 1b7da37114 GraphicsTargetGroup: Reduce object churn a little 2024-01-24 22:52:58 -05:00
Lioncash 24f952c12b GraphicsModFeature: Reduce object churn a little 2024-01-24 22:48:53 -05:00
Lioncash 0385b40bd8 GraphicsModAsset: Reduce object churn a little 2024-01-24 22:47:22 -05:00
Lioncash 2253d9a95d GraphicsModGroup: Mark move constructor and assignment as noexcept
Allows containers to optimize off of std::move_if_noexcept
2024-01-24 22:41:30 -05:00
Lioncash 0327b11e0b GraphicsModGroup: Reduce object churn
We can emplace and move to avoid doing object copies.
2024-01-24 22:40:05 -05:00
Lioncash e3e20df185 GraphicsMod: Avoid some object churn
We have quite a bit of allocation churn going on here, so we can emplace
and move where appropriate to alleviate that a little.
2024-01-24 22:34:50 -05:00
Lioncash 7b6463ef1f ShaderAsset: Emplace value instances when possible in ToJson()
Constructs elements directly inside the container and also makes it
shorter to read in certain instances.
2024-01-24 18:47:44 -05:00
Mai 97160ddc83
Merge pull request #12531 from LillyJadeKatrin/retroachievements-bugfix
Add host URL setting to achievements config
2024-01-24 16:17:17 -05:00
Admiral H. Curtiss 58bff55c71
Merge pull request #12528 from lioncash/assembler
DolphinQt/MenuBar: Hide assembler option if debug UI is disabled
2024-01-24 18:48:32 +01:00
Admiral H. Curtiss 2826099808
Merge pull request #12523 from lioncash/fallthrough
Core: Get rid of some unannotated fallthrough cases
2024-01-24 18:40:32 +01:00
Admiral H. Curtiss 5692e15285
Merge pull request #12525 from lioncash/defined
Core: Convert some preprocessor checking to use #ifdef/#if defined() over #if
2024-01-24 18:39:49 +01:00
JosJuice 74d4cb0274
Merge pull request #12526 from lioncash/trace
CodeTrace: Use std::set::lower_bound() over std::lower_bound()
2024-01-24 17:56:39 +01:00
JosJuice dab03e4c08
Merge pull request #12527 from lioncash/highlight
GekkoSyntaxHighlight: Fix FPR terminal highlighting being treated as GPRs
2024-01-24 17:55:44 +01:00
LillyJadeKatrin 03e3f65653 Add host URL setting to achievements config
The Host URL setting in the RetroAchievements config will, if set, be used as the host URL for all server requests for achievements. This allows for an easy switch to the RetroAchievements staging server for testing.
2024-01-24 07:08:54 -05:00
iwubcode cf081e839d VideoCommon: fix compilation error in pixel shaders when per-pixel lighting isn't set for custom shaders 2024-01-23 21:50:42 -06:00
iwubcode a8d45b8e55 VideoCommon: fix compilation error in uber pixel shaders when pixel shader lighting isn't set for custom shaders 2024-01-23 21:50:42 -06:00
iwubcode 7118fc5b7b VideoCommon: fix pixel shader compilation error that happens when uint output is defined 2024-01-23 21:50:42 -06:00
iwubcode a37fd83218 VideoCommon: fix uber shader pixel compilation error that happens when uint output is defined 2024-01-23 21:50:41 -06:00
Lioncash a65aaccd59 DolphinQt/MenuBar: Hide assembler option if debug UI is disabled
Fixes a little visual inconsistency in the UI, where the assembler would
always be shown, but all other debug-related utilities would be hidden.
2024-01-23 18:57:23 -05:00
Lioncash 100242a380 GekkoSyntaxHighlight: Collapse cases for builtin color formats
Same behavior, but without as much duplication.
2024-01-23 18:39:59 -05:00
Lioncash e4fa5614d1 GekkoSyntaxHighlight: Fix FPR terminal highlighting being treated as GPRs
Copy-paste error. Ultimately GPR and FPRs use the same highlighting
style anyway, so this is mostly just a correctness change.
2024-01-23 18:38:06 -05:00
Lioncash 6cb3389696 CodeTrace: Use std::set::lower_bound() over std::lower_bound()
std::set's lower_bound() is optimized better than the generic
implementation of std::lower_bound()

std::lower_bound() works best on random access iterators, where the
number of comparisons can be logarithmic. However, since std::set's
iterators are bidirectional iterators, the comparisons will actually be
linear in practice when using std::lower_bound().

So, we can use std::set's version which is guaranteed to be logarithmic.
2024-01-23 17:21:22 -05:00
Lioncash 258161bab7 DolphinAnalytics: Use #ifdef instead of #if for platform testing 2024-01-23 16:51:31 -05:00
Lioncash 4ccc5178a6 PowerPC: Use #ifdef instead of #if for platform testing
This way we don't assume these symbols are always defined.
2024-01-23 16:47:43 -05:00
Lioncash f695ae5730 JitInterface: Use #ifdef instead of #if for platform testing
\#if assumes the symbols will always be defined, but they aren't
depending on the platform.
2024-01-23 16:42:36 -05:00
Lioncash a9f89a7d3b WiimoteEmu: check for __APPLE__ with defined()
This is only defined on certain platforms and isn't always defined.
2024-01-23 16:40:21 -05:00
Lioncash 3c64d030c5 FreeLookManager: check for __APPLE__ with defined()
Previously this was treating the identifier as if it were always defined
by default
2024-01-23 16:40:10 -05:00
Lioncash b06e1880b6 Jit64AsmCommon: Remove redundant m_jit member from CommonAsmRoutines
We pass a JIT instance all the way down to EmuCodeBlock, which is
accessible under protected as well, so this isn't really necessary.
2024-01-23 16:27:02 -05:00
Lioncash adb79d4e32 WiimoteReal: Explicitly break instead of fallthrough in IsBalanceBoard()
Same behavior, no compiler warnings.
2024-01-23 16:22:10 -05:00
Lioncash 28e93827db EXI_DeviceAGP: Annotate fallthrough with [[fallthrough]]
Same behavior, but eleminates compiler warnings.
2024-01-23 16:19:23 -05:00
Lioncash 7ef0262f8a PPCAnalyst: Merge duplicate expression in ReorderInstructionsCore()
The type checking is duplicated here, which makes this seem a little
weird, so we can get rid of it.
2024-01-23 16:08:24 -05:00
Lioncash 6a86b35e88 State: Make use of re-entrant variant of localtime
Makes this member function thread-safe. We can also unify the string
handling to make it easier to maintain.
2024-01-23 15:28:30 -05:00
Lioncash 1b3f61041a Movie: Remove global system accessor from GetRTCDisplay()
We can just use m_system instance reference instead.
2024-01-23 15:15:13 -05:00
Lioncash 763562357b Movie: Mark getters as const
These don't modify internal member state.
2024-01-23 15:15:13 -05:00
Lioncash c0b0023b64 Movie: Use re-entrant variant of gmtime in GetRTCDisplay()
Makes this member function thread-safe.
2024-01-23 15:15:10 -05:00
Lioncash f03da37693 NetKDTime: Use re-entrant variants of gmtime
Makes these implementations more thread-safe by design. These likely
won't be run on any other thread, but we may as well just use the
re-entrant variant if it's available.
2024-01-23 14:30:44 -05:00
iwubcode 3a688aa35e VideoCommon: add function to serialize MaterialAsset to json 2024-01-23 13:01:33 -06:00
Lioncash 5aeadb1ef8 PostProcessing: Don't potentially leak memory in BlitFromTexture()
All release() does is relinquish the pointer, rather than free the
memory associated with it.
2024-01-23 13:34:40 -05:00
Lioncash a3f9f2c7aa PostProcessing: Remove unnecessary get() calls in BlitFromTexture()
We can just use operator-> instead.
2024-01-23 13:34:16 -05:00
JosJuice f2292467ad
Merge pull request #12518 from lioncash/pragma
AchievementSettings: Move pragma once out of ifdef
2024-01-23 19:24:38 +01:00
JosJuice 96fda3d126
Merge pull request #12517 from lioncash/alloc
Jit64/JitRegCache: Simplify GetAllocationOrder()
2024-01-23 19:23:42 +01:00
iwubcode a40a952177 VideoCommon: add a method to calculate a default value for ShaderAsset and another to list its types 2024-01-23 11:58:32 -06:00
iwubcode b5a6225e1a VideoCommon: add function to serialize ShaderAsset to json 2024-01-23 11:58:32 -06:00
Lioncash 49eadbb824 AchievementSettings: Move pragma once out of ifdef
Makes the header a little more consistent with others (and also we
should still have a header guard be present at all times).
2024-01-23 11:56:50 -05:00
Lioncash 9f82efa3e2 Jit64/JitRegCache: Simplify GetAllocationOrder()
Given we have fixed allocation orders, we can just directly return a
span instead of a pointer and a size via an out parameter.

Makes it a little more convenient, since we get both pieces of info at
once, and also have the ability to iterate directly off the span out of
the box.
2024-01-23 11:03:59 -05:00
Mai 713572e874
Merge pull request #12510 from JosJuice/android-revert-attach-early
Revert "Android: Attach CPU thread to JVM early"
2024-01-21 10:23:15 -05:00
Mai d64705d691
Merge pull request #12512 from JosJuice/assembler-dirty-flag
DolphinQt: Rework dirty flag handling in AssemblerWidget::TabTextForEditor
2024-01-21 10:22:46 -05:00
JosJuice 4b7c953415
Merge pull request #12509 from AdmiralCurtiss/bbox-init-only-if-supported
VideoCommon: Only initialize Bounding Box if supported by GPU/driver.
2024-01-20 21:59:15 +01:00
JosJuice 6276232574 DolphinQt: Rework dirty flag handling in AssemblerWidget::TabTextForEditor
Putting the handling of the dirty flag in only one string makes it
clearer for translators what's going on.
2024-01-20 20:00:52 +01:00
JosJuice 6cd67e3937 Partially revert "DolphinQt/Assembler: improve translatability"
This reverts the parts of commit c8c9928eb1 that made translatability
worse rather than better. Changing "Error in column %2" to "%1 in column
%2" not only means that the translators have to check the i18n comments
to know what word hides behind %1, but there's also the problem that
the translator might need to translate "Error" in this context
differently from the standalone string "Error". Having to copy-paste
some HTML tags may be annoying for translators, but it's a far less
serious problem.
2024-01-20 14:46:41 +01:00
JosJuice c8327ad514 Revert "Android: Attach CPU thread to JVM early"
This reverts commit e86d713600.

A proper fix was added in 86c1f6e1e7,
so the workaround is no longer necessary.
2024-01-20 14:26:50 +01:00
Admiral H. Curtiss ac670d99e2
VideoCommon: Only initialize Bounding Box if supported by GPU/driver. 2024-01-20 12:34:24 +01:00
Admiral H. Curtiss 83d4b692b8
InputCommon/WGInput: Handle add/remove events on separate thread to prevent deadlocks.
In particular this is triggered when running Dolphin with the Steam overlay.
2024-01-18 00:30:45 +01:00
Admiral H. Curtiss 12318f921f
Merge pull request #12503 from AdmiralCurtiss/sdl-fixes
InputCommon/SDL: Fix potential issues in controller initialization.
2024-01-18 00:29:25 +01:00
Mai 6aacbc4c35
Merge pull request #12488 from JosJuice/jitarm64-psq-stxx-w0
JitArm64: Remove unnecessary locking of W0 in psq_stXX
2024-01-15 15:14:59 -05:00
Mai 5534f510e0
Merge pull request #12498 from AdmiralCurtiss/globals-socket
Core/IOS/Network/Socket: Avoid global system accessor.
2024-01-15 15:13:41 -05:00
Admiral H. Curtiss c7d7ae4912
InputCommon/SDL: Code style fixes. 2024-01-15 15:19:41 +01:00
Admiral H. Curtiss 5e6e61c723
InputCommon/SDL: Avoid potential infinite loops from integer truncation. 2024-01-15 15:19:24 +01:00
Admiral H. Curtiss d657ad5932
InputCommon/SDL: Check for errors from SDL_JoystickNumButtons(), SDL_JoystickNumAxes(), SDL_JoystickNumHats(). 2024-01-15 15:18:38 +01:00
Admiral H. Curtiss 959c39133b
InputCommon/SDL: Fix incorrect use of std::vector::assign() and check bounds. 2024-01-15 15:17:32 +01:00
Admiral H. Curtiss 95cba6be2b
Core/Movie: Refactor to class, move to System.
A bit of global state remains (the `header` in `BeginRecordingInput()`) due to unclear lifetime requirements.
2024-01-15 08:05:30 +01:00
Mai c76dee7807
Merge pull request #12285 from iwubcode/serialize_graphics_mods
VideoCommon: add ability to serialize graphics mod to json object
2024-01-13 14:15:14 -05:00
Admiral H. Curtiss 1cca3b24c6
Merge pull request #12085 from SuperSamus/sdl-gamecontroller
SDL: Add GameController API, cleanup
2024-01-13 16:37:43 +01:00
Martino Fontana 51e05f468a SDL: Add GameController API, cleanup 2024-01-13 16:10:25 +01:00
Admiral H. Curtiss 4a362ddd33
Core/IOS/Network/Socket: Avoid global system accessor. 2024-01-13 13:18:20 +01:00
Mai 8760aca8ec
Merge pull request #12500 from AdmiralCurtiss/globals-fiforecorder
FifoRecorder: Move instance to System.
2024-01-13 06:38:39 -05:00
Mai d36baf633c
Merge pull request #12499 from AdmiralCurtiss/globals-mmiorw
Core/HW/MMIO: Pass System through Read() and Write().
2024-01-13 06:37:49 -05:00
Admiral H. Curtiss 443b4ae745
Core/FifoPlayer: Avoid global System accessor. 2024-01-12 21:54:35 +01:00
Admiral H. Curtiss 637fd49909
FifoRecorder: Move instance to System. 2024-01-12 15:06:06 +01:00
Admiral H. Curtiss 42d61cfc4c
Core/HW/MMIO: Pass System through Read() and Write(). 2024-01-12 08:28:01 +01:00
Mai 6725c25600
Merge pull request #12494 from AdmiralCurtiss/globals-wiiipc
Core/IOS/WiiIPC: Refactor to class, move to System.
2024-01-12 02:08:00 -05:00
Mai ab3655fbea
Merge pull request #12496 from AdmiralCurtiss/globals-gba
Core/HW/GBACore: Avoid global System accessor.
2024-01-12 02:05:57 -05:00
Admiral H. Curtiss bca5b10faf
Merge pull request #12489 from JosJuice/optimizable-access-size
PowerPC: Add access size parameter to MMU::IsOptimizableRAMAddress
2024-01-12 07:44:59 +01:00
Admiral H. Curtiss f7a9ea9d7e
Core/HW/GBACore: Avoid global System accessor. 2024-01-12 07:30:20 +01:00
Admiral H. Curtiss 5a633f0bcf
Core/IOS/WiiIPC: Add missing variables to savestate. 2024-01-12 06:37:11 +01:00
Admiral H. Curtiss 17753d5168
Core/IOS/WiiIPC: Refactor to class, move to System. 2024-01-12 06:37:10 +01:00
Admiral H. Curtiss be7f4ab244
Core: Pass sensor bar state into the Wiimote input calculation functions instead of having it access a global. 2024-01-11 06:02:49 +01:00
Vicki Pfau a8033f164b Steam Deck: Pad out feature report to 64 bytes
Also update the names of the setting post-Steam Deck commits to SDL

Fixes https://bugs.dolphin-emu.org/issues/13412
2024-01-10 19:49:52 -08:00
JosJuice b972329ed0 PowerPC: Add access size parameter to MMU::IsOptimizableRAMAddress
For correctness, we need to check not only the start address of the
memory access but also the end address.
2024-01-10 18:17:45 +01:00
Martino Fontana 0ab2bc2287 ControllerInterface: Make FullAnalogSurface inherit IsDetectable() 2024-01-10 12:20:07 +01:00
Lioncash 409d2ecad3 SI_Device: Remove global system accessors
We can pass the system timer instance through to avoid needing the
global accessor.
2024-01-08 11:03:26 -05:00
Lioncash 7398d0b6ef SI_DeviceGBAEmu: Remove global system accessors
We can pass the system timer instance in from the existing system
instance instead of the global accessor.
2024-01-08 10:56:41 -05:00
Admiral H. Curtiss 1f0fe5a99a
Core/DSPHLE: Store reference to DSPManager in HLEAccelerator (AX/AXWii). 2024-01-08 10:27:39 +01:00
Admiral H. Curtiss 3a9160100d
Core/DSPHLE: Store reference to DSPManager in AESndAccelerator.
Avoids the use of the global System in ReadMemory() and WriteMemory().
2024-01-08 10:23:29 +01:00
Admiral H. Curtiss e9ab33b871
Core/DSPHLE: Remove global System access in UCodes. 2024-01-08 10:23:29 +01:00
Admiral H. Curtiss a9bf93cf2a
Core/DSPHLE: Remove global System access from CMailHandler. 2024-01-08 10:23:29 +01:00
Admiral H. Curtiss 9be9cbda2f
Core/DSPHLE: Store reference to System in DSPHLE instances. 2024-01-08 10:23:28 +01:00
Admiral H. Curtiss 3b0444be6b
Core/DSPHLE: Move HLEAccelerator instance into AXUCode. 2024-01-08 03:53:52 +01:00
Admiral H. Curtiss bfd53c7294
Core/DSPHLE: Make HLEAccelerator state local to GetInputSamples() in AX and AXWii UCodes. 2024-01-08 03:53:52 +01:00
Mai 180d053ec1
Merge pull request #12486 from AdmiralCurtiss/globals-aesndaccel
Core/DSPHLE: Move AESndAccelerator instance into AESndUCode.
2024-01-07 20:36:01 -05:00
JosJuice f2145c91e7 JitArm64: Update register comments in psq_lXX/psq_stXX
This was also overlooked in 166bd87f70.
2024-01-07 23:01:38 +01:00
JosJuice d94b00ec36 JitArm64: Remove unnecessary locking of W0 in psq_stXX
It seems like I made a mistake in 166bd87f70. Locking W0 when
jo.memcheck is true is only necessary for load instructions, not store
instructions.
2024-01-07 22:59:51 +01:00
JosJuice 4e57b66dcf
Merge pull request #12375 from JosJuice/android-gate-size-crash
Android: Fix crash when trying to edit gate size setting
2024-01-07 19:34:06 +01:00
JosJuice 696a6defd2
Merge pull request #12472 from mitaclaw/arm64-flush-mode
Arm64RegCache: Use FlushMode everywhere
2024-01-07 18:45:25 +01:00
Admiral H. Curtiss 2a42977dd3
Core/DSPHLE: Move AESndAccelerator instance into AESndUCode. 2024-01-07 04:49:34 +01:00
Tilka 5b2ea515ad
Merge pull request #12484 from SuperSamus/vulkan-dont-panic-suboptimal-khr
VKGfx: Don't panic for VK_SUBOPTIMAL_KHR
2024-01-06 12:39:40 +00:00
Admiral H. Curtiss fc2ec826d4
FifoPlayer: Move instance to System. 2024-01-05 20:15:18 +01:00
Martino Fontana 58f5bf5496 VKGfx: Don't panic for VK_SUBOPTIMAL_KHR 2024-01-05 11:20:35 +01:00
Mai 2f7f7afe6d
Merge pull request #12468 from JosJuice/android-targets-fixes
Android: Fix the targets line in build.gradle.kts
2024-01-05 01:55:11 -05:00
Mai feb7207a4c
Merge pull request #12482 from AdmiralCurtiss/globals-coreinit
Core: Pass System through more of the emulation thread init process.
2024-01-05 01:53:11 -05:00
Admiral H. Curtiss 2155a61176
Core: Pass System through more of the emulation thread init process. 2024-01-05 05:19:29 +01:00
Admiral H. Curtiss 07c035e659
Core/SystemTimers: Refactor to class, move to System. 2024-01-04 23:35:19 +01:00
Tilka 9c91b5edca
Merge pull request #12480 from AdmiralCurtiss/codetrace-system
Core/CodeTrace: Take address from given instruction in GetInstructionAttributes().
2024-01-04 22:00:15 +00:00
Admiral H. Curtiss 0be476cfaf
Core/CodeTrace: Take address from given instruction in GetInstructionAttributes().
In all instance this method is called, the instruction comes from SaveCurrentInstruction(), which already sets the address to the PC.
2024-01-04 21:44:54 +01:00
Admiral H. Curtiss ce19d6a35e
Core/Boot: Avoid global system accessor when setting disc. 2024-01-04 21:30:24 +01:00
iwubcode 1073722cdf Revert "VideoCommon: revert max pixel shader samplers back to 8 for Android devices."
This reverts commit 79648e1c24.
2024-01-03 18:43:44 -06:00
Tilka 48eb8b17ef
Merge pull request #12475 from Tilka/zelda
DSPHLE/Zelda: fix reverb volume being multiplied by current volume twice
2024-01-02 05:06:21 +00:00
Admiral H. Curtiss fd1a261e73
Merge pull request #12470 from JosJuice/jitarm64-low-dcbz-for-real
JitArm64: Don't fall back to interpreter on low DCBZ hack
2024-01-01 23:16:30 +01:00
Tillmann Karras 381c2702f6 DSPHLE/Zelda: fix reverb volume being multiplied by current volume twice 2024-01-01 21:53:26 +00:00
Admiral H. Curtiss 295d86c86f
Merge pull request #12455 from PatrickFerry/qt_handle_overridden_graphics_backend
Qt: Handle Overridden Graphics Backend
2024-01-01 22:42:30 +01:00
Admiral H. Curtiss 6e3a2324a4
Merge pull request #12464 from JosJuice/jit-isi-membase
Jit: Reload RMEM/MEM_REG on ISI exception
2024-01-01 22:09:05 +01:00
Admiral H. Curtiss 043d868841
Merge pull request #12473 from Dentomologist/bitset64_fix_iterator_incrementation
BitSet64: Fix iterator incrementation
2024-01-01 22:03:11 +01:00
Admiral H. Curtiss 370daaf26c
Merge pull request #12474 from Dentomologist/bitset_use_static_cast
BitSet: Use direct initialization instead of c-style casts
2024-01-01 22:01:45 +01:00
Dentomologist 7dbf463ddf BitSet64: Fix iterator incrementation
Use 1 of the same type as the stored value when shifting left. This
prevents undefined behavior caused by shifting an int more than 31 bits.

Previously iterator incrementation could either hang or prematurely
report it had reached the end of the bitset.
2024-01-01 00:41:48 -08:00
Dentomologist abb484a101 BitSet: Use direct initialization instead of c-style casts 2024-01-01 00:36:13 -08:00
Tilka 07df4ff16e
Merge pull request #12471 from mitaclaw/flush-gpr-arm-bug
Fix Logic Inefficiency in Arm64GPRCache::FlushRegisters
2024-01-01 00:46:34 +01:00
Dentomologist 58c5ae3de9 UnitTests: Refactor BitSetTest
Group numbers and their bitcounts together in pairs, which allows for
range-based loop iteration.
2023-12-31 12:10:50 -08:00
mitaclaw 4805b02893 Arm64RegCache: Use FlushMode everywhere 2023-12-31 02:09:56 -08:00
mitaclaw 01e534a681 Fix Logic Inefficiency in Arm64GPRCache::FlushRegisters
This was introduced in 6a9f565ac4.
2023-12-30 23:44:27 -08:00
Tilka 8ecc478662
Merge pull request #12469 from JosJuice/tlb-index-constants
PowerPC: Add constants for the two TLB indices
2023-12-30 16:59:17 +01:00
JosJuice 465f17a882 PowerPC: Add constants for the two TLB indices
Just for readability.
2023-12-30 14:31:05 +01:00
JosJuice 684b3dfd4a JitArm64: Don't fall back to interpreter on low DCBZ hack
I missed this in 16eb188f1d.
2023-12-30 14:18:49 +01:00
JosJuice b56e6cc03d Android: Update the comment for the targets line in build.gradle.kts
This comment hasn't really made sense since 23bebc5270 commented out
the relevant line.
2023-12-30 14:16:28 +01:00
JosJuice b5f41e0742 Android: Fix syntax of the targets line in build.gradle.kts
Seems like this was missed in the conversion to Kotlin in 001089dbf4.
2023-12-30 14:14:40 +01:00
JosJuice 2a89a1d27a
Merge pull request #12461 from blakbin/DocumentProvider
Improve DocumentProvider
2023-12-30 12:50:46 +01:00
JosJuice 26760cf8a8
Merge pull request #12467 from AdmiralCurtiss/codepage-convert-linkage
Common/StringUtil: Use internal linkage for codepage conversion functions.
2023-12-30 12:13:53 +01:00
luc-git 6b166f1819
DolphinQt/Mapping: Add "Use Mouse Controlled Pointing" button. 2023-12-29 20:31:39 +01:00
Admiral H. Curtiss 99fbc4b97e
Merge pull request #11885 from Filoppi/devices_deadlock_fix_v2
Input: Improve Controller Interface devices threading
2023-12-29 20:17:04 +01:00
Admiral H. Curtiss 4f04ac5858
Common/StringUtil: Use internal linkage for codepage conversion functions. 2023-12-29 19:50:55 +01:00
Admiral H. Curtiss bf0ac9de0c
Merge pull request #12466 from JosJuice/win32-error-string-encoding
Common: Fix encoding handling in GetWin32ErrorString
2023-12-29 19:48:00 +01:00
JosJuice 0c7359e150 Common: Fix encoding handling in GetWin32ErrorString
These messages can be localized, so we can't just assume it's all ASCII.
2023-12-29 16:01:13 +01:00
Tilka 68250afa08
Merge pull request #12465 from Tilka/zelda
DSPHLE/Zelda: fix use of wrong reverb buffer
2023-12-29 08:14:55 +01:00
Jules Blok f1d446da3f
Merge pull request #12452 from Tilka/efb24
VideoCommon: apply "force 24-bit color" to EFB-to-VRAM copies as well
2023-12-29 03:51:59 +01:00
Tillmann Karras 594b55c448 DSPHLE/Zelda: fix use of wrong reverb buffer 2023-12-29 02:45:23 +01:00
Tillmann Karras ca69c60e1b DSPHLE/Zelda: add another 32-bit getter/setter (NFC) 2023-12-29 02:45:20 +01:00
Patrick Ferry 1c68f4231b Qt: Handle Overridden Graphics Backend
This fixes an issue where the game specific graphics backend would be saved as the global setting after playing a game.

This also now displays the currently running graphics backend when looking in the graphics configuration window.
2023-12-28 17:28:08 +00:00
Admiral H. Curtiss e212d1c395
Merge pull request #12463 from Dentomologist/netkdrequestdevice_fix_crashes
NetKDRequestDevice: Fix sporadic crashes during emulation shutdown
2023-12-27 21:47:18 +01:00
JosJuice 8fcf9969eb Jit: Reload RMEM/MEM_REG on ISI exception
Aims to fix https://bugs.dolphin-emu.org/issues/13444.
2023-12-27 16:39:00 +01:00
Dentomologist ecf4f1b1f9 NetKDRequestDevice: Fix nullptr dereference crash
Keep a shared_ptr to NetKDTimeDevice inside NetKDRequestDevice.

This allows the KDDownload task to finish its work without potentially
trying to dereference nullptr, which can potentially come from either
GetIOS() or GetDeviceByName() if EmulationKernel's destructor has
started running.
2023-12-24 16:46:08 -08:00
Dentomologist dd1f5f9726 NetKDRequestDevice: Fix use-after-free crash
Explicitly shut down work queues in NetKDRequestDevice's destructor to
prevent their threads from accessing members after they've been freed.

This crash would occur sporadically if NetKDRequestDevice's periodic
download or mail checks happened to overlap with emulation shutdown in
the wrong way.

An example sequence of events that could cause the crash:
* m_scheduler_timer_thread queues a periodic Download event in
  m_scheduler_work_queue, then waits for m_shutdown_event.
* A request to stop emulation results in s_ios being reset by the CPU
  thread. This triggers NetKDRequestDevice's destructor which sets
  m_shutdown_event and joins m_scheduler_timer_thread.
* m_scheduler_timer_thread wakes from m_shutdown_event and returns from
  its thread function, ending the thread.
* The CPU thread resumes execution at the end of NetKDRequestDevice's
  destructor and begins destroying NetKDRequestDevice's members in
  reverse declaration order.
* m_http is declared after m_scheduler_work_queue and is therefore
  destroyed earlier.
* m_scheduler_work_queue's destructor calls its Shutdown function, which
  by default finishes the work items in the queue.
* The queued Download event calls KDDownload which calls m_http.Get()
  which calls Fetch() which passes garbage data from the freed m_curl
  into curl_easy_setopt().
* Curl promptly crashes.

Shutting down the work queues manually in the destructor prevents the
above because m_http and the other members don't get freed until after
the queue threads finish.
2023-12-24 15:04:35 -08:00
BlakDulz 45d3c41d68 Make DocumentProvider Support Thumbnail
This  will make DocumentUI or the built-in Android System Internal Files Manager app showing Thumbnail of Image file instead of image type icon.
2023-12-24 15:34:10 +07:00
Sepalani e9fa335fbe Socket: Fix a nullptr dereference when operations are pending 2023-12-24 09:23:02 +04:00
BlakDulz d667fca8d3 Implement Refresh on DocumentProvider
"When interacting with DocumentUI or the built-in Android System Internal Files Manager app and performing Create, Rename, and Delete operations, DocumentsUI will not automatically refresh the changes.
Previously, users had to manually pull down from the top to refresh the changes. This commit aims to fix this issue by automatically notifying the system that changes have occurred and triggering a requery."
2023-12-23 23:26:54 +07:00
Lioncache a23cf2121d VideoCommon/PixelEngine: Generify lock guards
We don't need to specify the type of the mutex being passed in.
2023-12-22 14:19:29 -05:00
Lioncache 0505f057ca VideoCommon/PixelEngine: Remove global system accessor in UpdateInterrupts()
Now that the system instance is passed through, this is no longer necessary.
2023-12-22 14:19:29 -05:00
Lioncache e539dbba4c VideoCommon/PixelEngine: Passthrough system instance in constructor
Simplifies the interface in terms of usage
2023-12-22 14:19:26 -05:00
Mai b1438c224f
Merge pull request #12439 from lioncash/sprintf
Core: Use fmt over sprintf in trivial cases
2023-12-21 17:17:21 -05:00
Mai 6c2da5229e
Merge pull request #12458 from JosJuice/jitarm64-logic-i2r-not-nothing
JitArm64: Fix the "do nothing" cases of ANDI2R and friends
2023-12-21 17:13:20 -05:00
JosJuice d8c78f2a92 JitArm64: Fix the "do nothing" cases of ANDI2R and friends
So somehow I forgot that AArch64 uses three-operand encoding...

Fixes a regression from 6303416201 which manifested in various ways,
such as incorrect rendering of the Wind Waker title screen.
2023-12-21 20:51:32 +01:00
Tilka 8d4575cfd8
Merge pull request #12454 from lioncash/proc
VideoCommon/CommandProcessor: Pass system instance through constructor
2023-12-21 17:46:28 +00:00
iwubcode b669580aeb VideoCommon: handle asset memory going over reserved limit correctly by erroring when the memory is exceeded and not allowing more assets to load until memory is released 2023-12-21 01:05:56 -06:00
iwubcode 79648e1c24 VideoCommon: revert max pixel shader samplers back to 8 for Android devices.
It was reported that some games (Zelda Wind Waker and Zelda Twilight Princess but others may also exhibit the issue) have graphical issues with the max pixel samplers set to 16 on some Android devices (ex: Pixel6); since this was increased for a performance heavy feature (custom shaders) just disable it for now.  In the future, this could be handled more elegantly
2023-12-21 00:36:44 -06:00
Lioncache f97b2d472a VideoCommon/CommandProcessor: Pass system instance through constructor
Makes the use of the interface a little less noisy, especially given
how much of the interface depends on an instance being present.
2023-12-20 09:02:53 -05:00
Tilka 70b7a59456
Merge pull request #12451 from lioncash/fifo
VideoCommon/Fifo: Pass system instance through FifoManager constructor
2023-12-20 12:45:38 +00:00
Tilka 01340d7f8d
Merge pull request #12442 from lioncash/hle
Core/HLE/HLE: Remove global system accessors
2023-12-20 12:41:09 +00:00
iwubcode fcfcf14e07 VideoCommon: when loading a texture asset, set sampler to linear sampler if the texture type is not defined and the 2d texture is assumed 2023-12-19 21:51:42 -06:00
iwubcode ae758f489a VideoCommon: update custom pipeline action to support a variety of texture samplers (2D, 2D array, and cube maps) 2023-12-19 21:51:42 -06:00
Tillmann Karras ddb4566a41 VideoCommon: apply "force 24-bit color" to EFB-to-VRAM copies as well 2023-12-20 02:25:07 +00:00
Admiral H. Curtiss acd76918d7
Merge pull request #12448 from lioncash/es
Core/IOS/ES: Remove global system accessor in InitializeEmulationState()
2023-12-19 04:26:08 +01:00
Lioncache b0d244b772 VideoCommon/Fifo: Pass system instance through FifoManager constructor
Given how many member functions make use of the system instance,
it's likely just better to pass the system instance in on construction.

Makes the interface a little less noisy to use.
2023-12-18 22:03:25 -05:00
OatmealDome 186b2f4e92
Merge pull request #12450 from lioncash/cheats
CheatSearch: Get rid of global system accessors
2023-12-18 20:10:48 -05:00
Lioncache dec53848f5 CheatSearch: Get rid of global system accessors
We can retrieve the system via the CPUThreadGuard instances.
2023-12-18 19:24:35 -05:00
Lioncache 00f494307f UICommon: Remove global system accessor in TriggerSTMPowerEvent()
This can be passed through via the IOS instance.
2023-12-18 19:17:16 -05:00
Lioncache c0b7e9cd94 Core/HLE/HLE: Remove global system accessor from ExecuteFromJIT()
We can just pass in our system instance via the ABI function helpers.
2023-12-18 19:11:52 -05:00
Lioncache f4277a901a Core/HLE/HLE: Remove global system accessors
We can get rid of the global system accessors by requiring passing in
relevant state that the function needs and making callsites do the work.

This *does* add a global accessor to the PPCAnalyzer, however, this already
has global accessors present elsewhere within its code, so they can be removed
all at once in a follow up change.
2023-12-18 19:11:49 -05:00
Lioncache f1b18d8ae3 Core/IOS/ES: Remove global system accessor in InitializeEmulationState()
We can pass the core timing instance into the function.
2023-12-18 19:06:45 -05:00
Admiral H. Curtiss 251c7a1030
Merge pull request #12445 from lioncash/gecko
Core/GeckoCode: Remove global system accessors
2023-12-18 23:54:22 +01:00
Admiral H. Curtiss 57b4379364
Merge pull request #12441 from lioncash/ios
Core/IOS/IOS: Remove global system accessors
2023-12-18 23:30:38 +01:00
Admiral H. Curtiss 7f01c1ed5b
Merge pull request #12446 from lioncash/patch
Core/PatchEngine: Get rid of global system accessors
2023-12-18 23:24:51 +01:00
Lioncache ca5695aef2 Core/Debugger/PPCDebugInterface: Remove global system accessor
We can use the CPUThreadGuard instance to get the active system instance.
2023-12-18 16:57:50 -05:00
Lioncache 3802c7bf11 Core/PatchEngine: Get rid of global system accessors
We can pass the system instance into ApplyFramePatches() instead,
especially considering the patch engine callback already has it
available.
2023-12-18 16:48:25 -05:00
Lioncache cea58759d9 Core/GeckoCode: unsigned int -> u32
Same thing for all intents and purposes, less to read.
2023-12-18 16:39:04 -05:00
Lioncache bb866248cf Core/GeckoCode: Avoid signed conversion in RunCodeHandler()
i is being used alongside unsigned types, so it should be unsigned as well.
2023-12-18 16:38:41 -05:00
Lioncache 1ceaa8c52a Core/GeckoCode: Remove global system accessor
We can use the CPUThreadGuard instance to retrieve the system instance instead.
2023-12-18 16:35:52 -05:00
Lioncache 472c65ed35 Core/Debugger_SymbolMap: Make GetCallstack() less verbose
This also allows the constructed CallstackEntry instances to be moved into
the output vector, rather than being copied.
2023-12-18 15:46:32 -05:00
Lioncache 75ec350dc4 Core/Debugger_SymbolMap: Remove redundant system parameters from interface
The CPU thread guard already allows access to the system instance. We can
remove the system parameter to reduce rendundancy here.
2023-12-18 15:46:22 -05:00
Lioncache 514b3e6f55 Core/Debugger_SymbolMap: Remove AddAutoBreakpoints()
This is wholly unused in current code.
2023-12-18 15:24:58 -05:00
Filoppi e456bef163 Input: Improve Controller Interface devices threading
This specific issue was already addressed by https://github.com/dolphin-emu/dolphin/pull/11635
though I felt like there was something more we could do, and wasn't too happy with the
likelihood of devices update calls being skipped (due to `m_devices_population_mutex` being locked).
2023-12-18 21:45:22 +02:00
Lioncache 04300114f7 Core/HLE/HLE_OS: Mark helpers as static where applicable
Previously, these were given external linkage when they're only used within
this translation unit.
2023-12-18 13:44:55 -05:00
Lioncache c4df659e21 HLE_OS: Get rid of global system accessors
Thread guards provide access to the current active system instance.
2023-12-18 13:39:53 -05:00
Lioncache c3c39de212 HLE_Misc: Get rid of global system accessors
Thread guards provide access to the current active system instance.
2023-12-18 13:33:07 -05:00
Lioncache affe928987 Common/TraversalServer: Make use of fmt more
We can convert printf and fprintf over to the use of fmt as well,
given that we've converted the sprintf calls over.
2023-12-18 13:08:57 -05:00
Lioncache dc85194fac Common/TraversalServer: Make use of fmt over sprintf where applicable
Resolves some deprecation warnings on macOS. This is better anyway, given fmt
has generic type formatting.
2023-12-18 13:08:57 -05:00
Lioncache 1764b13423 Core/DSP/DSPTables: Make pdregname() and pdregnamelong() return std::string
Keeps the interface consistent.
2023-12-18 13:08:57 -05:00
Lioncache 62740d97a8 Core/DSP/DSPTables: Make use of fmt::format in pdname()
Resolves a deprecation warning on macOS. Also, we can convert
the function to just return a std::string instead of using a
static internal buffer, which is gross and thread-unsafe.
2023-12-18 13:08:57 -05:00
Lioncache 9abcc1c08b Core/NetPlayServer: Use fmt::format_to_n in GetInterfaceHost()
Lets us avoid some noisy deprecation warnings on macOS (and also lets us use
a more generic formatting specifier).
2023-12-18 13:08:57 -05:00
Lioncache 2b877fc92b Core/IOS/Top: Make use of fmt::format_to_n where applicable
Same behavior, but avoids deprecation warnings on macOS builds and also lets us
use generic print formatting.
2023-12-18 13:08:57 -05:00
Lioncache 04822d5a2c Core/IOS/ES: Make use of fmt::format where applicable
Eliminates a deprecation warnings on macOS. While we're in the
same area, we can remove the call to GetPointer() and instead
use CopyToEmu() to copy the string data back to the emulated memory.
2023-12-18 13:05:04 -05:00
Lioncache e6db08e03a Core/IOS/IOS: Remove global system accessor from Init()
Removes the final global system accessor from the main IOS code by
passing the system instance through it.
2023-12-18 12:28:21 -05:00
Lioncache 1f50a2fd5b Core/IOS/IOS: Remove global system accessor from WriteReturnValue()
We can pass the memory instance into it instead of using the global accessor.
2023-12-18 12:22:01 -05:00
Lioncache b8c657b06f Core/IOS/IOS: Remove global system accessor from RAMOverrideForIOSMemoryValues()
We can allow passing in the memory instance instead of directly going for the
global system instance.
2023-12-18 12:10:25 -05:00
Lioncache a13bcd87d4 Core/IOS/IOS: Remove global system accessors from internal functions
These functions can all be modified to take in the required instance,
rather than using the global system accessor.
2023-12-18 12:04:58 -05:00
Lioncache 0c9f9ca8b6 Core/IOS/IOS: Remove global system accessor from destructor
An EmulationKernel already houses a reference to the current system
2023-12-18 11:55:30 -05:00
Lioncache 0d75d658b1 Core/IOS/IOS: Remove system parameters from BootstrapPPC() and BootIOS()
An EmulationKernel instance already houses a reference to the currently active system instance.
2023-12-18 11:54:03 -05:00
Lioncache 69523de5d5 Core/EXI/EXI_DeviceMemoryCard: Remove global system accessor
We can pass the core timing instance into the Init() call.
2023-12-18 11:15:51 -05:00
Admiral H. Curtiss 715a551dac
Merge pull request #12170 from Filoppi/custom_aspect_ratio
Add support for custom aspect ratios
2023-12-18 05:19:06 +01:00
Filoppi a6dfeed318 Video: make the "Auto" resolution setting also follow the max res setting, to avoid trying to create texture bigger than the maximum supported one 2023-12-18 02:00:25 +02:00
Filoppi ff03189a60 Video: fix auto resolution scale calculations 2023-12-18 02:00:25 +02:00
Filoppi fdd1934f12 Video: fix Auto Resolution Scale not updating when the window was resized.
Also fixes the widescreen hack not fully updating when the aspect ratio setting changed on the spot.
2023-12-18 02:00:25 +02:00
Filoppi b3aa6ad93b Video: implement custom aspect ratio support (already exposed to Qt).
This also renamed some variables/functions.
2023-12-18 02:00:24 +02:00
Filoppi f96bea95d8 Video: rename Presenter::SetWindowSize() 2023-12-18 00:28:15 +02:00
Filoppi 24004af814 Video: polish aspect ratio related code comments to make it clearer 2023-12-18 00:28:14 +02:00
Mai de8bc32dc5
Merge pull request #12362 from CasualPokePlayer/sysconf_widescreen
Add SYSCONF widescreen setting to dtm header
2023-12-17 15:19:02 -05:00
Mai 51a44aa5d2
Merge pull request #12431 from JosJuice/jitarm64-rlwnmx-call-rlwinmx
JitArm64: Call rlwinmx implementation from rlwnmx with imm b
2023-12-17 15:18:00 -05:00
Mai bcd74a81a9
Merge pull request #12370 from iwubcode/more_samplers
VideoBackends / VideoCommon: update max pixel shader samplers from 8 to 16
2023-12-17 14:50:23 -05:00
Mai 559ea0593c
Merge pull request #12432 from JosJuice/jitarm64-logic-i2r-opt
JitArm64: Add additional optimized cases to ANDI2R and friends
2023-12-17 14:45:55 -05:00
Mai f0f0f97554
Merge pull request #12433 from mitaclaw/windows-arm-debug-fix
Fix Windows ARM64 debug build errors
2023-12-17 14:43:55 -05:00
Mai 0125b5182f
Merge pull request #12409 from iwubcode/custom_material_graphics_mod_action_data
VideoCommon: prepare graphics mods for custom shader material data
2023-12-17 14:42:34 -05:00
Mai b27c15fab6
Merge pull request #12382 from iwubcode/shader_asset_default_value
VideoCommon: update shader asset to provide a variant default value
2023-12-17 14:41:55 -05:00
Mai f589c04aa7
Merge pull request #12372 from iwubcode/texture_usage_flag
VideoBackends / VideoCommon: add type enum to dictate how the texture is used; support texture 2d
2023-12-17 14:40:39 -05:00
mitaclaw ca443d7f89 Fix Windows ARM64 debug build errors
Jit.cpp : Potentially uninitialized local pointer variable 'host_address_after_return' used in a DEBUG_ASSERT on line 470.
dolphin-emu.sln : A copy-paste error.
2023-12-17 11:31:28 -08:00
JosJuice dc60bc5f1e JitArm64: Improve codegen in ANDI2R and friends
The codegen for the functions themselves, not for the emitted code.

This seems to save 32 bytes per function. We also get rid of the oddity
we had before where ANDI2R would do masking for 32-bit operations but
the other functions wouldn't.
2023-12-17 18:13:32 +01:00
JosJuice a8e1e1ae48 JitArm64: Optimize additional cases of ANDI2R and friends
Now we'll never need a scratch register for values that are all zeroes
or all ones.
2023-12-17 18:13:32 +01:00
JosJuice 6303416201 JitArm64: Optimize ANDI2R and friends to no-ops when possible
This optimizes rlwnmx with mask == 0xFFFFFFFF.
2023-12-17 18:13:30 +01:00
JosJuice 26de2a7feb JitArm64: Call rlwinmx implementation from rlwnmx with imm b
This way we get some additional optimized cases for rlwnmx with imm b.
2023-12-17 17:00:41 +01:00
Mai e6c85bf8f0
Merge pull request #12428 from JosJuice/jitarm64-rlwinmx-shift-only
JitArm64: Add rlwinmx case for only shifting
2023-12-17 10:45:59 -05:00
Mai 519234949e
Merge pull request #12429 from JosJuice/jitarm64-mtsrin-64-bit
JitArm64: Use 64-bit register for address in mtsrin
2023-12-17 10:45:36 -05:00
Tilka 18f9b966a0
Merge pull request #12358 from rsgnz/master
VideoCommon: Fix "Post-processing shader not found" when (off) is selected.
2023-12-17 09:50:41 +00:00
Tilka 773ffd04b8
Merge pull request #11497 from vyuuui/debugger_assembler_ui
Built-in assembler for debugger interface
2023-12-16 21:15:31 +00:00
JosJuice f5951c9f45 JitArm64: Use 64-bit register for address in mtsrin
Fixes a regression from d34d3bd513 that, depending on the host memory
layout, could cause either a host crash or a guest crash when running
F-Zero GX.
2023-12-16 20:27:58 +01:00
JosJuice b5a95b7804 JitArm64: Add rlwinmx case for only shifting
Small optimization.
2023-12-16 17:34:33 +01:00
Admiral H. Curtiss 190c4e8cda
Merge pull request #12427 from JosJuice/jitarm64-msr-updated-logical-imm
JitArm64: Fix MSRUpdated(ARM64Reg) with FEATURE_FLAG_PERFMON set
2023-12-16 17:22:23 +01:00
JosJuice e0eb4ef5bc JitArm64: Use enum class for LogicalImm size parameter
This should prevent issues like the one fixed in the previous commit
from happening again.
2023-12-16 16:48:26 +01:00
Admiral H. Curtiss 36cb8110f4
Merge pull request #12346 from iwubcode/arb_mipmaps_default_off
Core: disable arbitrary mipmap detection by default
2023-12-16 16:23:10 +01:00
JosJuice 064b23b25b JitArm64: Fix MSRUpdated(ARM64Reg) with FEATURE_FLAG_PERFMON set
The second parameter of the LogicalImm constructor is the size, not the
first.
2023-12-16 12:07:11 +01:00
Admiral H. Curtiss 4b459294b0
Merge pull request #12414 from LillyJadeKatrin/retroachievements-bugfix
Retroachievements - Fixed Login Checks
2023-12-16 05:33:43 +01:00
Admiral H. Curtiss 1daaaf8c26
Merge pull request #12425 from Naim2000/no-install-wad
Disable installing WADs and importing/exporting Wii saves while emulation is running
2023-12-16 05:09:26 +01:00
Naim2000 8f9102f5e5 Disable importing/exporting Wii saves while emulation is running 2023-12-15 19:48:06 -05:00
OatmealDome c159e4fb7a
Merge pull request #12420 from OatmealDome/mtl-oob
MTLStateTracker: Increase fragment buffer array size to 3
2023-12-15 17:12:31 -05:00