38019 Commits

Author SHA1 Message Date
Simonx22
cd62125385 Android: Upgrade AGP dependency from 8.11.0 to 8.13.0 2025-11-11 07:12:46 -05:00
Jordan Woyak
f51eaf3282 Merge pull request #14052 from jordan-woyak/DirectIOFile
Common and DiscIO: Introduce a thread safe DirectIOFile and make BlobReader implementations use it.
2025-11-10 17:29:43 -06:00
JosJuice
068947e2b6 Core: Remove IsHostThread
The core no longer cares which thread is the host thread.

Cleaning up Android's HostThreadLock is left for another PR, in part
because the HostThreadLock in NativeConfig.cpp still serves a purpose,
and in part to make any issues easier to bisect.
2025-11-10 21:14:56 +01:00
JosJuice
1bba42de45 RetroAchievements: Remove MemoryPeeker/MemoryPoker's copying approach
This makes the code simpler, and saves us from the slow operation of
copying the all of RAM on every frame when RAIntegration is enabled.
2025-11-10 21:14:20 +01:00
JosJuice
458bb05af9 Core: Let any thread call previously host-thread-only functions
By letting threads other than the host thread use things like
CPUThreadGuard, we can do a significant cleanup in AchievementsManager
in a later commit of this pull request.

Note: Some functions still can't be called from the CPU thread (or
threads the CPU thread might block on, like the GPU thread), but can
be called from any other thread.
2025-11-10 21:14:17 +01:00
JosJuice
cd4902f0ed Merge pull request #13875 from JosJuice/jitarm64-orr-base-without-mirror
JitArm64: Add missing ORR pattern in MOVI2RImpl
2025-11-10 20:16:21 +01:00
Simonx22
4a3a0228ef Android: Keep main toolbar pinned on game grid
Prevents the version/build bar from sliding behind the status bar when scrolling so the time and build info remain readable instead of overlapping.
2025-11-10 06:47:10 -05:00
Simonx22
469782292c Android: Convert DolphinApplication to Kotlin 2025-11-09 19:45:41 -05:00
Jordan Woyak
a97627e736 Core: Make AddOnStateChangedCallback use HookableEvent. 2025-11-09 16:43:19 -06:00
OatmealDome
fdf822f430 Merge pull request #14093 from Simonx22/android/fix-system-update-dialog-dismissal
Android: Prevent dismissing the System Update dialog by tapping outside
2025-11-09 17:08:43 -05:00
Admiral H. Curtiss
31ca3bca47 Merge pull request #13956 from jordan-woyak/SA_RESTART
Main: Add SA_RESTART to sigaction sa_flags.
2025-11-09 15:30:27 +01:00
Admiral H. Curtiss
02b4b1ece3 Merge pull request #14010 from jordan-woyak/wmreal-iolinux-reopen-on-unplug
WiimoteReal/IOLinux: Reopen Bluetooth device if it was unplugged between scans.
2025-11-09 15:03:12 +01:00
Admiral H. Curtiss
c97d2af814 Merge pull request #14022 from TryTwo/fix_balloontip_width
Settings BalloonTip: Have wordwrap use max width.
2025-11-09 15:00:19 +01:00
Admiral H. Curtiss
ab2ceb10ae Merge pull request #14073 from jordan-woyak/convert-dialog-min-size
DolphinQt: Make disc ConvertDialog have a better minimum size and use QFormLayout.
2025-11-09 14:57:46 +01:00
Admiral H. Curtiss
6435ee1d20 Merge pull request #14026 from jordan-woyak/move-only-function-fix
Common/Functional: Fix MoveOnlyFunction from inadvertently creating references from lvalues.
2025-11-09 14:49:20 +01:00
Admiral H. Curtiss
29e2b0ff01 Merge pull request #14068 from iTrooz/open_folder
feat(profiles): add "open profiles folder" button + add dropdown button for profile actions
2025-11-09 14:29:18 +01:00
Admiral H. Curtiss
e197163e9e Merge pull request #14094 from OatmealDome/mac-nav-list
SettingsWindow: Set navigation list stylesheet in constructor
2025-11-09 14:10:39 +01:00
Jordan Woyak
9e2fc7f4dd Common/IOFile: Remove the Duplicate function. The duplicate handles shared a read/write position making them effectively not thread-safe. 2025-11-09 03:08:14 -06:00
Jordan Woyak
239330017c DiscIO: Make all BlobReader implementations use DirectIOFile to make CopyReader functionality thread safe. 2025-11-09 03:08:14 -06:00
Jordan Woyak
b98acb9a37 Common/BitUtils: Add overloads of AsU8Span/AsWritableU8Span that handle conversions from contiguous ranges. 2025-11-09 03:08:14 -06:00
Jordan Woyak
405baed805 Common: Add a DirectIOFile class that allows for copies which are entirely thread safe. 2025-11-09 03:08:14 -06:00
JosJuice
db997e9963 Merge pull request #14085 from cristian64/disable_wtrigraphs
CMakeLists: Disable `-Wtrigraphs`.
2025-11-09 09:51:33 +01:00
OatmealDome
448329e821 SettingsWindow: Set navigation list stylesheet in constructor 2025-11-09 01:55:52 -05:00
Simonx22
b733213bcf Android: Prevent dismissing the System Update dialog by tapping outside
Tapping outside the System Update dialog would previously close it and leave the update in a partially canceled, inconsistent state. This change disables outside-touch dismissal to avoid accidental interruptions and ensure the process completes cleanly.
2025-11-09 01:21:58 -05:00
Simonx22
bd93c09e38 CPUThreadConfigCallback: Use maximum value of size_t instead of -1 as default value ConfigChangedCallbackID
Co-Authored-By: OatmealDome <OatmealDome@users.noreply.github.com>
2025-11-08 23:23:33 -05:00
LillyJadeKatrin
cff0ba76c1 Init achievement manager in Android startup 2025-11-08 20:31:23 -05:00
JosJuice
f8cddf344d Android: Clear listener in SwitchSettingViewHolder
If bind was called more than once for a SwitchSettingViewHolder, the
line `binding.settingSwitch.isChecked = setting.isChecked` would
accidentally trigger the listener registered during the previous bind
call.
2025-11-08 20:31:22 -05:00
cristian64
7ec6692315 CMakeLists: Disable -Wtrigraphs.
Trigraphs support is generally disabled by default, but some compilers
(e.g. GCC) may still warn when one hypothetical trigraph is encountered.

