Android: Allow changing controller settings during emulation
This commit is contained in:
parent
c2779aef06
commit
32cb41007b
|
@ -50,6 +50,12 @@ public class InputDeviceSetting extends StringSingleChoiceSetting
|
|||
mValues = devices;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEditable()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canClear()
|
||||
{
|
||||
|
|
|
@ -48,6 +48,12 @@ public final class InputMappingControlSetting extends SettingsItem
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEditable()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public EmulatedController getController()
|
||||
{
|
||||
return mController;
|
||||
|
|
|
@ -293,13 +293,10 @@ public final class SettingsFragmentPresenter
|
|||
sl.add(new SubmenuSetting(mContext, R.string.config, MenuTag.CONFIG));
|
||||
sl.add(new SubmenuSetting(mContext, R.string.graphics_settings, MenuTag.GRAPHICS));
|
||||
|
||||
if (!NativeLibrary.IsRunning())
|
||||
sl.add(new SubmenuSetting(mContext, R.string.gcpad_settings, MenuTag.GCPAD_TYPE));
|
||||
if (mSettings.isWii())
|
||||
{
|
||||
sl.add(new SubmenuSetting(mContext, R.string.gcpad_settings, MenuTag.GCPAD_TYPE));
|
||||
if (mSettings.isWii())
|
||||
{
|
||||
sl.add(new SubmenuSetting(mContext, R.string.wiimote_settings, MenuTag.WIIMOTE));
|
||||
}
|
||||
sl.add(new SubmenuSetting(mContext, R.string.wiimote_settings, MenuTag.WIIMOTE));
|
||||
}
|
||||
|
||||
sl.add(new HeaderSetting(mContext, R.string.setting_clear_info, 0));
|
||||
|
|
|
@ -133,6 +133,10 @@ public final class EmulationFragment extends Fragment implements SurfaceHolder.C
|
|||
public void onResume()
|
||||
{
|
||||
super.onResume();
|
||||
|
||||
if (mInputOverlay != null && NativeLibrary.IsGameMetadataValid())
|
||||
mInputOverlay.refreshControls();
|
||||
|
||||
run(activity.isActivityRecreated());
|
||||
}
|
||||
|
||||
|
|
|
@ -131,10 +131,6 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener
|
|||
if (!mPreferences.getBoolean("OverlayInitV3", false))
|
||||
defaultOverlay();
|
||||
|
||||
// Load the controls if we can. If not, EmulationActivity has to do it later.
|
||||
if (NativeLibrary.IsGameMetadataValid())
|
||||
refreshControls();
|
||||
|
||||
// Set the on touch listener.
|
||||
setOnTouchListener(this);
|
||||
|
||||
|
|
Loading…
Reference in New Issue