Fixed my prev commit
This commit is contained in:
@@ -506,6 +506,7 @@ class Settings
|
||||
|
||||
static void Apply(MainActivity p)
|
||||
{
|
||||
setEnvVars();
|
||||
nativeSetVideoDepth(Globals.VideoDepthBpp, Globals.NeedGles2 ? 1 : 0);
|
||||
if(Globals.VideoLinearFilter)
|
||||
nativeSetVideoLinearFilter();
|
||||
@@ -569,7 +570,10 @@ class Settings
|
||||
if( Globals.TouchscreenCalibration[2] > Globals.TouchscreenCalibration[0] )
|
||||
nativeSetTouchscreenCalibration(Globals.TouchscreenCalibration[0], Globals.TouchscreenCalibration[1],
|
||||
Globals.TouchscreenCalibration[2], Globals.TouchscreenCalibration[3]);
|
||||
}
|
||||
|
||||
static void setEnvVars()
|
||||
{
|
||||
String lang = new String(Locale.getDefault().getLanguage());
|
||||
if( Locale.getDefault().getCountry().length() > 0 )
|
||||
lang = lang + "_" + Locale.getDefault().getCountry();
|
||||
|
||||
@@ -589,7 +589,7 @@ JAVA_EXPORT_NAME(Settings_nativeSetupScreenKeyboard) ( JNIEnv* env, jobject thi
|
||||
|
||||
// TODO: screenRatio is not used yet
|
||||
enum { STANDARD_PHONE_SCREEN_HEIGHT = 70 }; // And by "standard phone", I mean my own.
|
||||
float screenRatio = atoi(getenv("DISPLAY_HEIGHT_MM")) / STANDARD_PHONE_SCREEN_HEIGHT;
|
||||
float screenRatio = getenv("DISPLAY_HEIGHT_MM") ? atoi(getenv("DISPLAY_HEIGHT_MM")) / STANDARD_PHONE_SCREEN_HEIGHT : 1.0f;
|
||||
if( screenRatio < STANDARD_PHONE_SCREEN_HEIGHT )
|
||||
screenRatio = STANDARD_PHONE_SCREEN_HEIGHT;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user