9167 Commits

Author SHA1 Message Date
zhupengfei
7ed8ee8782 android/camera: UX enhancements
1. Only request camera permissions once
2. Set the default settings to NDK camera
3. When camera device is not found, fall back to still image
4. Add 'Camera Device' configuration when one is found
5. Added a message when camera permissions are denied

For 4, I had to remove the use of the `config` field in StillImage camera.
2021-01-10 15:33:11 -05:00
zhupengfei
8ab4b44b30 android: Add simple UI for camera configuration
The UI is subject to be changed. At least need to add a camera device selection. I also think we should make Device Camera the default
2021-01-10 15:33:11 -05:00
zhupengfei
5c32783938 fixes to the NDK camera implementation 2021-01-10 15:33:11 -05:00
zhupengfei
5cc5f37bcb android/camera: Implement image flipping
We use libyuv's Mirror function to handle horizontal flip. Regarding the vertical flip, libyuv doc states that 'just set a negative height'
2021-01-10 15:33:11 -05:00
zhupengfei
2a5bced376 android: Add NDK camera implementation
Not tested yet as my device doesn't support camera2...
2021-01-10 15:33:11 -05:00
zhupengfei
6c8bb074f7 android: Add a still image camera
Similar to what is in the Qt frontend, this camera takes a URI to a
picture file. When the config is empty, it will open up the gallery and
ask the user to pick a picture.

The image is then read and cropped from the Java side by the Picasso library,
and sent to the native code with android NDK Bitmap API (jnigraphics).
The native code handles the format conversion with libyuv.

Image flipping is yet to be implemented.
2021-01-10 15:33:11 -05:00
zhupengfei
6cfdbe7e9c externals: Add libyuv and jnigraphics 2021-01-10 15:33:11 -05:00
bunnei
fd39a76eea android: audio: Disable realtime audio by default. 2021-01-10 15:33:11 -05:00
bunnei
1ce53ac67b android: Apply correct theme at boot. 2021-01-10 15:33:11 -05:00
bunnei
5b78db60ff android: Implement billing for Premium. 2021-01-10 15:33:11 -05:00
zhupengfei
5e78c39507 Fix a typo in swkbd
That made the application crash when an @ is typed and the game prohibited it
2021-01-10 15:33:11 -05:00
BreadFish64
06e4b43912 memory: fix memory leak related to un-freed shared memory 2021-01-10 15:33:11 -05:00
BreadFish64
d1d58772c4 Revert "android: log: TrimSourcePath: Cannot be constexpr."
This reverts commit 21a75c52
2021-01-10 15:33:11 -05:00
FearlessTobi
1fca022d6f GameDatabase: Don't rescan when upgraded
This otherwise causes a crash because the Database gets closed too early.
2021-01-10 15:33:11 -05:00
FearlessTobi
bf1284f87c GameDatabase: Increase DB_VERSION
I forgot to do this in a previous PR.
2021-01-10 15:33:11 -05:00
bunnei
3c96b0f446 android: MainActivity: Move theme setup to after settings initialization.
- Fixes a crash.
2021-01-10 15:33:11 -05:00
FearlessTobi
5f9969f68b android: Add premium section and Dark Theme setting 2021-01-10 15:33:11 -05:00
FearlessTobi
a06aa2d32c android/GameAdapter: Fix the getColor calls using the wrong context 2021-01-10 15:33:11 -05:00
FearlessTobi
6b86a05152 android/build: Update exifinterface to version 1.2.0 2021-01-10 15:33:11 -05:00
FearlessTobi
c861fc81b7 android: Make adjustScale reflect changes without closing the dialog 2021-01-10 15:33:11 -05:00
FearlessTobi
b5363afa3d android: Clarify the warning in the Debug tab 2021-01-10 15:33:11 -05:00
FearlessTobi
d50ff7fac5 android: Enable audio stretching by default
It helps eliminate stutter and won't have a huge perf penalty, hopefully.
2021-01-10 15:33:11 -05:00
zhupengfei
ea617b5f7d gl_shader_util: Specify default precision for uimage2D
Otherwise, this causes the application to crash when compiling any shader, on both devices I tested.
2021-01-10 15:33:11 -05:00
FearlessTobi
0285b8bd61 android: Add game region to the GameDatabase 2021-01-10 15:33:11 -05:00
FearlessTobi
f6b662df5c android: Remove unused JNI functions and use better names for game icon variables 2021-01-10 15:33:11 -05:00
FearlessTobi
a1ec009ceb android/settings: Make background color match the rest of the app 2021-01-10 15:33:11 -05:00
FearlessTobi
5f6ae9de98 styles: Use Appcompat instead of MaterialComponents in order to avoid various issues
Fixes the AppBar being black in settings and emulation when using the dark theme.
(Dolphin does the same.)

