mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 12:48:57 +00: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:
parent
ec557eb3a2
commit
e8739156e4
8 changed files with 117 additions and 20 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue