mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-22 21:09:52 +00:00
Tilt analog settings: Fix failure to reinitialize tilt_ when creating views.
This caused crashes due to tilt_ ending up pointing to a deleted object after recreate instead of null (in which case we would have avoided the writes). Fixes #18105
This commit is contained in:
parent
8dbc1e7354
commit
e0c5857927
@ -54,6 +54,7 @@ void TiltAnalogSettingsScreen::CreateViews() {
|
||||
tilt_ = new JoystickHistoryView(StickHistoryViewType::OTHER, "", new LinearLayoutParams(1.0f));
|
||||
root_->Add(tilt_);
|
||||
} else {
|
||||
tilt_ = nullptr;
|
||||
AnchorLayout *rightSide = new AnchorLayout(new LinearLayoutParams(1.0));
|
||||
root_->Add(rightSide);
|
||||
switch (g_Config.iTiltInputType) {
|
||||
@ -99,7 +100,6 @@ void TiltAnalogSettingsScreen::CreateViews() {
|
||||
|
||||
settings->SetSpacing(0);
|
||||
|
||||
|
||||
static const char *tiltTypes[] = { "None (Disabled)", "Analog Stick", "D-PAD", "PSP Action Buttons", "L/R Trigger Buttons" };
|
||||
settings->Add(new ItemHeader(co->T("Tilt control setup")));
|
||||
settings->Add(new PopupMultiChoice(&g_Config.iTiltInputType, co->T("Tilt Input Type"), tiltTypes, 0, ARRAY_SIZE(tiltTypes), I18NCat::CONTROLS, screenManager()))->OnChoice.Add(
|
||||
|
Loading…
Reference in New Issue
Block a user