From e8739156e4dc54b904af036d26609e624c997fcb Mon Sep 17 00:00:00 2001 From: zackhow Date: Sat, 19 Jan 2019 22:49:04 -0500 Subject: Android: Normalize pointer touches based on rendered aspect ratio This allows the defaults to be actual defaults across devices with different screen sizes --- Source/Android/jni/AndroidCommon/IDCache.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Source/Android/jni/AndroidCommon/IDCache.cpp') diff --git a/Source/Android/jni/AndroidCommon/IDCache.cpp b/Source/Android/jni/AndroidCommon/IDCache.cpp index 42a5632139..9841506fab 100644 --- a/Source/Android/jni/AndroidCommon/IDCache.cpp +++ b/Source/Android/jni/AndroidCommon/IDCache.cpp @@ -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(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(env->NewGlobalRef(game_file_class)); -- cgit v1.2.3