mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 21:43:06 +01:00
Upgrade platform_get_default_scale()
This commit is contained in:
@@ -18,22 +18,6 @@
|
||||
# include <jni.h>
|
||||
# include <wchar.h>
|
||||
|
||||
float platform_get_default_scale()
|
||||
{
|
||||
JNIEnv* env = static_cast<JNIEnv*>(SDL_AndroidGetJNIEnv());
|
||||
|
||||
jobject activity = static_cast<jobject>(SDL_AndroidGetActivity());
|
||||
jclass activityClass = env->GetObjectClass(activity);
|
||||
jmethodID getDefaultScale = env->GetMethodID(activityClass, "getDefaultScale", "()F");
|
||||
|
||||
jfloat displayScale = env->CallFloatMethod(activity, getDefaultScale);
|
||||
|
||||
env->DeleteLocalRef(activity);
|
||||
env->DeleteLocalRef(activityClass);
|
||||
|
||||
return displayScale;
|
||||
}
|
||||
|
||||
AndroidClassLoader::AndroidClassLoader()
|
||||
{
|
||||
log_info("Obtaining JNI class loader");
|
||||
|
||||
Reference in New Issue
Block a user