For example, one of these warnings was introduced as part of #14067:

```
.../Source/Core/DolphinQt/MainWindow.cpp:1433:77: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs]
 1433 |       this, tr("Select a File"), dialog_path, tr("All Save States (*.sav *.s??);; All Files (*)"));
      |
.../Source/Core/DolphinQt/MainWindow.cpp:1445:77: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs]
 1445 |       this, tr("Select a File"), dialog_path, tr("All Save States (*.sav *.s??);; All Files (*)"));
      |
```

The warning is generally not interesting and has been disabled now.
2025-11-08 22:38:03 +00:00
OatmealDome
4f849ec827 Merge pull request #14047 from Simonx22/reset-all-dolphin-settings-android
Android: Add Reset Dolphin Settings functionality
2025-11-08 14:03:44 -05:00
OatmealDome
5ee1ae43bb Merge pull request #14077 from Simonx22/android-alert-message-kotlin
Android: Convert AlertMessage dialog to Kotlin
2025-11-08 14:03:19 -05:00
OatmealDome
02ad041866 Merge pull request #14086 from Simonx22/android/use-native-analytics
Android: Use the shared HTTP analytics backend
2025-11-08 14:03:06 -05:00
OatmealDome
a459dc0d25 Merge pull request #14082 from Simonx22/analytics/reload-on-setting-change
DolphinAnalytics: Reload backend when config changes
2025-11-08 14:00:03 -05:00
Simonx22
8ee767f292 Android: Convert AlertMessage dialog to Kotlin 2025-11-08 12:21:12 -05:00
Simonx22
82f658a28f Android: Use the shared HTTP analytics backend
We can now route Android analytics through Common::HttpAnalyticsBackend, drop the Volley sender, and keep the JNI layer limited to only transfer metadata since https://bugs.dolphin-emu.org/issues/11772 has been fixed.
2025-11-08 12:14:40 -05:00
JosJuice
958db7c78c Merge pull request #14020 from jordan-woyak/string-util-cleanups
StringUtil: Cleanups and add some character encoding conversion unit tests.
2025-11-08 17:36:54 +01:00
Simonx22
f67691d564 Config: Use maximum value of size_t instead of -1 as default value in ConfigChangedCallbackID
Co-authored-by: OatmealDome <julian@oatmealdome.me>
2025-11-08 11:35:31 -05:00
Simonx22
f9b167d8c6 DolphinAnalytics: Reload backend when config changes
Co-Authored-By: OatmealDome <julian@oatmealdome.me>
2025-11-08 11:35:30 -05:00
JosJuice
ba14222a2b Merge pull request #13939 from Dentomologist/logging_avoid_overwriting_debug_verbosity_in_release_builds
Logging: Don't overwrite LDEBUG level in Release builds
2025-11-08 14:47:27 +01:00
JosJuice
9d27c145b9 Merge pull request #14076 from Simonx22/remove-action1-interface
Android: Replace Action1 helper with Kotlin lambda
2025-11-08 11:42:38 +01:00
Jordan Woyak
5af9bd5e46 Merge pull request #14074 from jordan-woyak/HookableEvent-no-strings
Common: Remove the string parameters from the HookableEvent interface.
2025-11-07 16:32:06 -06:00
Jordan Woyak
51cd0a676a Merge pull request #14079 from Dentomologist/use_asyncworkthread_pushblocking_instead_of_sync_event
CubebStream: Use WorkQueueThread::PushBlocking instead of sync_event
2025-11-07 16:31:46 -06:00
Dentomologist
3b97a7bded CubebStream: Use WorkQueueThread::PushBlocking instead of sync_event
Push and wait on WorkQueueThread items using PushBlocking. Previously we
created a Common::Event sync_event on the caller's stack, called Wait on
it, then had the WorkQueueThread call Set on the sync_event once the
thread was done.

