mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
[Android] Maintain the chosen button layout when returning to the input overlay configuration menu.
- Also make the overlay configuration screen fullscreen for the app. - Also force the overlay activity to be landscape, since this is the only orientation the EmulationActivity supports.
This commit is contained in:
parent
c8cf71c913
commit
c1ed54832c
@ -33,12 +33,16 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity android:name="org.dolphinemu.dolphinemu.gamelist.GameListActivity" />
|
||||
<activity android:name="org.dolphinemu.dolphinemu.gamelist.GameListActivity"/>
|
||||
|
||||
<activity android:name="org.dolphinemu.dolphinemu.emulation.EmulationActivity"
|
||||
android:screenOrientation="landscape" />
|
||||
<activity
|
||||
android:name="org.dolphinemu.dolphinemu.emulation.EmulationActivity"
|
||||
android:screenOrientation="landscape" />
|
||||
|
||||
<activity android:name="org.dolphinemu.dolphinemu.settings.input.InputOverlayConfigActivity"/>
|
||||
<activity
|
||||
android:name="org.dolphinemu.dolphinemu.settings.input.InputOverlayConfigActivity"
|
||||
android:screenOrientation="landscape"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>
|
||||
|
||||
<activity
|
||||
android:name="org.dolphinemu.dolphinemu.settings.PrefsActivity"
|
||||
|
@ -39,6 +39,23 @@ public final class InputOverlayConfigButton extends Button implements OnTouchLis
|
||||
|
||||
// Get the SharedPreferences instance.
|
||||
sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
|
||||
// String ID of this button.
|
||||
final String buttonId = getResources().getResourceEntryName(getId());
|
||||
|
||||
// Check if this button has previous values set that aren't the default.
|
||||
final float x = sharedPrefs.getFloat(buttonId+"-X", -1f);
|
||||
final float y = sharedPrefs.getFloat(buttonId+"-Y", -1f);
|
||||
|
||||
// If they are not -1, then they have a previous value set.
|
||||
// Thus, we set those coordinate values.
|
||||
// TODO: This is not always correct placement. Fix this.
|
||||
// Likely something to do with the backing layout being a relative layout.
|
||||
if (x != -1f && y != -1f)
|
||||
{
|
||||
setX(x);
|
||||
setY(y);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user