Commit Graph

55 Commits

Author SHA1 Message Date
cf3e8714eb Android: Add Hashmap to IDCache 2023-05-28 19:01:21 +12:00
8e363c0995 Android: Translate C++ "w" to ParcelFileDescriptor "wt"
Previously we were translating "w" to "w", which unlike in C++ doesn't
truncate. See https://issuetracker.google.com/issues/180526528, and for
reference, https://en.cppreference.com/w/cpp/io/c/fopen and
https://en.cppreference.com/w/cpp/io/basic_filebuf/open.

This issue was brought to my attention by the recently published issue
CVE-2023-21036 in the screenshot editing tool on Pixel phones. I'm not
aware of any code in Dolphin that actually uses "w" with an existing
file on Android (when we ask the user for a location to save to using
SAF, a new file is always created), but still, best to fix this.
2023-03-18 13:44:01 +01:00
c2779aef06 Android: Add the advanced input mapping dialog
It's missing a lot of features from the PC version for now, like
buttons for inserting functions and the ability to see what the
expression evaluates to. I mostly just wanted to get something in
place so you can set up rumble.

Co-authored-by: Charles Lombardo <clombardo169@gmail.com>
2023-03-07 17:39:30 +01:00
1c26a85e35 Android: Add NumericSetting support 2023-03-03 22:28:24 +01:00
2c529b9db1 Android: Add new input mapping implementation 2023-03-03 22:28:24 +01:00
68ebb5c33e Android: Remove old rumble implementation 2023-03-03 22:28:23 +01:00
Mai
78e8669bac Merge pull request #11614 from t895/kotlin-cheats
Android: Convert Cheats Activity to Kotlin
2023-03-02 15:04:19 -05:00
ec7b811de3 Android: Convert RiivolutionPatches to Kotlin 2023-03-01 14:38:02 -05:00
9e090c6bab Android: Convert GraphicsMod to Kotlin 2023-03-01 13:34:34 -05:00
5f6995fe6c Android: Convert GraphicsModGroup to Kotlin 2023-03-01 13:34:09 -05:00
9cbe66bce4 Android: Convert PatchCheat to Kotlin 2023-03-01 13:33:16 -05:00
408b6cb50c Android: Convert ARCheat to Kotlin 2023-03-01 13:32:42 -05:00
5c1954c843 AndroidCommon: Make use of std::string_view where applicable
Several of these can take a string_view rather than needing to
specifically use std::string.
2023-01-30 13:30:52 -05:00
e5b91f00b0 Common: Replace StringBeginsWith/StringEndsWith with std equivalents
Obsoletes these functions in favor of the standard member functions
added in C++20.
2023-01-24 14:58:20 -05:00
b3a368ae06 Android: Add VectorToJObjectArray utility function 2022-12-27 22:59:42 +01:00
0b9351c194 Android: Make more meticulous use of DeleteLocalRef
If we're in a function that isn't just going to immediately return to
Java, leaking local references can lead to problems eventually.
2022-12-27 22:03:44 +01:00
8f410bff15 Android: Add graphics mods support to CheatsActivity 2022-07-23 21:58:45 +02:00
7c86baee50 WiiUpdateCallback: Add interface for update callback 2022-01-21 17:14:16 -05:00
22a1f3422c Android: Add Riivolution patch configuration 2021-10-30 23:24:37 +02:00
b28e5149a7 Android: Improve OpenModeToAndroid's handling of 'b'
Now it also works when b isn't at the very end. (+ goes after b.)
2021-10-13 17:39:09 +02:00
4d609c769f Android: Implement basic read-only cheats list 2021-09-16 16:46:48 +02:00
e149ad4f0a treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00
c1c17339ff Android: Use DeleteLocalRef more in AndroidCommon
Any local references get cleaned up when returning to the JVM,
but some of the functions in AndroidCommon return to C++ rather
than the JVM, and functions with loops risk running into the
limit of how many simultaneous local references are allowed.
2021-05-24 22:01:49 +02:00
b7ba126db0 Android: Use JNI for getting post-processsing shaders
The Java implementation of getting the list of post-processing
shaders only looked in the Sys folder and not the User folder.
This could be fixed in the Java implementation, but it's
simpler to just call the C++ implementation instead.
2021-05-20 16:43:03 +02:00
d99d72f5a6 Android: Remove #ifdef __cplusplus checks
A C compiler would very much be unable to build this code anyway.
2021-03-04 22:47:23 +01:00
ae5f8853a4 Android: Delete more references in IDCache.cpp
It's not causing any problems in practice so far, but let's fix it
before I add even more stuff without remembering to delete references.
2021-03-03 22:58:59 +01:00
347551a01d Android: Implement save overwrite confirmation 2021-01-27 20:10:07 +01:00
d78277c063 Android: Add specialized content provider implementation of DoFileSearch 2020-12-28 21:00:10 +01:00
73855168f3 Android: Show a message when adding a folder with no games
To catch people who try to use unsupported formats.
2020-12-28 18:53:18 +01:00
2126f62111 Android: Add content provider support to File::ScanDirectoryTree 2020-12-20 13:24:54 +01:00
525268f043 Android: Fix opening games with extensionless URI 2020-12-20 13:24:54 +01:00
a7c05d7e84 Android: Add content provider support to File::FileInfo 2020-12-20 13:24:54 +01:00
99ffee9a0a Android: Add content provider support to File::OpenFStream 2020-12-20 13:24:54 +01:00
75899b0e11 Merge pull request #9221 from JosJuice/android-saf-sd-card
Android: Use storage access framework for custom SD card paths
2020-12-10 16:32:43 -05:00
20ebed51bb IP/Top: Add Android network interface 2020-11-27 19:10:28 +04:00
ee52f465b1 Android: Fix rotating EmulationActivity after boot fails
Time for yet another new iteration of working around the
"surface destruction during boot" problem...
This time, the strategy is to use a mutex in MainAndroid.cpp.
2020-11-09 10:38:49 +01:00
0280f3557c Android: Finish EmulationActivity from C++
This makes EmulationActivity automatically close if booting
fails, and lets us get rid of s_emulation_end_event.
2020-11-09 10:33:52 +01:00
e4793cfb39 Android: Don't name unused JNIEnv/jobject/jclass parameters 2020-11-07 12:08:48 +01:00
70df5446d3 Android: Make the handling of SAF open modes more robust 2020-11-06 17:40:03 +01:00
0dc29c743b Android: Get game metadata from core
Trying to get it from a GameFile before emulation starts is unreliable.
2020-10-21 20:02:52 +02:00
cb14b65aad CMake: Fix build errors exposed by making common dependent on fmt 2020-10-19 14:36:09 +02:00
c3f34ac3fa Android: Add "Ignore for this session" to Warning AlertMessages 2020-09-25 11:50:59 -04:00
3805b84906 Android: Add content provider support to File::Delete 2020-09-16 18:38:53 +02:00
6e1e6d2311 Android: Add content provider support to File::IOFile
Taking the hit now to prepare us for when Google Play will
force us to use scoped storage...
2020-09-16 18:38:53 +02:00
d9f3e382fe Android: Add a progress dialog for disc image conversion 2020-09-16 18:38:52 +02:00
74f197caed Android: Expose a proper interface for C++ IniFile class
Replaces the inflexible INI functions in NativeLibrary.
2020-09-06 13:29:52 +02:00
fdcc6a436b Android: Add Log Configuration to UI 2020-07-24 13:59:13 -04:00
f5da6e07d7 Android: Use correct encoding when converting strings
The functions with "UTF" in the name use "modified UTF-8" rather
than the standard UTF-8 which Dolphin uses, at least according
to Oracle's documentation, so it is incorrect for us to use them.
This change fixes the problem by converting between UTF-8 and
UTF-16 manually instead of letting JNI do it for us.
2020-07-08 14:52:05 +02:00
c89828b22e Android: Convert some files to LF
I wonder why lint didn't catch this...
2020-07-06 17:04:58 +02:00
0dec8feadb android: thread local env 2019-05-29 20:22:26 +08:00