Android: Normalize pointer touches based on rendered aspect ratio

This allows the defaults to be actual defaults across devices with different
screen sizes
This commit is contained in:
zackhow 2019-01-19 22:49:04 -05:00
parent ec557eb3a2
commit e8739156e4
8 changed files with 117 additions and 20 deletions

View file

@ -12,6 +12,7 @@ static JavaVM* s_java_vm;
static jclass s_native_library_class;
static jmethodID s_display_alert_msg;
static jmethodID s_get_update_touch_pointer;
static jclass s_game_file_class;
static jfieldID s_game_file_pointer;
@ -41,6 +42,11 @@ jmethodID GetDisplayAlertMsg()
return s_display_alert_msg;
}
jmethodID GetUpdateTouchPointer()
{
return s_get_update_touch_pointer;
}
jclass GetAnalyticsClass()
{
return s_analytics_class;
@ -98,6 +104,8 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved)
s_native_library_class = reinterpret_cast<jclass>(env->NewGlobalRef(native_library_class));
s_display_alert_msg = env->GetStaticMethodID(s_native_library_class, "displayAlertMsg",
"(Ljava/lang/String;Ljava/lang/String;Z)Z");
s_get_update_touch_pointer =
env->GetStaticMethodID(IDCache::GetNativeLibraryClass(), "updateTouchPointer", "()V");
const jclass game_file_class = env->FindClass("org/dolphinemu/dolphinemu/model/GameFile");
s_game_file_class = reinterpret_cast<jclass>(env->NewGlobalRef(game_file_class));