mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-26 19:58:36 +01:00
ADD: Pop-up menu for disable bind added to the controls dialog.
FIX: I forgot to delete ControlsMapping instance.
This commit is contained in:
1 parent
e2024674a4
commit
662df67d39
6 files changed
+137
-45
No files matched your search
@@ -24,8 +24,6 @@ extern unsigned short analog_ctrl_map[];
|
||||
extern unsigned int dinput_ctrl_map[];
|
||||
extern unsigned int xinput_ctrl_map[];
|
||||
|
||||
#define DINPUT_CAST(inst) static_cast<std::shared_ptr<DinputDevice>>(inst)
|
||||
|
||||
inline UINT* ControlMapping::GetDeviceButtonsMap(UINT curDevice)
|
||||
{
|
||||
switch (curDevice)
|
||||
@@ -171,6 +169,25 @@ UINT ControlMapping::GetBindCode()
|
||||
return GetBindCode(currentDevicePage, currentButtonIndex);
|
||||
}
|
||||
|
||||
void ControlMapping::SetDisableBind(UINT deviceIdx, UINT buttonIdx)
|
||||
{
|
||||
u32 disableCode = 0;
|
||||
if (deviceIdx == CONTROLS_DIRECT_INPUT_INDEX) {
|
||||
disableCode = 0xFFFFFFFF;
|
||||
}
|
||||
SetBindCode(disableCode, deviceIdx, buttonIdx);
|
||||
}
|
||||
|
||||
void ControlMapping::SetDisableBind(UINT buttonIdx)
|
||||
{
|
||||
SetDisableBind(currentDevicePage, buttonIdx);
|
||||
}
|
||||
|
||||
void ControlMapping::SetDisableBind()
|
||||
{
|
||||
SetDisableBind(currentDevicePage, currentButtonIndex);
|
||||
}
|
||||
|
||||
UINT ControlMapping::GetTargetDevice()
|
||||
{
|
||||
return currentDevicePage;
|
||||
|
||||
Reference in new issue
Block a user