love.window.getPixelScale now works properly on Android.

This commit is contained in:
Jairo Luiz
2014-01-30 15:08:15 -03:00
parent b86319c0f4
commit 007b0fc3f0
4 changed files with 99 additions and 1 deletions
+7 -1
View File
@@ -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;