Commit graph

2385 commits

Author SHA1 Message Date
JosJuice
25fdde4204 Android: Update platform enum values
71f654c added a new platform in the middle of the C++ platform enum
without updating the corresponding Android code, making the Android code
incorrectly treat Wii discs as WAD files, WAD files as DOL/ELF files,
and so on. This commit fixes the problem.

To be able to add the new Triforce entry into the Platform enum without
it leading to the UI getting an additional tab, I'm splitting the enum
into Platform and PlatformTab. Platform now exactly matches the C++
enum (previously it excluded ELFOrDOL), and PlatformTab has the same
content as the old Platform.
2025-04-22 20:07:15 +02:00
Zopolis4
494e2c05c2
Adding support for detecting .bin images 2025-04-21 22:05:24 +10:00
Shawn Hoffman
a1691a4031 Prevent android generating duplicate analytics events
dolphin-start event was being generated twice for the normal
end-user case, as can be seen in analytics data for some years.
The problem occured when:
* Android reaped the process hosting the dolphin activity
  (e.g. for power/memory saving).
and
* Dolphin activity was in "stopped" state for > 6 hours before
  being switched back to.

Under above conditions, both calls to ReportStartToAnalytics
would be performed, as dolphin thought it was being launched anew,
and also thought it had been asleep for > 6 hours.

fixes https://bugs.dolphin-emu.org/issues/13675
2025-04-19 22:16:01 -07:00
Sam Belliveau
877864c23a Improve Performance of Granular Buffering + User Adjustable Buffer Size 2025-04-01 18:17:21 -04:00
JMC47
7d794897c4
Merge pull request #13434 from JosJuice/android-non-blocking-input-detection
Android: Don't use separate thread for MotionAlertDialog
2025-03-28 18:25:04 -04:00
Jordan Woyak
0a3feb3e42 Android/Input: Fix a crash when mapping wii remote extensions. 2025-03-27 18:29:02 -05:00
JosJuice
9e9faf3be1 Android: Show message when trying to map disconnected device
Having the MotionAlertDialog immediately close is confusing for users.
Let's show a message to tell them what went wrong.
2025-03-23 21:39:08 +01:00
JosJuice
516c1314d2 Android: Don't use separate thread for MotionAlertDialog
This is an Android continuation of bc95c00. We now call
InputDetector::Update immediately after receiving an input event from
Android instead of periodically calling it in a sleep loop. This
improves detection of very short inputs, which are especially likely to
occur for volume buttons on phones (or at least on my phone) if you
don't intentionally keep them held down.
2025-03-23 21:39:04 +01:00
JMC47
2da255d8cd
Merge pull request #13311 from iwubcode/dynamic_input_textures_reduce_image_writes
Core / DolphinQt / InputCommon: reduce the number disk writes when using DynamicInputTextures
2025-03-23 15:12:28 -04:00
iwubcode
d03f9032c1 Core / DolphinQt / InputCommon: reduce the number disk writes when using DynamicInputTextures 2025-03-22 14:53:02 -05:00
Jordan Woyak
ddb82a5e8c InputCommon/ControllerEmu: Break out functionality of EmulatedController
to eliminate redundant unused members in Wii Remote extension objects.
2025-03-15 14:30:43 -05:00
JosJuice
e637a05707
Merge pull request #12866 from JosJuice/android-log-types-sorting
Android: Replace log type names map with array
2025-03-15 16:01:33 +01:00
JosJuice
b2f8dac739
Merge pull request #13271 from dreamsyntax/gradle-wrapper
Android: Upgrade AGP & Gradle
2025-03-15 15:59:21 +01:00
Sam Belliveau
f09ba10daa AudioCommon: Added Granular Synthesis 2025-03-14 01:22:35 -05:00
dreamsyntax
5beb136992 Android: Upgrade AGP & Gradle
AGP 8.2.0 -> 8.9.0
Gradle and wrapper to 8.11.1
Baseline Profile plugin to 1.3.3
2025-03-04 18:28:01 -07:00
Jordan Woyak
01099d67cb
Merge pull request #13326 from nlebeck/taskviewmodel-mustrestartapp
Eliminate TaskViewModel's `mustRestartApp` field
2025-02-20 21:58:18 -06:00
Jordan Woyak
adc5b81c31 DolphinQt: Rename the pack/unpack SD Card buttons. 2025-02-12 13:30:48 -06:00
Niel Lebeck
56fd1f39d8 Eliminate TaskViewModel's mustRestartApp field
Instead of having UserDataImportWarningDialog set an
`onResultDismiss` callback that examines `mustRestartApp`, and having
UserDataActivity set `mustRestartApp`, just have UserDataActivity set
the callback directly.

