mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-15 21:58:56 +02:00
Forcing hardware handling for decode formats on Android
This commit is contained in:
parent
9600f99b1a
commit
88555a17be
2 changed files with 12 additions and 1 deletions
|
|
@ -10,6 +10,8 @@
|
|||
#include "video_core/rasterizer_interface.h"
|
||||
#include "common/android/multiplayer/multiplayer.h"
|
||||
#include <network/network.h>
|
||||
#include "common/settings.h"
|
||||
#include "common/logging/log.h"
|
||||
|
||||
|
||||
static JavaVM *s_java_vm;
|
||||
|
|
@ -524,6 +526,13 @@ namespace Common::Android {
|
|||
s_patch_title_id_field = env->GetFieldID(patch_class, "titleId", "Ljava/lang/String;");
|
||||
env->DeleteLocalRef(patch_class);
|
||||
|
||||
// Prefer hardware decoding on Android by default, forcing this setting will
|
||||
// make the native side attempt GPU decoding first. If the platform lacks a usable
|
||||
// FFmpeg HW device, FFmpeg will fall back to CPU automatically.
|
||||
Settings::values.nvdec_emulation.SetValue(Settings::NvdecEmulation::Gpu);
|
||||
LOG_INFO(HW_GPU, "Android JNI_OnLoad: forced nvdec_emulation = GPU");
|
||||
|
||||
|
||||
const jclass double_class = env->FindClass("java/lang/Double");
|
||||
s_double_class = reinterpret_cast<jclass>(env->NewGlobalRef(double_class));
|
||||
s_double_constructor = env->GetMethodID(double_class, "<init>", "(D)V");
|
||||
|
|
|
|||
|
|
@ -349,7 +349,9 @@ struct Values {
|
|||
linkage, true, "use_asynchronous_gpu_emulation", Category::Renderer};
|
||||
SwitchableSetting<AstcDecodeMode, true> accelerate_astc{linkage,
|
||||
#ifdef ANDROID
|
||||
AstcDecodeMode::Cpu,
|
||||
// Most modern Android devices have native ASTC support
|
||||
// and benefit from GPU decoding. Default to GPU there.
|
||||
AstcDecodeMode::Gpu,
|
||||
#else
|
||||
AstcDecodeMode::Gpu,
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue