ADD: Pop-up menu for disable bind added to the controls dialog.

FIX: I forgot to delete ControlsMapping instance.
This commit is contained in:
nachume committed 2013-05-23 09:39:36 +09:00
1 parent e2024674a4
commit 662df67d39
6 files changed
+137 -45

No files matched your search

+19 -2
View File
@@ -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;