This approach is no more data-race-y than the previous approach, and it
simplifies the code. (The behavior of restarting the app when the task
finishes is specific to the user data import flow, and there is no
reason for TaskViewModel to be directly aware of it.)
2025-02-02 12:24:51 -08:00
Daniel Peukert
f28e134c88
Clean up CRLF line endings 2025-01-12 11:06:04 +01:00
Admiral H. Curtiss
98a80239f1
Merge pull request #13030 from JosJuice/android-wait-for-surface-in-run
Android: Wait for surface in Run
2025-01-10 04:50:34 +01:00
Admiral H. Curtiss
75abda6a3a
Merge pull request #12864 from JosJuice/android-window-compat
Android: Replace deprecated setSystemUiVisibility
2025-01-10 04:45:11 +01:00
Admiral H. Curtiss
8f9e3ffd83
Merge pull request #13228 from OatmealDome/fix-curl-2
curl: Update to 8.11.1 and use CMake to configure
2025-01-08 18:14:10 +01:00
OatmealDome
d525776ae6 GeckoCodeConfig: Remove HTTPS workaround for Android 2025-01-07 23:02:13 -05:00
Admiral H. Curtiss
c1c80adf1a
Merge pull request #13235 from Gamer64ytb/vsync-fix
Android: Fix VSync option not working
2024-12-31 15:20:49 +01:00
JMC47
532a8621da
Merge pull request #13116 from mitaclaw/ranges-modernization-8-trivial-of
Ranges Algorithms Modernization - Of
2024-12-26 16:51:53 -05:00
Gamer64
764bf314e1 Android: Fix VSync option not working
It happened due to a typo from SECTION_GFX_HARDWARE
2024-12-24 10:41:45 +01:00
JMC47
1ba8541da9
Merge pull request #13091 from mitaclaw/ranges-modernization-2-returns
Ranges Algorithms Modernization - Return
2024-12-20 12:50:19 -05:00
mitaclaw
2b0cd16c8c Modernize std::none_of with ranges
In JitRegCache.cpp, the lambda predicate were replaced by a pointer to member function because ranges algorithms are able to invoke those.

In ConvertDialog.cpp, the `std::mem_fn` helper was removed because ranges algorithms are able to handle pointers to member functions as predicates.

In BoundingBox.cpp, the lambda predicate was returning the bool element unchanged, so `std::identity` was a better fit.
2024-12-15 19:54:17 -08:00
mitaclaw
62d7166e6a GDBStub: Signal Breakpoint Changes To Host 2024-11-15 15:12:11 -08:00
Dentomologist
7b8610f4ea VideoBackendBase: Clarify function name
Rename GetDefaultBackendName to GetDefaultBackendConfigName to
distinguish it from the display name.
2024-11-03 12:26:57 -08:00
JMC47
adafe1f347
Merge pull request #13147 from mitaclaw/jit-block-table-model-fix
JitBlockTableModel: Catch All Block Invalidating Events (I Hope)
2024-10-30 17:00:27 -04:00
JMC47
bab34ca060
Merge pull request #13140 from dreamsyntax/skip-efb-default-flip
GraphicsSettings: EFBAccessEnable=false by default
2024-10-28 18:58:37 -04:00
mitaclaw
3d9c728910 Host: Rename JitCacheInvalidation
There are two hard problems in computer science...
2024-10-23 23:43:24 -07:00
dreamsyntax
9dacefcbf1 GraphicsSettings: EFBAccessEnable=false by default
Makes Graphics -> Hacks -> Skip EFB Access from CPU enabled by default. Some GPU drivers stall when EFB access occurs in games where EFB is not used. Most games that require this setting set to 'true' already have this defined in their game inis.
2024-10-22 12:28:14 -07:00
mitaclaw
9afd09598c DolphinQt: JIT Widget Refresh
Fulfilling a certain six-year-old todo.
2024-10-19 02:30:44 -07:00
mitaclaw
ff9be97ea1 JitCache: Add WipeBlockProfilingData Function
Accessible from DolphinQt and Android.
2024-10-18 23:50:26 -07:00
mitaclaw
be0b13da97 Simplify std::remove with std::erase
`std::erase` is a replacement for the remove-erase idiom.

