mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #2970 from raven02/patch-5
Assign HW select button on X360 to "SELECT" button
This commit is contained in:
commit
c68f5f78fb
5 changed files with 13 additions and 17 deletions
|
@ -68,7 +68,7 @@ struct DefaultKeyMap {
|
|||
m[KeyDef(DEVICE_ID_X360_0, KEYCODE_DPAD_DOWN)] = CTRL_DOWN;
|
||||
m[KeyDef(DEVICE_ID_X360_0, KEYCODE_DPAD_LEFT)] = CTRL_LEFT;
|
||||
m[KeyDef(DEVICE_ID_X360_0, KEYCODE_BUTTON_START)] = CTRL_START;
|
||||
m[KeyDef(DEVICE_ID_X360_0, KEYCODE_BACK)] = CTRL_SELECT;
|
||||
m[KeyDef(DEVICE_ID_X360_0, KEYCODE_BUTTON_SELECT)] = CTRL_SELECT;
|
||||
m[KeyDef(DEVICE_ID_X360_0, KEYCODE_BUTTON_L1)] = CTRL_LTRIGGER;
|
||||
m[KeyDef(DEVICE_ID_X360_0, KEYCODE_BUTTON_R1)] = CTRL_RTRIGGER;
|
||||
m[KeyDef(DEVICE_ID_X360_0, KEYCODE_BUTTON_R2)] = VIRTKEY_UNTHROTTLE;
|
||||
|
@ -94,7 +94,7 @@ struct DefaultKeyMap {
|
|||
m[KeyDef(DEVICE_ID_X360_0, KEYCODE_DPAD_DOWN)] = CTRL_DOWN;
|
||||
m[KeyDef(DEVICE_ID_X360_0, KEYCODE_DPAD_LEFT)] = CTRL_LEFT;
|
||||
m[KeyDef(DEVICE_ID_X360_0, KEYCODE_BUTTON_START)] = CTRL_START;
|
||||
m[KeyDef(DEVICE_ID_X360_0, KEYCODE_BACK)] = CTRL_SELECT;
|
||||
m[KeyDef(DEVICE_ID_X360_0, KEYCODE_BUTTON_SELECT)] = CTRL_SELECT;
|
||||
m[KeyDef(DEVICE_ID_X360_0, KEYCODE_BUTTON_L1)] = CTRL_LTRIGGER;
|
||||
m[KeyDef(DEVICE_ID_X360_0, KEYCODE_BUTTON_R1)] = CTRL_RTRIGGER;
|
||||
m[KeyDef(DEVICE_ID_X360_0, KEYCODE_BUTTON_R2)] = VIRTKEY_UNTHROTTLE;
|
||||
|
@ -180,13 +180,13 @@ struct DefaultKeyMap {
|
|||
#ifdef _WIN32
|
||||
ControllerMap x360;
|
||||
x360.keys = default360Map();
|
||||
x360.name = "360";
|
||||
x360.name = "Xbox 360 Pad";
|
||||
m.push_back(x360);
|
||||
#endif
|
||||
// Keyboard and pad maps.
|
||||
ControllerMap pad;
|
||||
pad.keys = defaultPadMap();
|
||||
pad.name = "Pad";
|
||||
pad.name = "DirectInput Pad";
|
||||
pad.active = false;
|
||||
m.push_back(pad);
|
||||
#endif
|
||||
|
|
|
@ -254,9 +254,10 @@ void GameSettingsScreen::CreateViews() {
|
|||
tabHolder->AddTab("Controls", controlsSettingsScroll);
|
||||
controlsSettings->Add(new CheckBox(&g_Config.bShowTouchControls, c->T("OnScreen", "On-Screen Touch Controls")));
|
||||
controlsSettings->Add(new CheckBox(&g_Config.bShowAnalogStick, c->T("Show Left Analog Stick")));
|
||||
controlsSettings->Add(new PopupSliderChoice(&g_Config.iTouchButtonOpacity, 15, 65, c->T("Button Opacity"), screenManager()));
|
||||
controlsSettings->Add(new CheckBox(&g_Config.bAccelerometerToAnalogHoriz, c->T("Tilt", "Tilt to Analog (horizontal)")));
|
||||
|
||||
controlsSettings->Add(new Choice(gs->T("Control Mapping")))->OnClick.Handle(this, &GameSettingsScreen::OnControlMapping);
|
||||
controlsSettings->Add(new PopupSliderChoice(&g_Config.iTouchButtonOpacity, 15, 65, c->T("Button Opacity"), screenManager()));
|
||||
|
||||
// System
|
||||
ViewGroup *systemSettingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
ViewGroup *systemSettings = new LinearLayout(ORIENT_VERTICAL);
|
||||
|
@ -291,11 +292,10 @@ void GlobalSettingsScreen::CreateViews() {
|
|||
LinearLayout *list = root_->Add(new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(1.0f)));
|
||||
list->Add(new ItemHeader("General"));
|
||||
list->Add(new CheckBox(&g_Config.bNewUI, gs->T("Enable New UI")));
|
||||
list->Add(new CheckBox(&g_Config.bEnableLogging, gs->T("Enable Logging")));
|
||||
list->Add(new CheckBox(&enableReports_, gs->T("Enable Error Reporting")));
|
||||
list->Add(new CheckBox(&g_Config.bEnableLogging, gs->T("Enable Debug Logging")));
|
||||
list->Add(new CheckBox(&enableReports_, gs->T("Enable Errors Reporting")));
|
||||
list->Add(new CheckBox(&g_Config.bEnableCheats, gs->T("Enable Cheats")));
|
||||
list->Add(new CheckBox(&g_Config.bScreenshotsAsPNG, gs->T("Screenshots as PNG")));
|
||||
list->Add(new Choice(gs->T("Control Mapping")))->OnClick.Handle(this, &GlobalSettingsScreen::OnControlMapping);
|
||||
list->Add(new Choice(gs->T("System Language")))->OnClick.Handle(this, &GlobalSettingsScreen::OnLanguage);
|
||||
list->Add(new Choice(gs->T("Developer Tools")))->OnClick.Handle(this, &GlobalSettingsScreen::OnDeveloperTools);
|
||||
list->Add(new Choice(g->T("Back")))->OnClick.Handle(this, &GlobalSettingsScreen::OnBack);
|
||||
|
@ -316,12 +316,11 @@ UI::EventReturn GlobalSettingsScreen::OnDeveloperTools(UI::EventParams &e) {
|
|||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
UI::EventReturn GlobalSettingsScreen::OnControlMapping(UI::EventParams &e) {
|
||||
screenManager()->push(new ControlsScreen());
|
||||
UI::EventReturn GameSettingsScreen::OnControlMapping(UI::EventParams &e) {
|
||||
screenManager()->push(new KeyMappingScreen());
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
|
||||
UI::EventReturn GlobalSettingsScreen::OnBack(UI::EventParams &e) {
|
||||
screenManager()->finishDialog(this, DR_OK);
|
||||
g_Config.sReportHost = enableReports_ ? "report.ppsspp.org" : "";
|
||||
|
|
|
@ -40,6 +40,7 @@ private:
|
|||
|
||||
// Event handlers
|
||||
UI::EventReturn OnDownloadPlugin(UI::EventParams &e);
|
||||
UI::EventReturn OnControlMapping(UI::EventParams &e);
|
||||
|
||||
// Temporaries to convert bools to int settings
|
||||
bool cap60FPS_;
|
||||
|
@ -59,7 +60,6 @@ private:
|
|||
UI::EventReturn OnFactoryReset(UI::EventParams &e);
|
||||
UI::EventReturn OnBack(UI::EventParams &e);
|
||||
UI::EventReturn OnDeveloperTools(UI::EventParams &e);
|
||||
UI::EventReturn OnControlMapping(UI::EventParams &e);
|
||||
|
||||
// Temporaries to convert bools to other kinds of settings
|
||||
bool enableReports_;
|
||||
|
@ -75,4 +75,4 @@ protected:
|
|||
private:
|
||||
UI::EventReturn OnBack(UI::EventParams &e);
|
||||
UI::EventReturn OnRunCPUTests(UI::EventParams &e);
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1010,9 +1010,6 @@ namespace MainWindow
|
|||
g_Config.SSAntiAliasing = !g_Config.SSAntiAliasing;
|
||||
ResizeDisplay(true);
|
||||
break;
|
||||
case ID_OPTIONS_CONTROLS:
|
||||
MessageBox(hWnd, "Control mapping has been moved to the in-window Settings menu.\n", "Sorry", 0);
|
||||
break;
|
||||
|
||||
case ID_EMULATION_SOUND:
|
||||
g_Config.bEnableSound = !g_Config.bEnableSound;
|
||||
|
|
Binary file not shown.
Loading…
Add table
Reference in a new issue