diff options
Diffstat (limited to 'src/android')
| -rw-r--r-- | src/android/app/src/main/jni/config.cpp | 5 | ||||
| -rw-r--r-- | src/android/app/src/main/jni/emu_window/emu_window.cpp | 7 | ||||
| -rw-r--r-- | src/android/app/src/main/jni/emu_window/emu_window.h | 3 |
3 files changed, 4 insertions, 11 deletions
diff --git a/src/android/app/src/main/jni/config.cpp b/src/android/app/src/main/jni/config.cpp index 785133057..7a83fea42 100644 --- a/src/android/app/src/main/jni/config.cpp +++ b/src/android/app/src/main/jni/config.cpp | |||
| @@ -217,6 +217,7 @@ void Config::ReadValues() { | |||
| 217 | ReadSetting("Renderer", Settings::values.accelerate_astc); | 217 | ReadSetting("Renderer", Settings::values.accelerate_astc); |
| 218 | ReadSetting("Renderer", Settings::values.use_fast_gpu_time); | 218 | ReadSetting("Renderer", Settings::values.use_fast_gpu_time); |
| 219 | ReadSetting("Renderer", Settings::values.use_vulkan_driver_pipeline_cache); | 219 | ReadSetting("Renderer", Settings::values.use_vulkan_driver_pipeline_cache); |
| 220 | ReadSetting("Renderer", Settings::values.async_presentation); | ||
| 220 | 221 | ||
| 221 | // Use GPU accuracy normal by default on Android | 222 | // Use GPU accuracy normal by default on Android |
| 222 | Settings::values.gpu_accuracy = static_cast<Settings::GPUAccuracy>(config->GetInteger( | 223 | Settings::values.gpu_accuracy = static_cast<Settings::GPUAccuracy>(config->GetInteger( |
| @@ -230,10 +231,6 @@ void Config::ReadValues() { | |||
| 230 | Settings::values.renderer_force_max_clock = | 231 | Settings::values.renderer_force_max_clock = |
| 231 | config->GetBoolean("Renderer", "force_max_clock", true); | 232 | config->GetBoolean("Renderer", "force_max_clock", true); |
| 232 | 233 | ||
| 233 | // Enable asynchronous presentation by default on Android | ||
| 234 | Settings::values.async_presentation = | ||
| 235 | config->GetBoolean("Renderer", "async_presentation", true); | ||
| 236 | |||
| 237 | // Audio | 234 | // Audio |
| 238 | ReadSetting("Audio", Settings::values.sink_id); | 235 | ReadSetting("Audio", Settings::values.sink_id); |
| 239 | ReadSetting("Audio", Settings::values.audio_output_device_id); | 236 | ReadSetting("Audio", Settings::values.audio_output_device_id); |
diff --git a/src/android/app/src/main/jni/emu_window/emu_window.cpp b/src/android/app/src/main/jni/emu_window/emu_window.cpp index 2fdb68823..926bb30e8 100644 --- a/src/android/app/src/main/jni/emu_window/emu_window.cpp +++ b/src/android/app/src/main/jni/emu_window/emu_window.cpp | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | #include "jni/emu_window/emu_window.h" | 8 | #include "jni/emu_window/emu_window.h" |
| 9 | 9 | ||
| 10 | void EmuWindow_Android::OnSurfaceChanged(ANativeWindow* surface) { | 10 | void EmuWindow_Android::OnSurfaceChanged(ANativeWindow* surface) { |
| 11 | m_render_window = surface; | 11 | window_info.render_surface = reinterpret_cast<void*>(surface); |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | void EmuWindow_Android::OnTouchPressed(int id, float x, float y) { | 14 | void EmuWindow_Android::OnTouchPressed(int id, float x, float y) { |
| @@ -37,7 +37,7 @@ void EmuWindow_Android::OnGamepadMotionEvent(int player_index, u64 delta_timesta | |||
| 37 | float gyro_y, float gyro_z, float accel_x, | 37 | float gyro_y, float gyro_z, float accel_x, |
| 38 | float accel_y, float accel_z) { | 38 | float accel_y, float accel_z) { |
| 39 | m_input_subsystem->GetVirtualGamepad()->SetMotionState( | 39 | m_input_subsystem->GetVirtualGamepad()->SetMotionState( |
| 40 | player_index, delta_timestamp, gyro_x, gyro_y, gyro_z, accel_x, accel_y, accel_z); | 40 | player_index, delta_timestamp, gyro_x, gyro_y, gyro_z, accel_x, accel_y, accel_z); |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | void EmuWindow_Android::OnReadNfcTag(std::span<u8> data) { | 43 | void EmuWindow_Android::OnReadNfcTag(std::span<u8> data) { |
| @@ -65,9 +65,8 @@ EmuWindow_Android::EmuWindow_Android(InputCommon::InputSubsystem* input_subsyste | |||
| 65 | // Ensures that we emulate with the correct aspect ratio. | 65 | // Ensures that we emulate with the correct aspect ratio. |
| 66 | UpdateCurrentFramebufferLayout(m_window_width, m_window_height); | 66 | UpdateCurrentFramebufferLayout(m_window_width, m_window_height); |
| 67 | 67 | ||
| 68 | m_host_window = surface; | ||
| 69 | window_info.type = Core::Frontend::WindowSystemType::Android; | 68 | window_info.type = Core::Frontend::WindowSystemType::Android; |
| 70 | window_info.render_surface = reinterpret_cast<void*>(m_host_window); | 69 | window_info.render_surface = reinterpret_cast<void*>(surface); |
| 71 | 70 | ||
| 72 | m_input_subsystem->Initialize(); | 71 | m_input_subsystem->Initialize(); |
| 73 | } | 72 | } |
diff --git a/src/android/app/src/main/jni/emu_window/emu_window.h b/src/android/app/src/main/jni/emu_window/emu_window.h index 2a0a72077..36d46eb51 100644 --- a/src/android/app/src/main/jni/emu_window/emu_window.h +++ b/src/android/app/src/main/jni/emu_window/emu_window.h | |||
| @@ -54,9 +54,6 @@ public: | |||
| 54 | private: | 54 | private: |
| 55 | InputCommon::InputSubsystem* m_input_subsystem{}; | 55 | InputCommon::InputSubsystem* m_input_subsystem{}; |
| 56 | 56 | ||
| 57 | ANativeWindow* m_render_window{}; | ||
| 58 | ANativeWindow* m_host_window{}; | ||
| 59 | |||
| 60 | float m_window_width{}; | 57 | float m_window_width{}; |
| 61 | float m_window_height{}; | 58 | float m_window_height{}; |
| 62 | 59 | ||