v1.2.0: adjusted default fullscreen for desktop, and platform checking
This commit is contained in:
@@ -24,6 +24,7 @@ package com.watabou.utils;
|
|||||||
import com.badlogic.gdx.Application;
|
import com.badlogic.gdx.Application;
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.Input;
|
import com.badlogic.gdx.Input;
|
||||||
|
import com.badlogic.gdx.utils.SharedLibraryLoader;
|
||||||
import com.watabou.noosa.Game;
|
import com.watabou.noosa.Game;
|
||||||
|
|
||||||
//TODO migrate to platformSupport class
|
//TODO migrate to platformSupport class
|
||||||
@@ -44,15 +45,15 @@ public class DeviceCompat {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isAndroid(){
|
public static boolean isAndroid(){
|
||||||
return Gdx.app.getType() == Application.ApplicationType.Android;
|
return SharedLibraryLoader.isAndroid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isiOS(){
|
public static boolean isiOS(){
|
||||||
return Gdx.app.getType() == Application.ApplicationType.iOS;
|
return SharedLibraryLoader.isIos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isDesktop(){
|
public static boolean isDesktop(){
|
||||||
return Gdx.app.getType() == Application.ApplicationType.Desktop;
|
return SharedLibraryLoader.isWindows || SharedLibraryLoader.isMac || SharedLibraryLoader.isLinux;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean hasHardKeyboard(){
|
public static boolean hasHardKeyboard(){
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public class SPDSettings extends GameSettings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean fullscreen() {
|
public static boolean fullscreen() {
|
||||||
return getBoolean( KEY_FULLSCREEN, false );
|
return getBoolean( KEY_FULLSCREEN, DeviceCompat.isDesktop() );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void landscape( boolean value ){
|
public static void landscape( boolean value ){
|
||||||
|
|||||||
Reference in New Issue
Block a user