Commit Graph

145 Commits

Author SHA1 Message Date
JosJuice e24d50e881 Android: Hook up game settings to the new config system 2020-09-15 19:10:56 +02:00
JosJuice a538301891 Android: Hook up global settings to the new config system 2020-09-15 19:10:55 +02:00
JosJuice f011e859b4 Android: Centralize default values for settings
I was hoping we would be able to pull in the default values
from C++, but it seems like more trouble than it's worth,
partially because of different settings having default values
of different types and partially because we don't have any
convenient way to get a list of all C++ settings.
2020-09-12 14:59:34 +02:00
JosJuice c6a308380c Android: Replace Java INI parser with C++ INI parser
Fixes https://bugs.dolphin-emu.org/issues/12096.
2020-09-06 13:29:56 +02:00
JosJuice 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
Ryan Meredith 9fe6466c79 Android: Better GCAdapter scanning thread management 2020-08-27 07:43:20 -04:00
JosJuice 02fe1cdec4 Android: Rewrite GetRenderSurfaceScale in Java
Long sequences of JNI calls are both hard to read and slow.
2020-08-09 21:07:22 +02:00
Ryan Meredith fdcc6a436b Android: Add Log Configuration to UI 2020-07-24 13:59:13 -04:00
Ryan Meredith 9ac24a0580 Android: Some simple Clang-Tidy suggestions 2020-07-22 15:38:45 -04:00
LC 487cd7abd9
Merge pull request #8905 from JosJuice/jni-encoding
Android: Use correct encoding when converting strings
2020-07-18 22:13:14 -04:00
JosJuice 05da2e30ad Android: Use system cache directory as cache directory
This lets Android automatically delete data in the cache
directory when the device is running low on space or
when Dolphin is uninstalled.
2020-07-12 13:33:07 +02:00
JosJuice 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
LC 87287181dd
Merge pull request #8907 from JosJuice/android-overlay-stick-gate
Android: Use octagonal stick gate in overlay
2020-07-08 08:50:47 -04:00
JosJuice c89828b22e Android: Convert some files to LF
I wonder why lint didn't catch this...
2020-07-06 17:04:58 +02:00
JosJuice db75509ec5 Android: Enfore correct stick gate in overlay
Currently, the touch controller overlay uses a square gate for
sticks. This commit changes that so that it instead uses the
stick gate configured in the INI, which ensures that the values
sent to the core are appropriately scaled regardless of what
is configured in the INI and makes the overlay look nicer
if the INI is set to a stick gate that matches the graphics.
2020-06-29 01:20:02 +02:00
JosJuice d494e0230c Show file format details in game properties 2020-06-21 20:47:23 +02:00
Ryan Meredith 77f539355d Android: Add recursive game paths to UI 2020-05-31 10:00:09 -04:00
Ryan Meredith 2d6d0c86cc Android: Add Install WAD to menu_game_grid 2020-04-22 13:56:44 -04:00
JMC47 a5bd263dfb
Merge pull request #8714 from JosJuice/progress-dialog-thread
DolphinQt: Run tasks that use progress dialogs on separate threads
2020-04-21 23:59:37 -04:00
Ryan Meredith 0b66310957 Android: Reload Wii Remote settings upon saving them 2020-04-10 10:23:32 -04:00
JosJuice 55f787b898 Remove unused function Host_UpdateProgressDialog 2020-04-03 12:53:38 +02:00
JosJuice 868cc15b71 Android/JNI: Remove odd usage of the comma operator
This was probably a copypaste mistake of mine.
(env is used as the first argument when calling ToJString.)
2020-03-18 12:37:28 +01:00
Stenzek 86db015c23 Common: Add a render_window field to WindowSystemInfo
We need this because we need to pass the layer to MoltenVK, not
the view handle. But the input subsystem still needs the window.
2020-03-11 23:09:30 +10:00
OatmealDome ef32a10d69 InputCommon: Decouple ButtonManager and Touchscreen from Android
Changes were also made for codestyle compliance.
2019-11-28 15:20:51 -05:00
JosJuice c8b8a60033 Android: Let WiimoteEmu know whether we have accelerometer/gyroscope 2019-11-20 20:13:36 +01:00
JosJuice b143df91be Android: Native motion controls 2019-11-20 18:22:20 +01:00
Connor McLaughlin 913cb08066
Merge pull request #8456 from jordan-woyak/input-gate-race-fix
InputCommon: Make the "input gate" not racy.
2019-11-11 10:59:49 +10:00
Léo Lam 08b191ee8e
Merge pull request #8313 from JosJuice/gamelist-xml
GameFile: Support HBC-style XML metadata
2019-11-09 22:59:26 +01:00
Jordan Woyak 85ceb37ccd InputCommon: Make the "input gate" not racey. 2019-11-06 16:31:02 -06:00
JosJuice c007dd1852 Android: Replace emulation rotation crash workaround with proper fix
The workaround was added in 0446a58.

The underlying problem is that we must not destroy the surface
while the video backend is initializing, otherwise the video
backend may reference nullptr.

