[Android] Always recreate controllers after settings
This commit is contained in:
parent
b22f93d4c2
commit
d08f1df674
|
@ -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()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue