v3.2.2: moved pixel scale getters to deviceCompat
This commit is contained in:
@@ -21,7 +21,6 @@
|
||||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.scenes;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.Input;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||
@@ -325,7 +324,7 @@ public class PixelScene extends Scene {
|
||||
public static RenderedTextBlock renderTextBlock(String text, int size ){
|
||||
//some systems (macOS mainly) require this back buffer check to ensure
|
||||
// that we're working with real pixels, not logical ones
|
||||
float scale = Game.width / (float)Gdx.graphics.getBackBufferWidth();
|
||||
float scale = DeviceCompat.getRealPixelScaleX();
|
||||
RenderedTextBlock result = new RenderedTextBlock( text, size*Math.round(defaultZoom*scale));
|
||||
result.zoom(1/(float)Math.round(defaultZoom*scale));
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user