Also cleans up our styles a bit.
2021-01-10 15:33:11 -05:00
FearlessTobi
a5902495d0 android: Fix the frame limiter
It was erroneously using the wrong config section and variable type.
2021-01-10 15:33:11 -05:00
BreadFish64
d51bfb07cf video_core: disable depth/stencil texture download on OpenGL ES 2021-01-10 15:33:11 -05:00
BreadFish64
e6c166eac8 android: disallow split screen 2021-01-10 15:33:11 -05:00
FearlessTobi
45b96a7392 android/settings: Move VSync option to debug
Dolphin does the same and there's no real reason the users should mess with it.
2021-01-10 15:33:11 -05:00
FearlessTobi
8b5f677920 android/NativeLibrary: Use Html.FROM_HTML_MODE_LEGACY
Fixes a deprecation warning.
2021-01-10 15:33:11 -05:00
FearlessTobi
a9319baaf4 android: Make more Strings translatable 2021-01-10 15:33:11 -05:00
FearlessTobi
aa7bc0f579 android: Fix the menu animations
Turns out those unused methods were actually used for something.
2021-01-10 15:33:11 -05:00
FearlessTobi
5b8ff4049a AndroidManifest: Workaround the crash when changing Theme while in settings
Essentially extends upon https://github.com/dolphin-emu/dolphin/pull/8288.

Original description:
"The "correct way" would be to fully save and restore data on onSaveInstanceState and restore it back on onCreate. I tried to do that first.
As there is various conflicts with doing this without some form of refactor due to how the lifecycle diverges and is baked-in to the application, ignoring Activity recreation on orientation change should work well enough and we don't draw anything different in settings on landscape mode or ui mode anyway."
2021-01-10 15:33:11 -05:00
FearlessTobi
889bd64386 android: Show a hint when the gamelist is empty 2021-01-10 15:33:11 -05:00
FearlessTobi
67c485a793 Make the gamelist look nicer and indicate files with a wrong extension visually 2021-01-10 15:33:11 -05:00
FearlessTobi
3510ec54b7 android: Change plus icon to folder icon because we don't support multiple directories 2021-01-10 15:33:11 -05:00
FearlessTobi
7b61989ed0 android: Add realtime audio setting 2021-01-10 15:33:11 -05:00
FearlessTobi
91f20a80c6 audio_core: Add realtime audio 2021-01-10 15:33:11 -05:00
BreadFish64
937b04c693 video_core: bump swap chain size for GLES to reduce bottleneck 2021-01-10 15:33:11 -05:00
BreadFish64
976c0c7104 video_core: implement optimized D24S8->RGBA8 reinterpreters 2021-01-10 15:33:11 -05:00
James Rowe
d0f5bd77ff Use immutable storage when available 2021-01-10 15:33:11 -05:00
BreadFish64
a221e106fc android: disable OpenGL debug message again 2021-01-10 15:33:11 -05:00
BreadFish64
8c0c218061 android: fix opening settings menu in-game 2021-01-10 15:33:10 -05:00
SachinVin
1b32febd50 android: SettingsFragmentPresenter.java: correct the section used in debug tab
Fixes setting always showing the default value.
2021-01-10 15:33:10 -05:00
BreadFish64
4a2d1b5edb video_core: implement GLES depth/stencil downloads 2021-01-10 15:33:10 -05:00
FearlessTobi
e22b8402be android: Add debug tab 2021-01-10 15:33:10 -05:00
FearlessTobi
eef048080d Optimize imports 2021-01-10 15:33:10 -05:00
FearlessTobi
b7f006f232 android: Complete the removal of ATV and address minor Linter warnings 2021-01-10 15:33:10 -05:00