mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 04:38:49 +00:00
Merge pull request #9075 from JosJuice/android-osd-left-margin
Android: Move OSD out of the way when menu is open
This commit is contained in:
commit
6ada03fca2
5 changed files with 50 additions and 2 deletions
|
@ -431,6 +431,10 @@ public final class NativeLibrary
|
|||
|
||||
public static native String FormatSize(long bytes, int decimals);
|
||||
|
||||
public static native void SetObscuredPixelsLeft(int width);
|
||||
|
||||
public static native void SetObscuredPixelsTop(int height);
|
||||
|
||||
private static boolean alertResult = false;
|
||||
|
||||
public static boolean displayAlertMsg(final String caption, final String text,
|
||||
|
|
|
@ -137,6 +137,11 @@ public final class MenuFragment extends Fragment implements View.OnClickListener
|
|||
mTitleText.setText(title);
|
||||
}
|
||||
|
||||
if (getResources().getConfiguration().getLayoutDirection() == View.LAYOUT_DIRECTION_LTR)
|
||||
{
|
||||
rootView.post(() -> NativeLibrary.SetObscuredPixelsLeft(rootView.getWidth()));
|
||||
}
|
||||
|
||||
return rootView;
|
||||
}
|
||||
|
||||
|
@ -156,6 +161,14 @@ public final class MenuFragment extends Fragment implements View.OnClickListener
|
|||
options.findViewById(R.id.menu_emulation_load_root).setVisibility(savestateVisibility);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView()
|
||||
{
|
||||
super.onDestroyView();
|
||||
|
||||
NativeLibrary.SetObscuredPixelsLeft(0);
|
||||
}
|
||||
|
||||
private void updatePauseUnpauseVisibility()
|
||||
{
|
||||
boolean paused = EmulationActivity.getHasUserPausedEmulation();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue