mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-11 07:03:33 +02:00
Correct functionality of the display rotation control rotation.
Fixes #19775 A future step might be to also rotate the touch screen inputs..
This commit is contained in:
@@ -231,6 +231,7 @@ void DisplayLayoutScreen::CreateViews() {
|
||||
ScrollView *rightScrollView = new ScrollView(ORIENT_VERTICAL, new AnchorLayoutParams(300.0f, FILL_PARENT, NONE, 0.f, 0.f, 0.f));
|
||||
LinearLayout *rightColumn = new LinearLayout(ORIENT_VERTICAL);
|
||||
rightColumn->padding.SetAll(8.0f);
|
||||
rightColumn->SetSpacing(0.0f);
|
||||
rightScrollView->Add(rightColumn);
|
||||
rightScrollView->SetClickableBackground(true);
|
||||
root_->Add(rightScrollView);
|
||||
@@ -273,6 +274,8 @@ void DisplayLayoutScreen::CreateViews() {
|
||||
|
||||
rightColumn->Add(new CheckBox(&config.bDisplayIntegerScale, gr->T("Integer scale factor")));
|
||||
|
||||
rightColumn->Add(new Spacer(12.0f));
|
||||
|
||||
bool supportsInsets = false;
|
||||
#if PPSSPP_PLATFORM(ANDROID)
|
||||
supportsInsets = System_GetPropertyInt(SYSPROP_SYSTEMVERSION) >= 28;
|
||||
@@ -288,13 +291,6 @@ void DisplayLayoutScreen::CreateViews() {
|
||||
rightColumn->Add(new CheckBox(&config.bIgnoreScreenInsets, gr->T("Ignore camera notch when centering")));
|
||||
}
|
||||
|
||||
mode_ = new ChoiceStrip(ORIENT_HORIZONTAL, new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT));
|
||||
mode_->AddChoice(sy->T("Off"));
|
||||
mode_->AddChoice(ImageID("I_MOVE"));
|
||||
mode_->AddChoice(ImageID("I_RESIZE"));
|
||||
mode_->SetSelection(0, false);
|
||||
bottomControls->Add(mode_);
|
||||
|
||||
static const char *displayRotation[] = { "Landscape", "Portrait", "Landscape Reversed", "Portrait Reversed" };
|
||||
auto rotation = new PopupMultiChoice(&config.iInternalScreenRotation, gr->T("Rotation"), displayRotation, 1, ARRAY_SIZE(displayRotation), I18NCat::CONTROLS, screenManager());
|
||||
rotation->OnChoice.Add([this](UI::EventParams &) {
|
||||
@@ -305,7 +301,12 @@ void DisplayLayoutScreen::CreateViews() {
|
||||
return !g_Config.bSkipBufferEffects || g_Config.bSoftwareRendering;
|
||||
});
|
||||
rotation->SetHideTitle(true);
|
||||
|
||||
rightColumn->Add(new ItemHeader(gr->T("Display rotation")));
|
||||
rightColumn->Add(rotation);
|
||||
rightColumn->Add(new CheckBox(&config.bRotateControlsWithScreen, gr->T("Rotate controls")));
|
||||
|
||||
rightColumn->Add(new Spacer(12.0f));
|
||||
|
||||
Choice *center = new Choice(di->T("Reset"));
|
||||
center->OnClick.Add([&config, portrait](UI::EventParams &) {
|
||||
@@ -314,7 +315,12 @@ void DisplayLayoutScreen::CreateViews() {
|
||||
});
|
||||
rightColumn->Add(center);
|
||||
|
||||
rightColumn->Add(new Spacer(12.0f));
|
||||
mode_ = new ChoiceStrip(ORIENT_HORIZONTAL, new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT));
|
||||
mode_->AddChoice(sy->T("Off"));
|
||||
mode_->AddChoice(ImageID("I_MOVE"));
|
||||
mode_->AddChoice(ImageID("I_RESIZE"));
|
||||
mode_->SetSelection(0, false);
|
||||
bottomControls->Add(mode_);
|
||||
}
|
||||
|
||||
if (portrait) {
|
||||
|
||||
Reference in New Issue
Block a user