mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
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:
@ -107,6 +107,11 @@ void Host_UpdateMainFrame()
|
||||
|
||||
void Host_RequestRenderWindowSize(int width, int height)
|
||||
{
|
||||
// Update touch pointer
|
||||
JNIEnv* env;
|
||||
IDCache::GetJavaVM()->AttachCurrentThread(&env, nullptr);
|
||||
env->CallStaticVoidMethod(IDCache::GetNativeLibraryClass(), IDCache::GetUpdateTouchPointer());
|
||||
IDCache::GetJavaVM()->DetachCurrentThread();
|
||||
}
|
||||
|
||||
bool Host_UINeedsControllerState()
|
||||
@ -564,6 +569,13 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SurfaceDestr
|
||||
s_surf = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
JNIEXPORT jfloat JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_GetGameAspectRatio(JNIEnv* env, jobject obj)
|
||||
{
|
||||
return g_renderer->CalculateDrawAspectRatio();
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_RefreshWiimotes(JNIEnv* env,
|
||||
jobject obj)
|
||||
{
|
||||
|
Reference in New Issue
Block a user