[Android] Recreate the controls after going to settings
This commit is contained in:
parent
3f4b659320
commit
857f739066
|
@ -69,7 +69,7 @@ public class GameLifecycleHandler implements View.OnKeyListener, SurfaceHolder.C
|
||||||
private GameOverlay mOverlay;
|
private GameOverlay mOverlay;
|
||||||
|
|
||||||
// Input resources
|
// Input resources
|
||||||
private final ArrayList<AbstractController> mControllers;
|
private ArrayList<AbstractController> mControllers;
|
||||||
private VisibleTouchMap mTouchscreenMap;
|
private VisibleTouchMap mTouchscreenMap;
|
||||||
private KeyProvider mKeyProvider;
|
private KeyProvider mKeyProvider;
|
||||||
private Controller mMogaController;
|
private Controller mMogaController;
|
||||||
|
@ -328,7 +328,13 @@ public class GameLifecycleHandler implements View.OnKeyListener, SurfaceHolder.C
|
||||||
{
|
{
|
||||||
mtouchscreenScale = ((float)NativeExports.UISettingsLoadDword(UISettingID.TouchScreen_ButtonScale.getValue())) / 100.0f;
|
mtouchscreenScale = ((float)NativeExports.UISettingsLoadDword(UISettingID.TouchScreen_ButtonScale.getValue())) / 100.0f;
|
||||||
mlayout = NativeExports.UISettingsLoadString(UISettingID.TouchScreen_Layout.getValue());
|
mlayout = NativeExports.UISettingsLoadString(UISettingID.TouchScreen_Layout.getValue());
|
||||||
|
mControllers = new ArrayList<AbstractController>();
|
||||||
CreateTouchScreenControls();
|
CreateTouchScreenControls();
|
||||||
|
|
||||||
|
// Initialize user interface devices
|
||||||
|
View inputSource = mIsXperiaPlay ? new NativeXperiaTouchpad(mActivity) : mOverlay;
|
||||||
|
initControllers(inputSource);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateTouchScreenControls()
|
private void CreateTouchScreenControls()
|
||||||
|
|
Loading…
Reference in New Issue