Commit graph

41873 commits

Author SHA1 Message Date
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
Admiral H. Curtiss
629935ef11
Merge pull request #12669 from mitaclaw/core-global-system-3
Core::GetState: Avoid Global System Accessor
2024-04-09 04:14:39 +02: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
Jordan Woyak
db0cd82326
Merge pull request #12335 from Tilka/evdev
evdev: close file descriptors in a separate thread
2024-04-07 18:58:10 -05: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
Admiral H. Curtiss
116da3ab95
Merge pull request #12689 from Tilka/movie
Movie: simplify silly loop
2024-04-06 20:40:13 +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
Sam Belliveau
fa4e45e915 Change the scaling process to be more uniform across color space 2024-04-04 00:27:01 -04: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
Admiral H. Curtiss
0a7bcc1041
Merge pull request #12679 from Dentomologist/cheatsmanager_allow_making_window_smaller
CheatsManager: Allow making the window smaller
2024-04-01 08:03:33 +02: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
024664ec0d
Merge pull request #12663 from SuperSamus/skylanders-giants-bloom
Add Bloom Definitions for Skylanders Giants and Trap Team
2024-03-31 06:38:41 +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