[Android] Always recreate controllers after settings

This commit is contained in:
zilmar 2016-11-25 17:31:02 +11:00
parent b22f93d4c2
commit d08f1df674
1 changed files with 3 additions and 19 deletions

View File

@ -326,26 +326,10 @@ public class GameLifecycleHandler implements View.OnKeyListener, SurfaceHolder.C
public void onSettingDone ()
{
float touchscreenScale = ((float)NativeExports.UISettingsLoadDword(UISettingID.TouchScreen_ButtonScale.getValue())) / 100.0f;
boolean recreateTouchScreenControls = false;
if (touchscreenScale != mtouchscreenScale)
{
mtouchscreenScale = touchscreenScale;
recreateTouchScreenControls = true;
}
String layout = NativeExports.UISettingsLoadString(UISettingID.TouchScreen_Layout.getValue());
if (layout != mlayout)
{
mlayout = layout;
recreateTouchScreenControls = true;
}
if (recreateTouchScreenControls)
{
mtouchscreenScale = ((float)NativeExports.UISettingsLoadDword(UISettingID.TouchScreen_ButtonScale.getValue())) / 100.0f;
mlayout = NativeExports.UISettingsLoadString(UISettingID.TouchScreen_Layout.getValue());
CreateTouchScreenControls();
}
}
private void CreateTouchScreenControls()
{