mirror of
https://github.com/love2d/love-android.git
synced 2026-08-19 20:20:25 +02:00
Replaced use of SDL internal header file with the public interface
This commit is contained in:
@@ -22,9 +22,8 @@
|
|||||||
|
|
||||||
#ifdef LOVE_ANDROID
|
#ifdef LOVE_ANDROID
|
||||||
|
|
||||||
// SDL
|
|
||||||
#include "core/android/SDL_android.h"
|
|
||||||
#include "SDL.h"
|
#include "SDL.h"
|
||||||
|
#include "jni.h"
|
||||||
|
|
||||||
namespace love
|
namespace love
|
||||||
{
|
{
|
||||||
@@ -33,7 +32,7 @@ namespace android
|
|||||||
|
|
||||||
double getScreenScale()
|
double getScreenScale()
|
||||||
{
|
{
|
||||||
JNIEnv *env = Android_JNI_GetEnv();
|
JNIEnv *env = (JNIEnv*) SDL_AndroidGetJNIEnv();
|
||||||
|
|
||||||
jclass activity = env->FindClass("org/love2d/android/GameActivity");
|
jclass activity = env->FindClass("org/love2d/android/GameActivity");
|
||||||
jmethodID getMetrics = env->GetStaticMethodID(activity, "getMetrics", "()Landroid/util/DisplayMetrics;");
|
jmethodID getMetrics = env->GetStaticMethodID(activity, "getMetrics", "()Landroid/util/DisplayMetrics;");
|
||||||
|
|||||||
Reference in New Issue
Block a user