mirror of https://github.com/PCSX2/pcsx2.git
LilyPad: Add Configure on bind option
Part of the GUI update, this function switches to the configuration page immediately after binding an input instead of staying on the bindings page.
This commit is contained in:
parent
1f8608f6dd
commit
872ab9d2b1
|
@ -396,6 +396,10 @@ void SelChanged(int port, int slot)
|
||||||
int ffbFound = 0;
|
int ffbFound = 0;
|
||||||
ForceFeedbackBinding *ffb = 0;
|
ForceFeedbackBinding *ffb = 0;
|
||||||
Binding *b = 0;
|
Binding *b = 0;
|
||||||
|
if (config.bind && !config.configureOnBind) {
|
||||||
|
i = 0;
|
||||||
|
config.bind = false;
|
||||||
|
}
|
||||||
if (i >= 1) {
|
if (i >= 1) {
|
||||||
int index = -1;
|
int index = -1;
|
||||||
int flipped = 0;
|
int flipped = 0;
|
||||||
|
@ -492,7 +496,7 @@ void SelChanged(int port, int slot)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = IDC_DPAD; i < ID_FORCEFEEDBACK_BOX; i++) {
|
for (i = IDC_DPAD; i < IDC_CONFIGURE_ON_BIND; i++) {
|
||||||
hWndTemp = GetDlgItem(hWnd, i);
|
hWndTemp = GetDlgItem(hWnd, i);
|
||||||
if (hWndTemp)
|
if (hWndTemp)
|
||||||
ShowWindow(hWndTemp, !ffb && !b);
|
ShowWindow(hWndTemp, !ffb && !b);
|
||||||
|
@ -870,6 +874,8 @@ int SaveSettings(wchar_t *file = 0)
|
||||||
WritePrivateProfileInt(L"General Settings", L"Keyboard Mode", config.keyboardApi, file);
|
WritePrivateProfileInt(L"General Settings", L"Keyboard Mode", config.keyboardApi, file);
|
||||||
WritePrivateProfileInt(L"General Settings", L"Mouse Mode", config.mouseApi, file);
|
WritePrivateProfileInt(L"General Settings", L"Mouse Mode", config.mouseApi, file);
|
||||||
|
|
||||||
|
WritePrivateProfileInt(L"Pad Settings", L"Configure On Bind", config.configureOnBind, file);
|
||||||
|
|
||||||
for (int port = 0; port < 2; port++) {
|
for (int port = 0; port < 2; port++) {
|
||||||
for (int slot = 0; slot < 4; slot++) {
|
for (int slot = 0; slot < 4; slot++) {
|
||||||
wchar_t temp[50];
|
wchar_t temp[50];
|
||||||
|
@ -982,6 +988,8 @@ int LoadSettings(int force, wchar_t *file)
|
||||||
config.keyboardApi = WM;
|
config.keyboardApi = WM;
|
||||||
config.mouseApi = (DeviceAPI)GetPrivateProfileIntW(L"General Settings", L"Mouse Mode", 0, file);
|
config.mouseApi = (DeviceAPI)GetPrivateProfileIntW(L"General Settings", L"Mouse Mode", 0, file);
|
||||||
|
|
||||||
|
config.configureOnBind = (DeviceAPI)GetPrivateProfileIntW(L"Pad Settings", L"Configure On Bind", 0, file);
|
||||||
|
|
||||||
if (config.debug) {
|
if (config.debug) {
|
||||||
CreateDirectory(L"logs", 0);
|
CreateDirectory(L"logs", 0);
|
||||||
}
|
}
|
||||||
|
@ -1535,8 +1543,10 @@ INT_PTR CALLBACK DialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, LPARAM l
|
||||||
SetupLogSlider(GetDlgItem(hWnd, IDC_SLIDER_SKIP_DEADZONE));
|
SetupLogSlider(GetDlgItem(hWnd, IDC_SLIDER_SKIP_DEADZONE));
|
||||||
if (port || slot)
|
if (port || slot)
|
||||||
EnableWindow(GetDlgItem(hWnd, ID_IGNORE), 0);
|
EnableWindow(GetDlgItem(hWnd, ID_IGNORE), 0);
|
||||||
|
CheckDlgButton(hWnd, IDC_CONFIGURE_ON_BIND, BST_CHECKED * config.configureOnBind);
|
||||||
|
|
||||||
AddTooltip(IDC_BINDINGS_LIST, hWnd);
|
AddTooltip(IDC_BINDINGS_LIST, hWnd);
|
||||||
|
AddTooltip(IDC_CONFIGURE_ON_BIND, hWnd);
|
||||||
AddTooltip(ID_MOUSE, hWnd);
|
AddTooltip(ID_MOUSE, hWnd);
|
||||||
AddTooltip(ID_ANALOG, hWnd);
|
AddTooltip(ID_ANALOG, hWnd);
|
||||||
AddTooltip(ID_IGNORE, hWnd);
|
AddTooltip(ID_IGNORE, hWnd);
|
||||||
|
@ -1549,6 +1559,7 @@ INT_PTR CALLBACK DialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, LPARAM l
|
||||||
AddTooltip(IDC_SLIDER_SKIP_DEADZONE, hWnd);
|
AddTooltip(IDC_SLIDER_SKIP_DEADZONE, hWnd);
|
||||||
AddTooltip(IDC_SLIDER_SENSITIVITY, hWnd);
|
AddTooltip(IDC_SLIDER_SENSITIVITY, hWnd);
|
||||||
|
|
||||||
|
config.bind = false;
|
||||||
Populate(port, slot, padtype);
|
Populate(port, slot, padtype);
|
||||||
} break;
|
} break;
|
||||||
case WM_DEVICECHANGE:
|
case WM_DEVICECHANGE:
|
||||||
|
@ -1595,6 +1606,7 @@ INT_PTR CALLBACK DialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, LPARAM l
|
||||||
PropSheet_Changed(hWndProp, hWnds[port][slot][padtype]);
|
PropSheet_Changed(hWndProp, hWnds[port][slot][padtype]);
|
||||||
ListView_SetItemState(hWndList, index, LVIS_SELECTED, LVIS_SELECTED);
|
ListView_SetItemState(hWndList, index, LVIS_SELECTED, LVIS_SELECTED);
|
||||||
ListView_EnsureVisible(hWndList, index, 0);
|
ListView_EnsureVisible(hWndList, index, 0);
|
||||||
|
config.bind = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1841,6 +1853,8 @@ INT_PTR CALLBACK DialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, LPARAM l
|
||||||
dm->Update(&info);
|
dm->Update(&info);
|
||||||
dm->PostRead();
|
dm->PostRead();
|
||||||
SetTimer(hWnd, 1, 30, 0);
|
SetTimer(hWnd, 1, 30, 0);
|
||||||
|
} else if (cmd == IDC_CONFIGURE_ON_BIND) {
|
||||||
|
config.configureOnBind = IsDlgButtonChecked(hWnd, IDC_CONFIGURE_ON_BIND);
|
||||||
}
|
}
|
||||||
if (cmd == IDC_TURBO) {
|
if (cmd == IDC_TURBO) {
|
||||||
// Don't allow setting it back to indeterminate.
|
// Don't allow setting it back to indeterminate.
|
||||||
|
|
|
@ -40,6 +40,8 @@ public:
|
||||||
|
|
||||||
// Derived value, calculated by GetInput().
|
// Derived value, calculated by GetInput().
|
||||||
u8 ignoreKeys;
|
u8 ignoreKeys;
|
||||||
|
u8 configureOnBind;
|
||||||
|
bool bind;
|
||||||
|
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,6 +19,8 @@ Turbo Key Hack=0
|
||||||
Close Hacks=0
|
Close Hacks=0
|
||||||
Keyboard Mode=2
|
Keyboard Mode=2
|
||||||
Mouse Mode=0
|
Mouse Mode=0
|
||||||
|
[Pad Settings]
|
||||||
|
Configure On Bind=0
|
||||||
[Pad 0 0]
|
[Pad 0 0]
|
||||||
Mode=1
|
Mode=1
|
||||||
Auto Analog=0
|
Auto Analog=0
|
||||||
|
|
|
@ -93,6 +93,7 @@ BEGIN
|
||||||
PUSHBUTTON "Big Motor",ID_BIG_MOTOR,269,226,64,14
|
PUSHBUTTON "Big Motor",ID_BIG_MOTOR,269,226,64,14
|
||||||
PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,347,226,64,14
|
PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,347,226,64,14
|
||||||
// Special bindings and options:
|
// Special bindings and options:
|
||||||
|
CONTROL "Configure on bind",IDC_CONFIGURE_ON_BIND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,335,250,70,15
|
||||||
PUSHBUTTON "Lock Input",ID_LOCK_ALL_INPUT,196,196,59,15
|
PUSHBUTTON "Lock Input",ID_LOCK_ALL_INPUT,196,196,59,15
|
||||||
PUSHBUTTON "Lock Direction",ID_LOCK_DIRECTION,196,214,59,15
|
PUSHBUTTON "Lock Direction",ID_LOCK_DIRECTION,196,214,59,15
|
||||||
PUSHBUTTON "Lock Buttons",ID_LOCK_BUTTONS,196,232,59,15
|
PUSHBUTTON "Lock Buttons",ID_LOCK_BUTTONS,196,232,59,15
|
||||||
|
@ -168,6 +169,7 @@ BEGIN
|
||||||
PUSHBUTTON "Big Motor",ID_BIG_MOTOR,269,226,64,14
|
PUSHBUTTON "Big Motor",ID_BIG_MOTOR,269,226,64,14
|
||||||
PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,347,226,64,14
|
PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,347,226,64,14
|
||||||
// Special bindings and options:
|
// Special bindings and options:
|
||||||
|
CONTROL "Configure on bind",IDC_CONFIGURE_ON_BIND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,335,250,70,15
|
||||||
PUSHBUTTON "Lock Input",ID_LOCK_ALL_INPUT,196,196,59,15
|
PUSHBUTTON "Lock Input",ID_LOCK_ALL_INPUT,196,196,59,15
|
||||||
PUSHBUTTON "Lock Direction",ID_LOCK_DIRECTION,196,214,59,15
|
PUSHBUTTON "Lock Direction",ID_LOCK_DIRECTION,196,214,59,15
|
||||||
PUSHBUTTON "Lock Buttons",ID_LOCK_BUTTONS,196,232,59,15
|
PUSHBUTTON "Lock Buttons",ID_LOCK_BUTTONS,196,232,59,15
|
||||||
|
@ -243,6 +245,7 @@ BEGIN
|
||||||
PUSHBUTTON "Big Motor",ID_BIG_MOTOR,269,226,64,14
|
PUSHBUTTON "Big Motor",ID_BIG_MOTOR,269,226,64,14
|
||||||
PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,347,226,64,14
|
PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,347,226,64,14
|
||||||
// Special bindings and options:
|
// Special bindings and options:
|
||||||
|
CONTROL "Configure on bind",IDC_CONFIGURE_ON_BIND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,335,250,70,15
|
||||||
PUSHBUTTON "Lock Input",ID_LOCK_ALL_INPUT,196,196,59,15
|
PUSHBUTTON "Lock Input",ID_LOCK_ALL_INPUT,196,196,59,15
|
||||||
PUSHBUTTON "Lock Direction",ID_LOCK_DIRECTION,196,214,59,15
|
PUSHBUTTON "Lock Direction",ID_LOCK_DIRECTION,196,214,59,15
|
||||||
PUSHBUTTON "Lock Buttons",ID_LOCK_BUTTONS,196,232,59,15
|
PUSHBUTTON "Lock Buttons",ID_LOCK_BUTTONS,196,232,59,15
|
||||||
|
@ -314,6 +317,7 @@ BEGIN
|
||||||
PUSHBUTTON "Big Motor",ID_BIG_MOTOR,269,226,64,14
|
PUSHBUTTON "Big Motor",ID_BIG_MOTOR,269,226,64,14
|
||||||
PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,347,226,64,14
|
PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,347,226,64,14
|
||||||
// Special bindings and options:
|
// Special bindings and options:
|
||||||
|
CONTROL "Configure on bind",IDC_CONFIGURE_ON_BIND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,335,250,70,15
|
||||||
PUSHBUTTON "Lock Input",ID_LOCK_ALL_INPUT,196,196,59,15
|
PUSHBUTTON "Lock Input",ID_LOCK_ALL_INPUT,196,196,59,15
|
||||||
PUSHBUTTON "Lock Direction",ID_LOCK_DIRECTION,196,214,59,15
|
PUSHBUTTON "Lock Direction",ID_LOCK_DIRECTION,196,214,59,15
|
||||||
PUSHBUTTON "Lock Buttons",ID_LOCK_BUTTONS,196,232,59,15
|
PUSHBUTTON "Lock Buttons",ID_LOCK_BUTTONS,196,232,59,15
|
||||||
|
|
|
@ -69,6 +69,8 @@ LPWSTR dialog_message(int ID, bool *updateText)
|
||||||
L"Right-click and select \"Delete Selected\" to remove the selected input from the list.\n\n"
|
L"Right-click and select \"Delete Selected\" to remove the selected input from the list.\n\n"
|
||||||
L"Right-click and select \"Clear All\" to remove all the inputs from the list.\n\n"
|
L"Right-click and select \"Clear All\" to remove all the inputs from the list.\n\n"
|
||||||
L"Note: Use Shift/Ctrl + Left-click to select multiple bindings. Changing the displayed configuration will now copy it to all selected bindings.";
|
L"Note: Use Shift/Ctrl + Left-click to select multiple bindings. Changing the displayed configuration will now copy it to all selected bindings.";
|
||||||
|
case IDC_CONFIGURE_ON_BIND:
|
||||||
|
return L"Immediately go to the configuration setup when you create a new binding.";
|
||||||
case ID_MOUSE:
|
case ID_MOUSE:
|
||||||
return L"Bind a key that releases or captures the mouse.\n\n"
|
return L"Bind a key that releases or captures the mouse.\n\n"
|
||||||
L"Pressing the assigned button when the mouse is in focus, it releases the mouse from use in-game and makes the cursor visible so it can move/resize the emulator window.\n\n"
|
L"Pressing the assigned button when the mouse is in focus, it releases the mouse from use in-game and makes the cursor visible so it can move/resize the emulator window.\n\n"
|
||||||
|
|
|
@ -102,6 +102,7 @@
|
||||||
#define ID_BIG_MOTOR 0x111C
|
#define ID_BIG_MOTOR 0x111C
|
||||||
#define ID_SMALL_MOTOR 0x111D
|
#define ID_SMALL_MOTOR 0x111D
|
||||||
#define ID_FORCEFEEDBACK_BOX 0x111E
|
#define ID_FORCEFEEDBACK_BOX 0x111E
|
||||||
|
#define IDC_CONFIGURE_ON_BIND 0x111F
|
||||||
#define IDC_BINDINGS_LIST 0x1200
|
#define IDC_BINDINGS_LIST 0x1200
|
||||||
#define ID_SAVE 0x1201
|
#define ID_SAVE 0x1201
|
||||||
#define ID_LOAD 0x1202
|
#define ID_LOAD 0x1202
|
||||||
|
|
Loading…
Reference in New Issue