mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2026-04-07 18:01:26 -06:00
added other secondary layouts
This commit is contained in:
parent
cc9ab7a557
commit
6cc3137633
@ -57,8 +57,11 @@ enum class SecondaryDisplayLayout(val int: Int) {
|
||||
TOP_SCREEN(1),
|
||||
BOTTOM_SCREEN(2),
|
||||
SIDE_BY_SIDE(3),
|
||||
|
||||
REVERSE_PRIMARY(4);
|
||||
REVERSE_PRIMARY(4),
|
||||
ORIGINAL(5),
|
||||
HYBRID(6),
|
||||
LARGE_SCREEN(7)
|
||||
;
|
||||
|
||||
companion object {
|
||||
fun from(int: Int): SecondaryDisplayLayout {
|
||||
|
||||
@ -1056,6 +1056,12 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback, Choreographer.Fram
|
||||
R.id.menu_secondary_layout_top
|
||||
SecondaryDisplayLayout.BOTTOM_SCREEN.int ->
|
||||
R.id.menu_secondary_layout_bottom
|
||||
SecondaryDisplayLayout.HYBRID.int ->
|
||||
R.id.menu_secondary_layout_hybrid
|
||||
SecondaryDisplayLayout.LARGE_SCREEN.int ->
|
||||
R.id.menu_secondary_layout_largescreen
|
||||
SecondaryDisplayLayout.ORIGINAL.int ->
|
||||
R.id.menu_secondary_layout_original
|
||||
else ->
|
||||
R.id.menu_secondary_layout_side_by_side
|
||||
|
||||
@ -1086,6 +1092,18 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback, Choreographer.Fram
|
||||
screenAdjustmentUtil.changeSecondaryOrientation(SecondaryDisplayLayout.SIDE_BY_SIDE.int)
|
||||
true
|
||||
}
|
||||
R.id.menu_secondary_layout_hybrid -> {
|
||||
screenAdjustmentUtil.changeSecondaryOrientation(SecondaryDisplayLayout.HYBRID.int)
|
||||
true
|
||||
}
|
||||
R.id.menu_secondary_layout_original -> {
|
||||
screenAdjustmentUtil.changeSecondaryOrientation(SecondaryDisplayLayout.ORIGINAL.int)
|
||||
true
|
||||
}
|
||||
R.id.menu_secondary_layout_largescreen -> {
|
||||
screenAdjustmentUtil.changeSecondaryOrientation(SecondaryDisplayLayout.LARGE_SCREEN.int)
|
||||
true
|
||||
}
|
||||
|
||||
|
||||
else -> true
|
||||
|
||||
@ -22,6 +22,15 @@
|
||||
<item
|
||||
android:id="@+id/menu_secondary_layout_side_by_side"
|
||||
android:title="@string/emulation_screen_layout_sidebyside" />
|
||||
<item
|
||||
android:id="@+id/menu_secondary_layout_original"
|
||||
android:title="@string/emulation_screen_layout_original" />
|
||||
<item
|
||||
android:id="@+id/menu_secondary_layout_hybrid"
|
||||
android:title="@string/emulation_screen_layout_hybrid" />
|
||||
<item
|
||||
android:id="@+id/menu_secondary_layout_largescreen"
|
||||
android:title="@string/emulation_screen_layout_largescreen" />
|
||||
|
||||
</group>
|
||||
|
||||
|
||||
@ -41,6 +41,9 @@
|
||||
<item>@string/emulation_top_screen</item>
|
||||
<item>@string/emulation_bottom_screen</item>
|
||||
<item>@string/emulation_screen_layout_sidebyside</item>
|
||||
<item>@string/emulation_screen_layout_original</item>
|
||||
<item>@string/emulation_screen_layout_hybrid</item>
|
||||
<item>@string/emulation_screen_layout_largescreen</item>
|
||||
|
||||
</string-array>
|
||||
|
||||
@ -56,6 +59,9 @@
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>5</item>
|
||||
<item>6</item>
|
||||
<item>7</item>
|
||||
</integer-array>
|
||||
|
||||
<string-array name="smallScreenPositions">
|
||||
|
||||
@ -467,7 +467,7 @@
|
||||
<string name="emulation_aspect_ratio">Aspect Ratio</string>
|
||||
<string name="emulation_switch_screen_layout">Landscape Screen Layout</string>
|
||||
<string name="emulation_switch_portrait_layout">Portrait Screen Layout</string>
|
||||
<string name="emulation_switch_secondary_layout">Secondary Display Screen Layout</string>
|
||||
<string name="emulation_switch_secondary_layout">Secondary Display Layout</string>
|
||||
<string name="emulation_switch_secondary_layout_description">The layout used by a connected secondary screen, wired or wireless (Chromecast, Miracast)</string>
|
||||
<string name="emulation_screen_layout_largescreen">Large Screen</string>
|
||||
<string name="emulation_screen_layout_portrait">Portrait</string>
|
||||
|
||||
@ -57,7 +57,7 @@ enum class PortraitLayoutOption : u32 {
|
||||
PortraitOriginal
|
||||
};
|
||||
|
||||
enum class SecondaryDisplayLayout : u32 { None, TopScreenOnly, BottomScreenOnly, SideBySide, ReversePrimary };
|
||||
enum class SecondaryDisplayLayout : u32 { None, TopScreenOnly, BottomScreenOnly, SideBySide, ReversePrimary, Original, Hybrid, LargeScreen };
|
||||
/** Defines where the small screen will appear relative to the large screen
|
||||
* when in Large Screen mode
|
||||
*/
|
||||
|
||||
@ -305,18 +305,30 @@ FramebufferLayout AndroidSecondaryLayout(u32 width, u32 height) {
|
||||
const Settings::SecondaryDisplayLayout layout =
|
||||
Settings::values.secondary_display_layout.GetValue();
|
||||
switch (layout) {
|
||||
case Settings::SecondaryDisplayLayout::ReversePrimary:
|
||||
return SingleFrameLayout(width,height,! Settings::values.swap_screen,Settings::values.upright_screen.GetValue());
|
||||
case Settings::SecondaryDisplayLayout::TopScreenOnly:
|
||||
return SingleFrameLayout(width, height, false, Settings::values.upright_screen.GetValue());
|
||||
|
||||
case Settings::SecondaryDisplayLayout::BottomScreenOnly:
|
||||
return SingleFrameLayout(width, height, true, Settings::values.upright_screen.GetValue());
|
||||
case Settings::SecondaryDisplayLayout::SideBySide:
|
||||
return LargeFrameLayout(width, height, false, Settings::values.upright_screen.GetValue(),
|
||||
1.0f, Settings::SmallScreenPosition::MiddleRight);
|
||||
case Settings::SecondaryDisplayLayout::LargeScreen:
|
||||
return LargeFrameLayout(width, height, false, Settings::values.upright_screen.GetValue(),
|
||||
Settings::values.large_screen_proportion.GetValue(),
|
||||
Settings::values.small_screen_position.GetValue());
|
||||
case Settings::SecondaryDisplayLayout::Original:
|
||||
return LargeFrameLayout(width, height, false, Settings::values.upright_screen.GetValue(),
|
||||
1.0f, Settings::SmallScreenPosition::BelowLarge);
|
||||
case Settings::SecondaryDisplayLayout::Hybrid:
|
||||
return HybridScreenLayout(width, height, false, Settings::values.upright_screen.GetValue());
|
||||
case Settings::SecondaryDisplayLayout::None:
|
||||
// this should never happen, but if it does, somehow, send the top screen
|
||||
case Settings::SecondaryDisplayLayout::TopScreenOnly:
|
||||
// this should never happen - if "none" is set this method shouldn't run - but if it does,
|
||||
// somehow, use ReversePrimary
|
||||
case Settings::SecondaryDisplayLayout::ReversePrimary:
|
||||
default:
|
||||
return SingleFrameLayout(width, height, false, Settings::values.upright_screen.GetValue());
|
||||
return SingleFrameLayout(width, height, !Settings::values.swap_screen.GetValue(),
|
||||
Settings::values.upright_screen.GetValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user