I've also cleaned up the logic for when to destroy the surface.
Note that the comment in EmulationFragment.java about only being
able to destroy the surface when emulation is running is not true
anymore (due to de632fc, it seems like).
2019-11-05 09:28:40 +01:00
JosJuice d8958fbdf7 GameFile: Use enums for custom/length parameters 2019-09-25 12:25:59 +02:00
JosJuice 59f27ae4e1 GameFile: Support HBC-style XML metadata
This feature was originally exclusive to the previous iteration of
DolphinQt (the one that was the reason for the current iteration
being named DolphinQt2 initially).

https://bugs.dolphin-emu.org/issues/8949
2019-09-25 12:25:33 +02:00
JosJuice 9f3f45aa5f Android: Call UICommon::Init at app start instead of emulation start
Much of our native code assumes that UICommon::Init has been called
(for reasons such as wanting to access the user's settings),
so not calling it until emulation start heavily limits what native
code we can use in the Android GUI (except during emulation).
2019-08-21 18:46:49 +02:00
Stenzek 6a6bbd7071 Android: Support bypassing game file cache to parse file 2019-07-18 22:35:12 +10:00
JosJuice 7f841e9bfd Android: Suggest deleting game INIs if they contain global INI data 2019-07-02 19:28:38 +02:00
Silent 6c21811090
Make DolphinAnalytics a true singleton - static local variables are initialized in a thread safe manner since C++11
Also works around a Visual Studio 2017 bug where static inline class fields are destructed multiple times
2019-06-23 21:43:47 +02:00
Léo Lam 4885130799
Merge pull request #8194 from lioncash/common-msg
Common/MsgHandler: Tidy up interface and namespace code
2019-06-20 13:37:24 +02:00
Lioncash 4f1f55093f Common/MsgHandler: Namespace code within the Common namespace
Closes another gap in the Common library where code isn't being
namespaced under it.
2019-06-19 16:03:55 -04:00
JosJuice 16afac9da9
Merge pull request #7927 from weihuoya/android-key-map
android: simplify config loading code
2019-06-19 11:51:00 +02:00
Connor McLaughlin b13e00b003
Merge pull request #8165 from lioncash/linkage
{Android/ButtonManager, ResourcePack/Manager}: Make file-scope variables/functions internally linked where applicable
2019-06-08 20:56:13 +10:00
Connor McLaughlin bed2d66bed
Merge pull request #8117 from weihuoya/threaded_env
android: get java env from thread local storage
2019-06-08 20:42:15 +10:00
Lioncash 7842bd1179 Android/ButtonManager: Make most file-scope local variables non-allocating
We can use std::array and const char* to make these capable of fully
being stored in the read-only segment, and get rid of a few static
constructors (144 of them).
2019-06-07 20:27:12 -04:00
Lioncash 069497e87d Android/ButtonManager: Make local file-scope variables internally linked where applicable
Silences a few -Wmissing-variable-declarations warnings.
2019-06-07 20:02:03 -04:00
Lioncash c0c0e412e0 Core/ConfigManager: Use forward declarations where applicable
Avoids dragging in IniFile, EXI device and SI device headers in this header which is
quite widely used throughout the codebase.

This also uncovered a few cases where indirect inclusions were being
relied upon, which this also fixes.
2019-06-07 19:54:39 -04:00
weihuoya 0dec8feadb android: thread local env 2019-05-29 20:22:26 +08:00
David Korth 8417c78b7a Update Discord rich presence when the title changes
This allows us to update the rich presence description if a channel
is launched from the Wii Menu. It also handles other PPC title
launches, e.g. Smash Bros. Masterpieces.

Host.h: Added Host_TitleChanged().

DolphinNoGUI/MainNoGUI.cpp: Implemented Host_TitleChanged().
DolphinQt/Host.cpp: Implemented Host_TitleChanged().

Android/jni/MainAndroid.cpp: Stubbed Host_TitleChanged().
DSPTool/StubHost.cpp: Stubbed Host_TitleChanged().
UnitTests/StubHost.cpp: Stubbed Host_TitleChanged().
2019-05-24 14:12:48 +02:00
Techjar ff972e3673 Reformat repo to clang-format 7.0 rules 2019-05-06 18:48:04 +00:00
weihuoya f2394b8c91 android: simple config load code 2019-04-10 18:30:45 +08:00
spycrab 61350b3d98 Core/Host: Allow frontends to block inputs 2019-03-21 13:16:21 +01:00
JosJuice 8842a0f402 Keep track of GameTDB ID separately from game ID
The difference between Dolphin's game IDs and GameTDB's game IDs
is that GameTDB uses four characters for non-disc titles, whereas
Dolphin uses six characters for all titles.

This fixes:

- TitleDatabase considering Datel discs to be NHL Hitz 2002
- Gecko code downloading not working for discs with IDs starting with P
- Cover downloading mixing up discs with channels (e.g. Mario Kart Wii
  and Mario Kart Channel) and making extra HTTP requests. (Android was
  actually doing a better job at this than DolphinQt!)
2019-02-25 19:54:25 +01:00