mirror of
https://github.com/love2d/love-android.git
synced 2026-08-19 12:14:49 +02:00
love.window.getPixelScale now works properly on Android.
This commit is contained in:
@@ -23,6 +23,10 @@
|
||||
#include "graphics/Graphics.h"
|
||||
#include "Window.h"
|
||||
|
||||
#ifdef LOVE_ANDROID
|
||||
#include "common/android.h"
|
||||
#endif
|
||||
|
||||
// C++
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
@@ -671,7 +675,9 @@ double Window::getPixelScale() const
|
||||
{
|
||||
double scale = 1.0;
|
||||
|
||||
#if SDL_VERSION_ATLEAST(2,0,1)
|
||||
#ifdef LOVE_ANDROID
|
||||
scale = love::android::getScreenScale();
|
||||
#elif SDL_VERSION_ATLEAST(2,0,1)
|
||||
if (window)
|
||||
{
|
||||
int wheight;
|
||||
|
||||
Reference in New Issue
Block a user