mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-25 07:13:34 +01:00
moved tilt logic to separate unit and enabled tilt to control multiple input types
This commit is contained in:
1 parent
9afe69fa62
commit
9c219bc18b
9 files changed
+306
-12
No files matched your search
@@ -229,10 +229,12 @@ void GameSettingsScreen::CreateViews() {
|
||||
|
||||
#if defined(USING_GLES2)
|
||||
controlsSettings->Add(new CheckBox(&g_Config.bHapticFeedback, c->T("HapticFeedback", "Haptic Feedback (vibration)")));
|
||||
controlsSettings->Add(new CheckBox(&g_Config.bAccelerometerToAnalogHoriz, c->T("Tilt", "Tilt to Analog (horizontal)")));
|
||||
static const char *tiltTypes[] = { "None (Disabled)", "Analog Stick", "D-PAD", "PSP Action Buttons"};
|
||||
controlsSettings->Add(new PopupMultiChoice(&g_Config.iTiltInputType, c->T("Tilt Input Type"), tiltTypes, 0, ARRAY_SIZE(tiltTypes), c, screenManager()));
|
||||
|
||||
Choice *tiltAnalog = controlsSettings->Add(new Choice(c->T("Customize tilt")));
|
||||
tiltAnalog->OnClick.Handle(this, &GameSettingsScreen::OnTiltAnalogSettings);
|
||||
tiltAnalog->SetEnabledPtr(&g_Config.bAccelerometerToAnalogHoriz);
|
||||
tiltAnalog->SetEnabledPtr((bool *)&g_Config.iTiltInputType); //<- dirty int-to-bool cast
|
||||
#endif
|
||||
controlsSettings->Add(new ItemHeader(c->T("OnScreen", "On-Screen Touch Controls")));
|
||||
controlsSettings->Add(new CheckBox(&g_Config.bShowTouchControls, c->T("OnScreen", "On-Screen Touch Controls")));
|
||||
|
||||
Reference in new issue
Block a user