In addition to being simpler the new way avoids a use-after-free that
could happen in convoluted and unlikely yet possible thread scheduling
sequences.

One such case can be triggered as follows:

* Set your audio backend to Cubeb
* In CubebStream::SetVolume set a breakpoint at the call to Wait and at
  the call to cubeb_stream_set_volume.
* Start a game.
* Continue until the Cubeb Worker thread hits the
  cubeb_stream_set_volume breakpoint and Emuthread hits the Wait
  breakpoint, freezing each thread when it hits its breakpoint.
* Unfreeze Cubeb Worker.
* In Event::Set set a breakpoint at the end of the scope containing the
  lock_guard such that the guard has been constructed but not destructed
  when the breakpoint is hit.
* Continue until that breakpoint is hit by Cubeb Worker. If other
  threads hit it first keep going.
* Freeze Cubeb Worker.
* For convenience remove the breakpoint in Event::Set so other threads
  don't trigger it.
* In CubebStream::SetRunning set a breakpoint at the call to Wait.
* Unfreeze Emuthread and continue until the breakpoint is hit.
* In Cubeb Worker go to Event::Set and examine the values of m_mutex's
  member variables. In Visual Studio Debug these are locking_thread_id
  == 0xcccccc01 and ownership_levels == 0xcccccccc. This is the result
  of Visual Studio overwriting the memory used on the stack by
  sync_event in CubebStream::SetVolume with cc bytes to represent
  uninitialized memory on the stack (since that function already
  returned), and then allocating enough memory on the stack when calling
  AudioCommon::SetSoundStreamRunning and then CubebStream::SetRunning
  that it overwrote one byte of the memory formerly occupied by
  locking_thread_id.
* If you unfreeze Cubeb Worker at this point it will trigger the lock
  guard's destructor which will then try to unlock m_mutex. Since
  m_mutex is no longer in scope this is a use-after-free, and in VS
  debug triggers a debug assert due to locking_thread_id not matching
  the current thread id.
2025-11-07 13:19:18 -08:00
Simonx22
ddbbb2ea4b Android: Replace Action1 helper with Kotlin lambda 2025-11-07 11:56:11 -05:00
JosJuice
5ed4823ebc Merge pull request #13858 from LillyJadeKatrin/retroachievements-message-adjustments
Retroachievements message adjustments
2025-11-07 16:50:48 +01:00
Jordan Woyak
da6c65bf3b Common: Remove the string parameters from the HookableEvent interface. 2025-11-06 22:34:40 -06:00
Jordan Woyak
5650be6842 Merge pull request #14069 from jordan-woyak/ciface-hookable-event
InputCommon: Make ControllerInterface RegisterDevicesChangedCallback use Common::HookableEvent.
2025-11-06 20:06:53 -06:00
LillyJadeKatrin
dd941bed70 Improve Achievements Window message
Special message on the Achievements window if the token is invalid/expired.
2025-11-06 20:44:08 -05:00
OatmealDome
852b7d85b2 Merge pull request #14062 from Simonx22/macos-design-fixes
macOS: UI fixes for dark mode
2025-11-06 20:20:05 -05:00
LillyJadeKatrin
1ad0a771d9 Delete Invalid RetroAchievements Tokens 2025-11-06 19:42:14 -05:00
LillyJadeKatrin
b1f27b6cfd Added message for bad RetroAchievements token
Displays a different message at game launch if RetroAchievements fails specifically due to an invalid or expired API token, instructing the player to log back in with the game closed.
2025-11-06 19:30:22 -05:00