Changes to `OpenModeToAndroid` inadvertently revealed that the prior implementation had UB (potentially deleting the end iterator). This is now fixed.
2024-10-17 18:38:34 -07:00
JosJuice
564e640acf Android: Add vsync setting
Recently we have been getting some requests to make the existing vsync
setting available in the Android GUI:

https://bugs.dolphin-emu.org/issues/13650
https://forums.dolphin-emu.org/Thread-vsync-toggle-for-android

I don't quite understand why enabling the vsync setting is helpful when
Android already enforces vsync, but I guess having the option available
doesn't hurt. I'm putting the setting under Advanced, unlike in
DolphinQt, since there's no clear reason why the typical user would want
to use this setting.
2024-10-14 12:20:15 +02:00
JMC47
8d5b6e8e86
Merge pull request #13069 from JosJuice/android-real-balance-board
Android: Add the "Real Balance Board" setting
2024-10-13 15:17:26 -04:00
Tilka
35ec2e97a8
Merge pull request #13079 from JosJuice/android-16k
Android: Add 16 KiB page size support
2024-10-12 10:11:33 +01:00
Tilka
c5ce90b786
Merge pull request #13080 from JosJuice/androidx-edge-to-edge
Android: Use enableEdgeToEdge
2024-10-12 10:11:11 +01:00
JosJuice
6ca2da53e8 Partially revert "Revert "Audit uses of IsRunning and GetState""
This reverts the revert commit bc67fc97c3,
except for the changes in BaseConfigLoader.cpp, which caused the bug
that made us revert 72cf2bdb87. PR 12917
contains an improved change to BaseConfigLoader.cpp, which can be merged
(or rejected) independently.

A few changes have also been made based on review comments.
2024-10-04 18:35:41 +02:00
JosJuice
d0e6573ac7 Android: Use enableEdgeToEdge
Dolphin has been using edge-to-edge rendering for a little while now,
but it has required a bit of manual work. Now that edge-to-edge is
becoming something expected of apps in Android 15, there's a nicer API
we can use.

Tested on Android 8, 11 and 13, with no changes in behavior noted.
2024-09-28 18:20:31 +02:00
JosJuice
14a802b58b Android: Add 16 KiB page size support
So far, Dolphin hasn't been able to run on Android devices that use a
16 KiB page size. 16 KiB page sizes are a very new Android feature that
no phones have shipped with so far, so we're still compatible with the
phones that exist out there, but let's get this fixed before phones
start shipping with 16 KiB page sizes.

Because I couldn't get Android Studio's emulator to work, I haven't been
able to confirm that this change actually makes Dolphin fully compatible
with devices that use a 16 KiB page size. But I have confirmed that this
doesn't break anything on a regular 4 KiB page size device.
2024-09-28 13:43:49 +02:00
mitaclaw
5f90673686 StringUtil: Remove JoinStrings
With 12 uses of `JoinStrings` in the codebase vs 36 uses of `fmt::join`, fmtlib's range adapter for string concatenation with delimiters is clearly the preferred option.
2024-09-22 21:09:36 -07:00
JosJuice
0c1070a07b Android: Add the "Real Balance Board" setting 2024-09-22 21:51:12 +02:00
JosJuice
dcf8ab0189 Android: Wait for surface in Run
When we boot the core, it needs to have a valid surface to draw graphics
to. Our Kotlin code does wait for a valid surface to exist before it
calls NativeLibrary.Run, but there's a chance for the surface to be
deleted before Run locks s_surface_lock. If that happens, the core boots
without a valid surface, which presumably would cause a crash. (I
haven't been able to reproduce the problem myself.)
2024-08-21 20:36:46 +02:00
Tilka
10f06a48ef
Merge pull request #12863 from JosJuice/android-gamepad-sensors
Android: Fix and enable input device sensor input
2024-08-18 13:48:30 +01:00
mitaclaw
9fa4eb9aab Use 'contains' method 2024-08-15 14:20:16 -07:00
OatmealDome
0c18393691
Merge pull request #12965 from JosJuice/android-ndk-27
Android: Update to NDK 27.0.12077973
2024-07-30 13:09:53 -04:00