Merge pull request #1751 from FlatOutPS2/Lily

LilyPad: Another GUI update and add more new functions
This commit is contained in:
Jonathan Li 2017-01-27 00:22:44 +00:00 committed by GitHub
commit 625c4a9a05
9 changed files with 517 additions and 367 deletions

View File

@ -1,5 +1,5 @@
/* LilyPad - Pad plugin for PS2 Emulator /* LilyPad - Pad plugin for PS2 Emulator
* Copyright (C) 2002-2014 PCSX2 Dev Team/ChickenLiver * Copyright (C) 2002-2017 PCSX2 Dev Team/ChickenLiver
* *
* PCSX2 is free software: you can redistribute it and/or modify it under the * PCSX2 is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free * terms of the GNU Lesser General Public License as published by the Free
@ -39,7 +39,8 @@ const wchar_t *padTypes[] = {
L"Dualshock 2", L"Dualshock 2",
L"Guitar", L"Guitar",
L"Pop'n Music controller", L"Pop'n Music controller",
L"PS1 Mouse"}; L"PS1 Mouse",
L"neGcon"};
// Hacks or configurations which PCSX2 needs with a specific value // Hacks or configurations which PCSX2 needs with a specific value
void PCSX2_overrideConfig(GeneralConfig &config_in_out) void PCSX2_overrideConfig(GeneralConfig &config_in_out)
@ -47,7 +48,7 @@ void PCSX2_overrideConfig(GeneralConfig &config_in_out)
config_in_out.disableScreenSaver = 0; // Not required - handled internally by PCSX2 config_in_out.disableScreenSaver = 0; // Not required - handled internally by PCSX2
config_in_out.escapeFullscreenHack = 0; // Not required - handled internally by PCSX2 config_in_out.escapeFullscreenHack = 0; // Not required - handled internally by PCSX2
config_in_out.saveStateTitle = 0; // Not required - handled internally by PCSX2 config_in_out.saveStateTitle = 0; // Not required - handled internally by PCSX2
config_in_out.closeHacks = 0; // Cannot function when used by PCSX2 config_in_out.closeHack = 0; // Cannot function when used by PCSX2
} }
// Dialog widgets which should be disabled - mostly matching PCSX2_overrideConfig // Dialog widgets which should be disabled - mostly matching PCSX2_overrideConfig
@ -58,8 +59,7 @@ const UINT *PCSX2_disabledWidgets()
IDC_ESCAPE_FULLSCREEN_HACK, IDC_ESCAPE_FULLSCREEN_HACK,
IDC_SAVE_STATE_TITLE, IDC_SAVE_STATE_TITLE,
IDC_ANALOG_START1, // start in analog mode - only useful for PS1 IDC_ANALOG_START1, // start in analog mode - only useful for PS1
IDC_CLOSE_HACK1, IDC_CLOSE_HACK,
IDC_CLOSE_HACK2,
0}; 0};
return disabledWidgets; return disabledWidgets;
} }
@ -112,7 +112,6 @@ const GeneralSettingsBool BoolOptionsInfo[] = {
{L"Save State in Title", IDC_SAVE_STATE_TITLE, 0}, // Not required for PCSX2 {L"Save State in Title", IDC_SAVE_STATE_TITLE, 0}, // Not required for PCSX2
{L"GH2", IDC_GH2_HACK, 0}, {L"GH2", IDC_GH2_HACK, 0},
{L"Turbo Key Hack", IDC_TURBO_KEY_HACK, 0},
}; };
void Populate(int port, int slot, int padtype); void Populate(int port, int slot, int padtype);
@ -287,47 +286,47 @@ wchar_t *GetCommandStringW(u8 command, int port, int slot)
return temp; return temp;
} }
/* Get text from the buttons. */ /* Get text from the buttons. */
if (command >= 0x0C && command <= 0x28) { if (command >= 0x0C && command <= 0x2A) {
HWND hWnd = GetDlgItem(hWnds[port][slot][padtype], 0x10F0 + command); HWND hWnd = GetDlgItem(hWnds[port][slot][padtype], 0x10F0 + command);
if (!hWnd) { if (!hWnd) {
wchar_t *strings[] = { wchar_t *strings[] = {
L"Lock Buttons", L"Lock Buttons", // 0x0C (12)
L"Lock Input", L"Lock Input", // 0x0D (13)
L"Lock Direction", L"Lock Direction", // 0x0E (14)
L"Mouse", L"Mouse", // 0x0F (15)
L"Select", L"Select", // 0x10 (16)
L"L3", L"L3", // 0x11 (17)
L"R3", L"R3", // 0x12 (18)
L"Start", L"Start", // 0x13 (19)
L"Up", L"Up", // 0x14 (20)
L"Right", L"Right", // 0x15 (21)
L"Down", L"Down", // 0x16 (22)
L"Left", L"Left", // 0x17 (23)
L"L2", L"L2", // 0x18 (24)
L"R2", L"R2", // 0x19 (25)
L"L1", L"L1", // 0x1A (26)
L"R1", L"R1", // 0x1B (27)
L"Triangle", L"Triangle", // 0x1C (28)
L"Circle", L"Circle", // 0x1D (29)
L"Square", L"Square", // 0x1E (30)
L"Cross", L"Cross", // 0x1F (31)
L"L-Stick Up", L"L-Stick Up", // 0x20 (32)
L"L-Stick Right", L"L-Stick Right", // 0x21 (33)
L"L-Stick Down", L"L-Stick Down", // 0x22 (34)
L"L-Stick Left", L"L-Stick Left", // 0x23 (35)
L"R-Stick Up", L"R-Stick Up", // 0x24 (36)
L"R-Stick Right", L"R-Stick Right", // 0x25 (37)
L"R-Stick Down", L"R-Stick Down", // 0x26 (38)
L"R-Stick Left", L"R-Stick Left", // 0x27 (39)
L"Analog", L"Analog", // 0x28 (40)
L"Excluded Input", // 0x29 (41)
L"Turbo", // 0x2A (42)
}; };
return strings[command - 0xC]; return strings[command - 0xC];
} }
int res = GetWindowTextW(hWnd, temp, 20); int res = GetWindowTextW(hWnd, temp, 20);
if ((unsigned int)res - 1 <= 18) if ((unsigned int)res - 1 <= 18)
return temp; return temp;
} else if (command == 0x7F) {
return L"Ignore Key";
} }
return L""; return L"";
} }
@ -366,7 +365,7 @@ void CALLBACK PADsetSettingsDir(const char *dir)
} }
int GetBinding(int port, int slot, int index, Device *&dev, Binding *&b, ForceFeedbackBinding *&ffb); int GetBinding(int port, int slot, int index, Device *&dev, Binding *&b, ForceFeedbackBinding *&ffb);
int BindCommand(Device *dev, unsigned int uid, unsigned int port, unsigned int slot, unsigned int padtype, int command, int sensitivity, int turbo, int deadZone, int skipDeadZone); int BindCommand(Device *dev, unsigned int uid, unsigned int port, unsigned int slot, unsigned int padtype, int command, int sensitivity, int rapidFire, int deadZone, int skipDeadZone);
int CreateEffectBinding(Device *dev, wchar_t *effectName, unsigned int port, unsigned int slot, unsigned int padtype, unsigned int motor, ForceFeedbackBinding **binding); int CreateEffectBinding(Device *dev, wchar_t *effectName, unsigned int port, unsigned int slot, unsigned int padtype, unsigned int motor, ForceFeedbackBinding **binding);
@ -381,8 +380,8 @@ void SelChanged(int port, int slot)
wchar_t *devName = L"N/A"; wchar_t *devName = L"N/A";
wchar_t *key = L"N/A"; wchar_t *key = L"N/A";
wchar_t *command = L"N/A"; wchar_t *command = L"N/A";
// Second value is now turbo. // Second value is now rapidFire.
int turbo = -1; int rapidFire = -1;
int sensitivity = 0; int sensitivity = 0;
int deadZone = 0; int deadZone = 0;
int skipDeadZone = 0; int skipDeadZone = 0;
@ -448,13 +447,11 @@ void SelChanged(int port, int slot)
if (b) { if (b) {
bFound++; bFound++;
VirtualControl *control = &dev->virtualControls[b->controlIndex]; VirtualControl *control = &dev->virtualControls[b->controlIndex];
// Ignore
if (b->command != 0x7F) {
// Only relative axes can't have negative sensitivity. // Only relative axes can't have negative sensitivity.
if (((control->uid >> 16) & 0xFF) == RELAXIS) { if (((control->uid >> 16) & 0xFF) == RELAXIS) {
disableFlip = 1; disableFlip = 1;
} }
turbo += b->turbo; rapidFire += b->rapidFire;
if (b->sensitivity < 0) { if (b->sensitivity < 0) {
flipped++; flipped++;
sensitivity -= b->sensitivity; sensitivity -= b->sensitivity;
@ -466,8 +463,6 @@ void SelChanged(int port, int slot)
skipDeadZone += b->skipDeadZone; skipDeadZone += b->skipDeadZone;
nonButtons++; nonButtons++;
} }
} else
disableFlip = 1;
} else } else
ffbFound++; ffbFound++;
} }
@ -475,14 +470,14 @@ void SelChanged(int port, int slot)
} }
if ((bFound && ffbFound) || ffbFound > 1) { if ((bFound && ffbFound) || ffbFound > 1) {
ffb = 0; ffb = 0;
turbo = -1; rapidFire = -1;
deadZone = 0; deadZone = 0;
skipDeadZone = 0; skipDeadZone = 0;
sensitivity = 0; sensitivity = 0;
disableFlip = 1; disableFlip = 1;
bFound = ffbFound = 0; bFound = ffbFound = 0;
} else if (bFound) { } else if (bFound) {
turbo++; rapidFire++;
sensitivity /= bFound; sensitivity /= bFound;
if (nonButtons) { if (nonButtons) {
deadZone /= nonButtons; deadZone /= nonButtons;
@ -496,7 +491,7 @@ void SelChanged(int port, int slot)
} }
} }
for (i = IDC_DPAD; i <= IDC_DEVICE_SELECT; i++) { for (i = IDC_DPAD; i <= IDC_FACE_ANALOG; i++) {
hWndTemp = GetDlgItem(hWnd, i); hWndTemp = GetDlgItem(hWnd, i);
if (hWndTemp) if (hWndTemp)
ShowWindow(hWndTemp, !ffb && !b); ShowWindow(hWndTemp, !ffb && !b);
@ -556,13 +551,13 @@ void SelChanged(int port, int slot)
if (disableFlip) if (disableFlip)
EnableWindow(GetDlgItem(hWnd, IDC_FLIP), 0); EnableWindow(GetDlgItem(hWnd, IDC_FLIP), 0);
EnableWindow(GetDlgItem(hWnd, IDC_TURBO), turbo >= 0); EnableWindow(GetDlgItem(hWnd, IDC_RAPID_FIRE), rapidFire >= 0);
if (turbo > 0 && turbo < bFound) { if (rapidFire > 0 && rapidFire < bFound) {
SendMessage(GetDlgItem(hWnd, IDC_TURBO), BM_SETSTYLE, BS_AUTO3STATE, 0); SendMessage(GetDlgItem(hWnd, IDC_RAPID_FIRE), BM_SETSTYLE, BS_AUTO3STATE, 0);
CheckDlgButton(hWnd, IDC_TURBO, BST_INDETERMINATE); CheckDlgButton(hWnd, IDC_RAPID_FIRE, BST_INDETERMINATE);
} else { } else {
SendMessage(GetDlgItem(hWnd, IDC_TURBO), BM_SETSTYLE, BS_AUTOCHECKBOX, 0); SendMessage(GetDlgItem(hWnd, IDC_RAPID_FIRE), BM_SETSTYLE, BS_AUTOCHECKBOX, 0);
CheckDlgButton(hWnd, IDC_TURBO, BST_CHECKED * (bFound && turbo == bFound)); CheckDlgButton(hWnd, IDC_RAPID_FIRE, BST_CHECKED * (bFound && rapidFire == bFound));
} }
HWND hWndCombo = GetDlgItem(hWnd, IDC_AXIS_DIRECTION); HWND hWndCombo = GetDlgItem(hWnd, IDC_AXIS_DIRECTION);
int enableCombo = 0; int enableCombo = 0;
@ -717,7 +712,7 @@ int ListBoundEffect(int port, int slot, Device *dev, ForceFeedbackBinding *b)
} }
// Only for use with control bindings. Affects all highlighted bindings. // Only for use with control bindings. Affects all highlighted bindings.
void ChangeValue(int port, int slot, int *newSensitivity, int *newTurbo, int *newDeadZone, int *newSkipDeadZone) void ChangeValue(int port, int slot, int *newSensitivity, int *newRapidFire, int *newDeadZone, int *newSkipDeadZone)
{ {
int padtype = config.padConfigs[port][slot].type; int padtype = config.padConfigs[port][slot].type;
if (!hWnds[port][slot][padtype]) if (!hWnds[port][slot][padtype])
@ -753,8 +748,8 @@ void ChangeValue(int port, int slot, int *newSensitivity, int *newTurbo, int *ne
b->skipDeadZone = *newSkipDeadZone; b->skipDeadZone = *newSkipDeadZone;
} }
} }
if (newTurbo) { if (newRapidFire) {
b->turbo = *newTurbo; b->rapidFire = *newRapidFire;
} }
} }
PropSheet_Changed(hWndProp, hWnds[port][slot][padtype]); PropSheet_Changed(hWndProp, hWnds[port][slot][padtype]);
@ -821,19 +816,24 @@ void Populate(int port, int slot, int padtype)
hWnd = GetDlgItem(hWnds[port][slot][padtype], IDC_FORCEFEEDBACK); hWnd = GetDlgItem(hWnds[port][slot][padtype], IDC_FORCEFEEDBACK);
SendMessage(hWnd, CB_RESETCONTENT, 0, 0); SendMessage(hWnd, CB_RESETCONTENT, 0, 0);
int added = 0; int added = 0;
bool enable = false;
for (int i = 0; i < dm->numDevices; i++) { for (int i = 0; i < dm->numDevices; i++) {
Device *dev = dm->devices[i]; Device *dev = dm->devices[i];
if (dev->enabled && dev->numFFAxes && dev->numFFEffectTypes) { if (dev->enabled && dev->numFFAxes && dev->numFFEffectTypes) {
SendMessage(hWnd, CB_INSERTSTRING, added, (LPARAM)dev->displayName); SendMessage(hWnd, CB_INSERTSTRING, added, (LPARAM)dev->displayName);
SendMessage(hWnd, CB_SETITEMDATA, added, i); SendMessage(hWnd, CB_SETITEMDATA, added, i);
added++; added++;
int selectedDevice = config.deviceSelect[port][slot];
if (selectedDevice == -1 || dm->devices[selectedDevice] == dev) {
enable = true;
}
} }
} }
SendMessage(hWnd, CB_SETCURSEL, 0, 0); SendMessage(hWnd, CB_SETCURSEL, 0, 0);
EnableWindow(hWnd, added != 0); EnableWindow(hWnd, added != 0 && enable);
EnableWindow(GetDlgItem(hWnds[port][slot][padtype], ID_BIG_MOTOR), added != 0); EnableWindow(GetDlgItem(hWnds[port][slot][padtype], ID_BIG_MOTOR), added != 0 && enable);
EnableWindow(GetDlgItem(hWnds[port][slot][padtype], ID_SMALL_MOTOR), added != 0); EnableWindow(GetDlgItem(hWnds[port][slot][padtype], ID_SMALL_MOTOR), added != 0 && enable);
SelChanged(port, slot); SelChanged(port, slot);
} }
@ -871,7 +871,7 @@ int SaveSettings(wchar_t *file = 0)
for (int i = 0; i < sizeof(BoolOptionsInfo) / sizeof(BoolOptionsInfo[0]); i++) { for (int i = 0; i < sizeof(BoolOptionsInfo) / sizeof(BoolOptionsInfo[0]); i++) {
noError &= WritePrivateProfileInt(L"General Settings", BoolOptionsInfo[i].name, config.bools[i], file); noError &= WritePrivateProfileInt(L"General Settings", BoolOptionsInfo[i].name, config.bools[i], file);
} }
WritePrivateProfileInt(L"General Settings", L"Close Hacks", config.closeHacks, file); WritePrivateProfileInt(L"General Settings", L"Close Hack", config.closeHack, file);
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);
@ -917,7 +917,7 @@ int SaveSettings(wchar_t *file = 0)
Binding *b = dev->pads[port][slot][padtype].bindings + j; Binding *b = dev->pads[port][slot][padtype].bindings + j;
VirtualControl *c = &dev->virtualControls[b->controlIndex]; VirtualControl *c = &dev->virtualControls[b->controlIndex];
wsprintfW(temp, L"Binding %i", bindingCount++); wsprintfW(temp, L"Binding %i", bindingCount++);
wsprintfW(temp2, L"0x%08X, %i, %i, %i, %i, %i, %i, %i, %i", c->uid, port, b->command, b->sensitivity, b->turbo, slot, b->deadZone, b->skipDeadZone, padtype); wsprintfW(temp2, L"0x%08X, %i, %i, %i, %i, %i, %i, %i, %i", c->uid, port, b->command, b->sensitivity, b->rapidFire, slot, b->deadZone, b->skipDeadZone, padtype);
noError &= WritePrivateProfileStringW(id, temp, temp2, file); noError &= WritePrivateProfileStringW(id, temp, temp2, file);
} }
for (int j = 0; j < dev->pads[port][slot][padtype].numFFBindings; j++) { for (int j = 0; j < dev->pads[port][slot][padtype].numFFBindings; j++) {
@ -953,7 +953,7 @@ int LoadSettings(int force, wchar_t *file)
return 0; return 0;
if (createIniDir) { if (createIniDir) {
CreateDirectory(L"inis", 0); PADsetSettingsDir("inis");
createIniDir = false; createIniDir = false;
} }
@ -981,9 +981,7 @@ int LoadSettings(int force, wchar_t *file)
for (int i = 0; i < sizeof(BoolOptionsInfo) / sizeof(BoolOptionsInfo[0]); i++) { for (int i = 0; i < sizeof(BoolOptionsInfo) / sizeof(BoolOptionsInfo[0]); i++) {
config.bools[i] = GetPrivateProfileBool(L"General Settings", BoolOptionsInfo[i].name, BoolOptionsInfo[i].defaultValue, file); config.bools[i] = GetPrivateProfileBool(L"General Settings", BoolOptionsInfo[i].name, BoolOptionsInfo[i].defaultValue, file);
} }
config.closeHacks = (u8)GetPrivateProfileIntW(L"General Settings", L"Close Hacks", 0, file); config.closeHack = (u8)GetPrivateProfileIntW(L"General Settings", L"Close Hack", 0, file);
if (config.closeHacks & 1)
config.closeHacks &= ~2;
config.keyboardApi = (DeviceAPI)GetPrivateProfileIntW(L"General Settings", L"Keyboard Mode", WM, file); config.keyboardApi = (DeviceAPI)GetPrivateProfileIntW(L"General Settings", L"Keyboard Mode", WM, file);
if (!config.keyboardApi) if (!config.keyboardApi)
@ -1046,7 +1044,7 @@ int LoadSettings(int force, wchar_t *file)
} }
last = 1; last = 1;
unsigned int uid; unsigned int uid;
int port, command, sensitivity, turbo, slot = 0, deadZone = 0, skipDeadZone = 0, padtype = 0; int port, command, sensitivity, rapidFire, slot = 0, deadZone = 0, skipDeadZone = 0, padtype = 0;
int w = 0; int w = 0;
char string[1000]; char string[1000];
while (temp2[w]) { while (temp2[w]) {
@ -1054,7 +1052,7 @@ int LoadSettings(int force, wchar_t *file)
w++; w++;
} }
string[w] = 0; string[w] = 0;
int len = sscanf(string, " %i , %i , %i , %i , %i , %i , %i , %i , %i", &uid, &port, &command, &sensitivity, &turbo, &slot, &deadZone, &skipDeadZone, &padtype); int len = sscanf(string, " %i , %i , %i , %i , %i , %i , %i , %i , %i", &uid, &port, &command, &sensitivity, &rapidFire, &slot, &deadZone, &skipDeadZone, &padtype);
if (len >= 5 && type) { if (len >= 5 && type) {
VirtualControl *c = dev->GetVirtualControl(uid); VirtualControl *c = dev->GetVirtualControl(uid);
if (!c) if (!c)
@ -1071,7 +1069,7 @@ int LoadSettings(int force, wchar_t *file)
padtype = skipDeadZone; padtype = skipDeadZone;
skipDeadZone = 0; skipDeadZone = 0;
} }
BindCommand(dev, uid, port, slot, padtype, command, sensitivity, turbo, deadZone, skipDeadZone); BindCommand(dev, uid, port, slot, padtype, command, sensitivity, rapidFire, deadZone, skipDeadZone);
} }
} }
} }
@ -1098,7 +1096,7 @@ int LoadSettings(int force, wchar_t *file)
string[w] = 0; string[w] = 0;
// wcstok not in ntdll. More effore than its worth to shave off // wcstok not in ntdll. More effore than its worth to shave off
// whitespace without it. // whitespace without it.
if (sscanf(string, " %20s %i , %i , %i , %i", effect, &port, &motor, &slot, &padtype) == 5) { if (sscanf(string, " %100s %i , %i , %i , %i", effect, &port, &motor, &slot, &padtype) == 5) {
char *s; char *s;
if (oldIni) { // Make sure bindings aren't applied to "Unplugged" padtype and FF settings are read from old location. if (oldIni) { // Make sure bindings aren't applied to "Unplugged" padtype and FF settings are read from old location.
if (config.padConfigs[port][slot].type != 0) { if (config.padConfigs[port][slot].type != 0) {
@ -1296,7 +1294,7 @@ void DeleteBinding(int port, int slot, int padtype, Device *dev, Binding *b)
dev->pads[port][slot][padtype].numBindings--; dev->pads[port][slot][padtype].numBindings--;
} }
void DeleteBinding(int port, int slot, Device *dev, ForceFeedbackBinding *b) void DeleteFFBinding(int port, int slot, Device *dev, ForceFeedbackBinding *b)
{ {
int padtype = config.padConfigs[port][slot].type; int padtype = config.padConfigs[port][slot].type;
if (dev->enabled && hWnds[port][slot][padtype]) { if (dev->enabled && hWnds[port][slot][padtype]) {
@ -1324,7 +1322,7 @@ int DeleteByIndex(int port, int slot, int index)
if (b) { if (b) {
DeleteBinding(port, slot, padtype, dev, b); DeleteBinding(port, slot, padtype, dev, b);
} else { } else {
DeleteBinding(port, slot, dev, ffb); DeleteFFBinding(port, slot, dev, ffb);
} }
return 1; return 1;
} }
@ -1383,7 +1381,7 @@ int CreateEffectBinding(Device *dev, wchar_t *effectID, unsigned int port, unsig
return ListBoundEffect(port, slot, dev, b); return ListBoundEffect(port, slot, dev, b);
} }
int BindCommand(Device *dev, unsigned int uid, unsigned int port, unsigned int slot, unsigned int padtype, int command, int sensitivity, int turbo, int deadZone, int skipDeadZone) int BindCommand(Device *dev, unsigned int uid, unsigned int port, unsigned int slot, unsigned int padtype, int command, int sensitivity, int rapidFire, int deadZone, int skipDeadZone)
{ {
// Checks needed because I use this directly when loading bindings. // Checks needed because I use this directly when loading bindings.
if (port > 1 || slot > 3 || padtype >= numPadTypes) if (port > 1 || slot > 3 || padtype >= numPadTypes)
@ -1425,7 +1423,7 @@ int BindCommand(Device *dev, unsigned int uid, unsigned int port, unsigned int s
p->numBindings++; p->numBindings++;
b->command = command; b->command = command;
b->controlIndex = controlIndex; b->controlIndex = controlIndex;
b->turbo = turbo; b->rapidFire = rapidFire;
b->sensitivity = sensitivity; b->sensitivity = sensitivity;
b->deadZone = deadZone; b->deadZone = deadZone;
b->skipDeadZone = skipDeadZone; b->skipDeadZone = skipDeadZone;
@ -1526,13 +1524,12 @@ INT_PTR CALLBACK DialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, LPARAM l
ListView_SetExtendedListViewStyleEx(hWndList, LVS_EX_DOUBLEBUFFER, LVS_EX_DOUBLEBUFFER); ListView_SetExtendedListViewStyleEx(hWndList, LVS_EX_DOUBLEBUFFER, LVS_EX_DOUBLEBUFFER);
LVCOLUMN c; LVCOLUMN c;
c.mask = LVCF_TEXT | LVCF_WIDTH; c.mask = LVCF_TEXT | LVCF_WIDTH;
c.cx = 100; c.cx = 90;
c.pszText = L"Device"; c.pszText = L"Device";
ListView_InsertColumn(hWndList, 0, &c); ListView_InsertColumn(hWndList, 0, &c);
c.cx = 70; c.cx = 70;
c.pszText = L"PC Control"; c.pszText = L"PC Control";
ListView_InsertColumn(hWndList, 1, &c); ListView_InsertColumn(hWndList, 1, &c);
c.cx = 84;
c.pszText = L"PS2 Control"; c.pszText = L"PS2 Control";
ListView_InsertColumn(hWndList, 2, &c); ListView_InsertColumn(hWndList, 2, &c);
selected = 0; selected = 0;
@ -1544,8 +1541,6 @@ INT_PTR CALLBACK DialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, LPARAM l
SetupLogSlider(GetDlgItem(hWnd, IDC_SLIDER_SENSITIVITY)); SetupLogSlider(GetDlgItem(hWnd, IDC_SLIDER_SENSITIVITY));
SetupLogSlider(GetDlgItem(hWnd, IDC_SLIDER_DEADZONE)); SetupLogSlider(GetDlgItem(hWnd, IDC_SLIDER_DEADZONE));
SetupLogSlider(GetDlgItem(hWnd, IDC_SLIDER_SKIP_DEADZONE)); SetupLogSlider(GetDlgItem(hWnd, IDC_SLIDER_SKIP_DEADZONE));
if (port || slot)
EnableWindow(GetDlgItem(hWnd, ID_IGNORE), 0);
CheckDlgButton(hWnd, IDC_CONFIGURE_ON_BIND, BST_CHECKED * config.configureOnBind); CheckDlgButton(hWnd, IDC_CONFIGURE_ON_BIND, BST_CHECKED * config.configureOnBind);
AddTooltip(IDC_BINDINGS_LIST, hWnd); AddTooltip(IDC_BINDINGS_LIST, hWnd);
@ -1553,11 +1548,11 @@ INT_PTR CALLBACK DialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, LPARAM l
AddTooltip(IDC_CONFIGURE_ON_BIND, 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_LOCK_ALL_INPUT, hWnd); AddTooltip(ID_LOCK_ALL_INPUT, hWnd);
AddTooltip(ID_LOCK_DIRECTION, hWnd); AddTooltip(ID_LOCK_DIRECTION, hWnd);
AddTooltip(ID_LOCK_BUTTONS, hWnd); AddTooltip(ID_LOCK_BUTTONS, hWnd);
AddTooltip(IDC_TURBO, hWnd); AddTooltip(ID_TURBO_KEY, hWnd);
AddTooltip(IDC_RAPID_FIRE, hWnd);
AddTooltip(IDC_FLIP, hWnd); AddTooltip(IDC_FLIP, hWnd);
AddTooltip(IDC_SLIDER_DEADZONE, hWnd); AddTooltip(IDC_SLIDER_DEADZONE, hWnd);
AddTooltip(IDC_SLIDER_SKIP_DEADZONE, hWnd); AddTooltip(IDC_SLIDER_SKIP_DEADZONE, hWnd);
@ -1583,6 +1578,7 @@ INT_PTR CALLBACK DialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, LPARAM l
EnableWindow(hWndDS, added != 0); EnableWindow(hWndDS, added != 0);
Populate(port, slot, padtype); Populate(port, slot, padtype);
ListView_SetColumnWidth(hWndList, 2, LVSCW_AUTOSIZE_USEHEADER);
} break; } break;
case WM_DEVICECHANGE: case WM_DEVICECHANGE:
if (wParam == DBT_DEVNODES_CHANGED) { if (wParam == DBT_DEVNODES_CHANGED) {
@ -1613,16 +1609,27 @@ INT_PTR CALLBACK DialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, LPARAM l
InitInfo info = {selected == 0x7F, 1, hWndProp, &hWndButtonProc}; InitInfo info = {selected == 0x7F, 1, hWndProp, &hWndButtonProc};
Device *dev = dm->GetActiveDevice(&info, &uid, &index, &value); Device *dev = dm->GetActiveDevice(&info, &uid, &index, &value);
int selectedDevice = config.deviceSelect[port][slot]; int selectedDevice = config.deviceSelect[port][slot];
if (dev && (selectedDevice == -1 || dm->devices[selectedDevice] == dev)) {
if (dev == nullptr || (selectedDevice != -1 && dm->devices[selectedDevice] != dev))
return 0;
//Check the bindings for an excluded input, and ignore it if found.
PadBindings *p_c = dev->pads[port][slot] + padtype;
for (int i = 0; i < p_c->numBindings; i++) {
Binding *b2 = p_c->bindings + i;
int uid2 = dev->virtualControls[b2->controlIndex].uid;
if (b2->command == 0x29 && uid == uid2) {
return 0;
}
}
int command = selected; int command = selected;
// Good idea to do this first, as BindCommand modifies the ListView, which will // Good idea to do this first, as BindCommand modifies the ListView, which will
// call it anyways, which is a bit funky. // call it anyways, which is a bit funky.
EndBinding(hWnd); EndBinding(hWnd);
UnselectAll(hWndList); UnselectAll(hWndList);
int index = -1; int index = -1;
if (command == 0x7F && dev->api == IGNORE_KEYBOARD) { if (command < 0x30) {
index = BindCommand(dev, uid, 0, 0, 0, command, BASE_SENSITIVITY, 0, 0, 0);
} else if (command < 0x30) {
index = BindCommand(dev, uid, port, slot, padtype, command, BASE_SENSITIVITY, 0, 0, 0); index = BindCommand(dev, uid, port, slot, padtype, command, BASE_SENSITIVITY, 0, 0, 0);
} }
if (index >= 0) { if (index >= 0) {
@ -1630,7 +1637,7 @@ INT_PTR CALLBACK DialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, LPARAM l
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; config.bind = true;
} ListView_SetColumnWidth(hWndList, 2, LVSCW_AUTOSIZE_USEHEADER);
} }
} }
break; break;
@ -1666,8 +1673,10 @@ INT_PTR CALLBACK DialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, LPARAM l
if (key->wVKey == VK_DELETE || if (key->wVKey == VK_DELETE ||
key->wVKey == VK_BACK) { key->wVKey == VK_BACK) {
if (DeleteSelected(port, slot)) if (DeleteSelected(port, slot)) {
PropSheet_Changed(hWndProp, hWnds[0]); PropSheet_Changed(hWndProp, hWnds[0]);
ListView_SetColumnWidth(hWndList, 2, LVSCW_AUTOSIZE_USEHEADER);
}
} }
} }
// Update sensitivity and motor/binding display on redraw // Update sensitivity and motor/binding display on redraw
@ -1739,7 +1748,7 @@ INT_PTR CALLBACK DialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, LPARAM l
uid = (uid & 0x00FFFFFF) | axisUIDs[cbsel]; uid = (uid & 0x00FFFFFF) | axisUIDs[cbsel];
Binding backup = *b; Binding backup = *b;
DeleteSelected(port, slot); DeleteSelected(port, slot);
int index = BindCommand(dev, uid, port, slot, padtype, backup.command, backup.sensitivity, backup.turbo, backup.deadZone, backup.skipDeadZone); int index = BindCommand(dev, uid, port, slot, padtype, backup.command, backup.sensitivity, backup.rapidFire, backup.deadZone, backup.skipDeadZone);
ListView_SetItemState(hWndList, index, LVIS_SELECTED, LVIS_SELECTED); ListView_SetItemState(hWndList, index, LVIS_SELECTED, LVIS_SELECTED);
PropSheet_Changed(hWndProp, hWnd); PropSheet_Changed(hWndProp, hWnd);
} }
@ -1749,6 +1758,7 @@ INT_PTR CALLBACK DialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, LPARAM l
int selectedDev = SendMessage(GetDlgItem(hWnd, IDC_DEVICE_SELECT), CB_GETCURSEL, 0, 0); int selectedDev = SendMessage(GetDlgItem(hWnd, IDC_DEVICE_SELECT), CB_GETCURSEL, 0, 0);
config.deviceSelect[port][slot] = SendMessage(GetDlgItem(hWnd, IDC_DEVICE_SELECT), CB_GETITEMDATA, selectedDev, 0); config.deviceSelect[port][slot] = SendMessage(GetDlgItem(hWnd, IDC_DEVICE_SELECT), CB_GETITEMDATA, selectedDev, 0);
RefreshEnabledDevicesAndDisplay(1, hWndGeneral, 1); RefreshEnabledDevicesAndDisplay(1, hWndGeneral, 1);
ListView_SetColumnWidth(hWndList, 2, LVSCW_AUTOSIZE_USEHEADER);
} else if (HIWORD(wParam) == CBN_SELCHANGE && LOWORD(wParam) == IDC_FF_EFFECT) { } else if (HIWORD(wParam) == CBN_SELCHANGE && LOWORD(wParam) == IDC_FF_EFFECT) {
int typeIndex = SendMessage((HWND)lParam, CB_GETCURSEL, 0, 0); int typeIndex = SendMessage((HWND)lParam, CB_GETCURSEL, 0, 0);
if (typeIndex >= 0) if (typeIndex >= 0)
@ -1850,24 +1860,13 @@ INT_PTR CALLBACK DialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, LPARAM l
SetTimer(hWnd, 1, 3000, 0); SetTimer(hWnd, 1, 3000, 0);
} }
} }
} else if ((cmd >= ID_LOCK_BUTTONS && cmd <= ID_ANALOG) || cmd == ID_IGNORE) { // || cmd == ID_FORCE_FEEDBACK) { } else if (cmd >= ID_LOCK_BUTTONS && cmd <= ID_TURBO_KEY) { // || cmd == ID_FORCE_FEEDBACK) {
// Messes up things, unfortunately. // Messes up things, unfortunately.
// End binding on a bunch of notification messages, and // End binding on a bunch of notification messages, and
// this will send a bunch. // this will send a bunch.
// UnselectAll(hWndList); // UnselectAll(hWndList);
EndBinding(hWnd); EndBinding(hWnd);
if (cmd != ID_IGNORE) {
selected = cmd - (ID_SELECT - 0x10); selected = cmd - (ID_SELECT - 0x10);
} else {
selected = 0x7F;
for (int i = 0; i < dm->numDevices; i++) {
if (dm->devices[i]->api != IGNORE_KEYBOARD) {
dm->DisableDevice(i);
} else {
dm->EnableDevice(i);
}
}
}
hWndButtonProc.SetWndHandle(GetDlgItem(hWnd, cmd)); hWndButtonProc.SetWndHandle(GetDlgItem(hWnd, cmd));
hWndButtonProc.Eat(DoNothingWndProc, 0); hWndButtonProc.Eat(DoNothingWndProc, 0);
@ -1883,11 +1882,11 @@ INT_PTR CALLBACK DialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, LPARAM l
} else if (cmd == IDC_CONFIGURE_ON_BIND) { } else if (cmd == IDC_CONFIGURE_ON_BIND) {
config.configureOnBind = IsDlgButtonChecked(hWnd, IDC_CONFIGURE_ON_BIND); config.configureOnBind = IsDlgButtonChecked(hWnd, IDC_CONFIGURE_ON_BIND);
} }
if (cmd == IDC_TURBO) { if (cmd == IDC_RAPID_FIRE) {
// Don't allow setting it back to indeterminate. // Don't allow setting it back to indeterminate.
SendMessage(GetDlgItem(hWnd, IDC_TURBO), BM_SETSTYLE, BS_AUTOCHECKBOX, 0); SendMessage(GetDlgItem(hWnd, IDC_RAPID_FIRE), BM_SETSTYLE, BS_AUTOCHECKBOX, 0);
int turbo = (IsDlgButtonChecked(hWnd, IDC_TURBO) == BST_CHECKED); int rapidFire = (IsDlgButtonChecked(hWnd, IDC_RAPID_FIRE) == BST_CHECKED);
ChangeValue(port, slot, 0, &turbo, 0, 0); ChangeValue(port, slot, 0, &rapidFire, 0, 0);
} else if (cmd == IDC_FLIP) { } else if (cmd == IDC_FLIP) {
int val = GetLogSliderVal(hWnd, IDC_SLIDER_SENSITIVITY); int val = GetLogSliderVal(hWnd, IDC_SLIDER_SENSITIVITY);
ChangeValue(port, slot, &val, 0, 0, 0); ChangeValue(port, slot, &val, 0, 0, 0);
@ -1994,7 +1993,6 @@ void UpdatePadPages()
HPROPSHEETPAGE pages[10]; HPROPSHEETPAGE pages[10];
int count = 0; int count = 0;
memset(hWnds, 0, sizeof(hWnds)); memset(hWnds, 0, sizeof(hWnds));
int slot = 0;
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++) {
if (config.padConfigs[port][slot].type == DisabledPad) if (config.padConfigs[port][slot].type == DisabledPad)
@ -2017,6 +2015,8 @@ void UpdatePadPages()
psp.pszTemplate = MAKEINTRESOURCE(IDD_CONFIG_POPN); psp.pszTemplate = MAKEINTRESOURCE(IDD_CONFIG_POPN);
else if (config.padConfigs[port][slot].type == MousePad) else if (config.padConfigs[port][slot].type == MousePad)
psp.pszTemplate = MAKEINTRESOURCE(IDD_CONFIG_PS1_MOUSE); psp.pszTemplate = MAKEINTRESOURCE(IDD_CONFIG_PS1_MOUSE);
else if (config.padConfigs[port][slot].type == neGconPad)
psp.pszTemplate = MAKEINTRESOURCE(IDD_CONFIG_NEGCON);
else else
psp.pszTemplate = MAKEINTRESOURCE(IDD_CONFIG); psp.pszTemplate = MAKEINTRESOURCE(IDD_CONFIG);
@ -2119,7 +2119,7 @@ void UpdatePadList(HWND hWnd)
CheckDlgButton(hWnd, IDC_ANALOG_START1, BST_CHECKED * config.padConfigs[port][slot].autoAnalog); CheckDlgButton(hWnd, IDC_ANALOG_START1, BST_CHECKED * config.padConfigs[port][slot].autoAnalog);
} }
EnableWindow(hWndCombo, enable); EnableWindow(hWndCombo, enable);
EnableWindow(hWndAnalog, enable); EnableWindow(hWndAnalog, config.padConfigs[port][slot].type == Dualshock2Pad ? enable : 0);
//ListView_SetExtendedListViewStyleEx(hWndList, LVS_EX_DOUBLEBUFFER|LVS_EX_ONECLICKACTIVATE, LVS_EX_DOUBLEBUFFER|LVS_EX_ONECLICKACTIVATE); //ListView_SetExtendedListViewStyleEx(hWndList, LVS_EX_DOUBLEBUFFER|LVS_EX_ONECLICKACTIVATE, LVS_EX_DOUBLEBUFFER|LVS_EX_ONECLICKACTIVATE);
recurse = 0; recurse = 0;
} }
@ -2140,20 +2140,15 @@ INT_PTR CALLBACK GeneralDialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, L
c.cx = 120; c.cx = 120;
c.pszText = L"Type"; c.pszText = L"Type";
ListView_InsertColumn(hWndList, 1, &c); ListView_InsertColumn(hWndList, 1, &c);
if (config.multitap[0] || config.multitap[1]) {
c.cx = 84;
} else {
c.cx = 101;
}
c.pszText = L"Bindings"; c.pszText = L"Bindings";
ListView_InsertColumn(hWndList, 2, &c); ListView_InsertColumn(hWndList, 2, &c);
ListView_SetColumnWidth(hWndList, 2, LVSCW_AUTOSIZE_USEHEADER);
selected = 0; selected = 0;
ListView_SetExtendedListViewStyleEx(hWndList, LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER, LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER); ListView_SetExtendedListViewStyleEx(hWndList, LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER, LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER);
SendMessage(hWndList, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT); SendMessage(hWndList, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT);
for (int i = 0; i < numPadTypes; i++) for (int i = 0; i < numPadTypes; i++)
SendMessage(hWndCombo, CB_ADDSTRING, 0, (LPARAM)padTypes[i]); SendMessage(hWndCombo, CB_ADDSTRING, 0, (LPARAM)padTypes[i]);
if (ps2e) { if (ps2e) {
// This disabled some widgets which are not required for PCSX2. // This disabled some widgets which are not required for PCSX2.
// Currently the trigger is that it's in PS2 emulation mode // Currently the trigger is that it's in PS2 emulation mode
@ -2178,8 +2173,7 @@ INT_PTR CALLBACK GeneralDialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, L
for (int j = 0; j < sizeof(BoolOptionsInfo) / sizeof(BoolOptionsInfo[0]); j++) { for (int j = 0; j < sizeof(BoolOptionsInfo) / sizeof(BoolOptionsInfo[0]); j++) {
CheckDlgButton(hWnd, BoolOptionsInfo[j].ControlId, BST_CHECKED * config.bools[j]); CheckDlgButton(hWnd, BoolOptionsInfo[j].ControlId, BST_CHECKED * config.bools[j]);
} }
CheckDlgButton(hWnd, IDC_CLOSE_HACK1, BST_CHECKED * (config.closeHacks & 1)); CheckDlgButton(hWnd, IDC_CLOSE_HACK, BST_CHECKED * config.closeHack);
CheckDlgButton(hWnd, IDC_CLOSE_HACK2, BST_CHECKED * ((config.closeHacks & 2) >> 1));
AddTooltip(IDC_M_WM, hWnd); AddTooltip(IDC_M_WM, hWnd);
AddTooltip(IDC_M_RAW, hWnd); AddTooltip(IDC_M_RAW, hWnd);
@ -2189,6 +2183,7 @@ INT_PTR CALLBACK GeneralDialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, L
AddTooltip(IDC_PAD_LIST, hWnd); AddTooltip(IDC_PAD_LIST, hWnd);
AddTooltip(IDC_PAD_TYPE, hWnd); AddTooltip(IDC_PAD_TYPE, hWnd);
AddTooltip(IDC_DIAG_LIST, hWnd); AddTooltip(IDC_DIAG_LIST, hWnd);
AddTooltip(IDC_G_XI, hWnd);
AddTooltip(IDC_ANALOG_START1, hWnd); AddTooltip(IDC_ANALOG_START1, hWnd);
if (config.keyboardApi < 0 || config.keyboardApi > 3) if (config.keyboardApi < 0 || config.keyboardApi > 3)
@ -2263,21 +2258,13 @@ INT_PTR CALLBACK GeneralDialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, L
config.padConfigs[port][slot].autoAnalog = (IsDlgButtonChecked(hWnd, IDC_ANALOG_START1) == BST_CHECKED); config.padConfigs[port][slot].autoAnalog = (IsDlgButtonChecked(hWnd, IDC_ANALOG_START1) == BST_CHECKED);
PropSheet_Changed(hWndProp, hWnd); PropSheet_Changed(hWndProp, hWnd);
} else { } else {
int t = IDC_CLOSE_HACK1;
int test = LOWORD(wParam);
if (test == IDC_CLOSE_HACK1) {
CheckDlgButton(hWnd, IDC_CLOSE_HACK2, BST_UNCHECKED);
} else if (test == IDC_CLOSE_HACK2) {
CheckDlgButton(hWnd, IDC_CLOSE_HACK1, BST_UNCHECKED);
}
int mtap = config.multitap[0] + 2 * config.multitap[1]; int mtap = config.multitap[0] + 2 * config.multitap[1];
for (int j = 0; j < sizeof(BoolOptionsInfo) / sizeof(BoolOptionsInfo[0]); j++) { for (int j = 0; j < sizeof(BoolOptionsInfo) / sizeof(BoolOptionsInfo[0]); j++) {
config.bools[j] = (IsDlgButtonChecked(hWnd, BoolOptionsInfo[j].ControlId) == BST_CHECKED); config.bools[j] = (IsDlgButtonChecked(hWnd, BoolOptionsInfo[j].ControlId) == BST_CHECKED);
} }
config.closeHacks = (IsDlgButtonChecked(hWnd, IDC_CLOSE_HACK1) == BST_CHECKED) | config.closeHack = IsDlgButtonChecked(hWnd, IDC_CLOSE_HACK) == BST_CHECKED;
((IsDlgButtonChecked(hWnd, IDC_CLOSE_HACK2) == BST_CHECKED) << 1);
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
if (i && IsDlgButtonChecked(hWnd, IDC_KB_DISABLE + i) == BST_CHECKED) { if (i && IsDlgButtonChecked(hWnd, IDC_KB_DISABLE + i) == BST_CHECKED) {
@ -2290,16 +2277,15 @@ INT_PTR CALLBACK GeneralDialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, L
if (mtap != config.multitap[0] + 2 * config.multitap[1]) { if (mtap != config.multitap[0] + 2 * config.multitap[1]) {
UpdatePadPages(); UpdatePadPages();
if (config.multitap[0] || config.multitap[1]) {
ListView_SetColumnWidth(hWndList, 2, 84);
} else {
ListView_SetColumnWidth(hWndList, 2, 101);
}
} }
RefreshEnabledDevicesAndDisplay(0, hWnd, 1); RefreshEnabledDevicesAndDisplay(0, hWnd, 1);
UpdatePadList(hWnd); UpdatePadList(hWnd);
PropSheet_Changed(hWndProp, hWnd); PropSheet_Changed(hWndProp, hWnd);
if (mtap != config.multitap[0] + 2 * config.multitap[1]) {
ListView_SetColumnWidth(hWndList, 2, LVSCW_AUTOSIZE_USEHEADER);
}
} }
break; break;
case WM_NOTIFY: { case WM_NOTIFY: {

View File

@ -1,5 +1,5 @@
/* LilyPad - Pad plugin for PS2 Emulator /* LilyPad - Pad plugin for PS2 Emulator
* Copyright (C) 2002-2014 PCSX2 Dev Team/ChickenLiver * Copyright (C) 2002-2017 PCSX2 Dev Team/ChickenLiver
* *
* PCSX2 is free software: you can redistribute it and/or modify it under the * PCSX2 is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free * terms of the GNU Lesser General Public License as published by the Free
@ -35,13 +35,12 @@ public:
int deviceSelect[2][4]; int deviceSelect[2][4];
u8 closeHacks; u8 closeHack;
DeviceAPI keyboardApi; DeviceAPI keyboardApi;
DeviceAPI mouseApi; DeviceAPI mouseApi;
// Derived value, calculated by GetInput(). // Derived value, calculated by GetInput().
u8 ignoreKeys;
u8 configureOnBind; u8 configureOnBind;
bool bind; bool bind;
@ -69,7 +68,6 @@ public:
u8 saveStateTitle; u8 saveStateTitle;
u8 GH2; u8 GH2;
u8 turboKeyHack;
}; };
u8 bools[15]; u8 bools[15];
}; };

View File

@ -15,8 +15,7 @@ Disable Screen Saver=0
Logging=0 Logging=0
Save State in Title=0 Save State in Title=0
GH2=0 GH2=0
Turbo Key Hack=0 Close Hack=0
Close Hacks=0
Keyboard Mode=2 Keyboard Mode=2
Mouse Mode=0 Mouse Mode=0
[Pad Settings] [Pad Settings]
@ -103,6 +102,19 @@ Binding 49=0x01020013, 0, 33, 3000, 0, 0, 13172, 4
Binding 50=0x02020013, 0, 35, 3000, 0, 0, 13172, 4 Binding 50=0x02020013, 0, 35, 3000, 0, 0, 13172, 4
Binding 51=0x01020014, 0, 32, 3000, 0, 0, 13172, 4 Binding 51=0x01020014, 0, 32, 3000, 0, 0, 13172, 4
Binding 52=0x02020014, 0, 34, 3000, 0, 0, 13172, 4 Binding 52=0x02020014, 0, 34, 3000, 0, 0, 13172, 4
Binding 53=0x00200000, 0, 20, 65536, 0, 0, 1, 5
Binding 54=0x00200001, 0, 22, 65536, 0, 0, 1, 5
Binding 55=0x00200002, 0, 23, 65536, 0, 0, 1, 5
Binding 56=0x00200003, 0, 21, 65536, 0, 0, 1, 5
Binding 57=0x00200004, 0, 19, 65536, 0, 0, 1, 5
Binding 58=0x00200008, 0, 26, 65536, 0, 0, 1, 5
Binding 59=0x00200009, 0, 27, 65536, 0, 0, 1, 5
Binding 60=0x0020000C, 0, 30, 65536, 0, 0, 1, 5
Binding 61=0x0020000D, 0, 29, 65536, 0, 0, 1, 5
Binding 62=0x0020000E, 0, 31, 65536, 0, 0, 1, 5
Binding 63=0x0020000F, 0, 28, 65536, 0, 0, 1, 5
Binding 64=0x01020013, 0, 33, 87183, 0, 0, 13172, 5
Binding 65=0x02020013, 0, 35, 87183, 0, 0, 13172, 5
FF Binding 0=Constant 0, 0, 0, 1, 0, 65536, 1, 0 FF Binding 0=Constant 0, 0, 0, 1, 0, 65536, 1, 0
FF Binding 1=Constant 0, 1, 0, 1, 0, 0, 1, 65536 FF Binding 1=Constant 0, 1, 0, 1, 0, 0, 1, 65536
[Device 1] [Device 1]
@ -163,6 +175,19 @@ Binding 49=0x01020013, 1, 33, 3000, 0, 0, 13172, 4
Binding 50=0x02020013, 1, 35, 3000, 0, 0, 13172, 4 Binding 50=0x02020013, 1, 35, 3000, 0, 0, 13172, 4
Binding 51=0x01020014, 1, 32, 3000, 0, 0, 13172, 4 Binding 51=0x01020014, 1, 32, 3000, 0, 0, 13172, 4
Binding 52=0x02020014, 1, 34, 3000, 0, 0, 13172, 4 Binding 52=0x02020014, 1, 34, 3000, 0, 0, 13172, 4
Binding 53=0x00200000, 1, 20, 65536, 0, 0, 1, 5
Binding 54=0x00200001, 1, 22, 65536, 0, 0, 1, 5
Binding 55=0x00200002, 1, 23, 65536, 0, 0, 1, 5
Binding 56=0x00200003, 1, 21, 65536, 0, 0, 1, 5
Binding 57=0x00200004, 1, 19, 65536, 0, 0, 1, 5
Binding 58=0x00200008, 1, 26, 65536, 0, 0, 1, 5
Binding 59=0x00200009, 1, 27, 65536, 0, 0, 1, 5
Binding 60=0x0020000C, 1, 30, 65536, 0, 0, 1, 5
Binding 61=0x0020000D, 1, 29, 65536, 0, 0, 1, 5
Binding 62=0x0020000E, 1, 31, 65536, 0, 0, 1, 5
Binding 63=0x0020000F, 1, 28, 65536, 0, 0, 1, 5
Binding 64=0x01020013, 1, 33, 87183, 0, 0, 13172, 5
Binding 65=0x02020013, 1, 35, 87183, 0, 0, 13172, 5
FF Binding 0=Constant 1, 0, 0, 1, 0, 65536, 1, 0 FF Binding 0=Constant 1, 0, 0, 1, 0, 65536, 1, 0
FF Binding 1=Constant 1, 1, 0, 1, 0, 0, 1, 65536 FF Binding 1=Constant 1, 1, 0, 1, 0, 0, 1, 65536
[Device 12] [Device 12]

View File

@ -1,5 +1,5 @@
/* LilyPad - Pad plugin for PS2 Emulator /* LilyPad - Pad plugin for PS2 Emulator
* Copyright (C) 2002-2014 PCSX2 Dev Team/ChickenLiver * Copyright (C) 2002-2017 PCSX2 Dev Team/ChickenLiver
* *
* PCSX2 is free software: you can redistribute it and/or modify it under the * PCSX2 is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free * terms of the GNU Lesser General Public License as published by the Free
@ -38,6 +38,7 @@ enum PadType {
GuitarPad, GuitarPad,
PopnPad, PopnPad,
MousePad, MousePad,
neGconPad,
numPadTypes // total number of PadTypes. Add new PadType above this line. numPadTypes // total number of PadTypes. Add new PadType above this line.
}; };
@ -81,7 +82,7 @@ struct Binding
int sensitivity; int sensitivity;
int deadZone; int deadZone;
int skipDeadZone; int skipDeadZone;
unsigned char turbo; unsigned char rapidFire;
}; };
#define UID_AXIS (1U << 31) #define UID_AXIS (1U << 31)

View File

@ -1,5 +1,5 @@
/* LilyPad - Pad plugin for PS2 Emulator /* LilyPad - Pad plugin for PS2 Emulator
* Copyright (C) 2002-2014 PCSX2 Dev Team/ChickenLiver * Copyright (C) 2002-2017 PCSX2 Dev Team/ChickenLiver
* *
* PCSX2 is free software: you can redistribute it and/or modify it under the * PCSX2 is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free * terms of the GNU Lesser General Public License as published by the Free
@ -87,6 +87,7 @@ unsigned char inBuf[50];
// windowThreadId = GetWindowThreadProcessId(hWnd, 0); // windowThreadId = GetWindowThreadProcessId(hWnd, 0);
#define MODE_PS1_MOUSE 0x12 #define MODE_PS1_MOUSE 0x12
#define MODE_NEGCON 0x23
#define MODE_DIGITAL 0x41 #define MODE_DIGITAL 0x41
#define MODE_ANALOG 0x73 #define MODE_ANALOG 0x73
#define MODE_DS2_NATIVE 0x79 #define MODE_DS2_NATIVE 0x79
@ -391,9 +392,7 @@ void ProcessButtonBinding(Binding *b, ButtonSum *sum, int value)
value = std::min((int)(((__int64)value * (FULLY_DOWN - (__int64)b->skipDeadZone)) / FULLY_DOWN) + b->skipDeadZone, FULLY_DOWN); value = std::min((int)(((__int64)value * (FULLY_DOWN - (__int64)b->skipDeadZone)) / FULLY_DOWN) + b->skipDeadZone, FULLY_DOWN);
} }
if (config.turboKeyHack == 1) { // send a tabulator keypress to emulator if (b->command == 0x2A) { // Turbo key
//printf("%x\n", b->command);
if (b->command == 0x11) { // L3 button
static unsigned int LastCheck = 0; static unsigned int LastCheck = 0;
unsigned int t = timeGetTime(); unsigned int t = timeGetTime();
if (t - LastCheck < 300) if (t - LastCheck < 300)
@ -401,7 +400,6 @@ void ProcessButtonBinding(Binding *b, ButtonSum *sum, int value)
QueueKeyEvent(VK_TAB, KEYPRESS); QueueKeyEvent(VK_TAB, KEYPRESS);
LastCheck = t; LastCheck = t;
} }
}
int sensitivity = b->sensitivity; int sensitivity = b->sensitivity;
if (sensitivity < 0) { if (sensitivity < 0) {
@ -529,8 +527,8 @@ void Update(unsigned int port, unsigned int slot)
0, 0, hWndTop, &hWndGSProc}; 0, 0, hWndTop, &hWndGSProc};
#endif #endif
dm->Update(&info); dm->Update(&info);
static int turbo = 0; static int rapidFire = 0;
turbo++; rapidFire++;
for (i = 0; i < dm->numDevices; i++) { for (i = 0; i < dm->numDevices; i++) {
Device *dev = dm->devices[i]; Device *dev = dm->devices[i];
// Skip both disabled devices and inactive enabled devices. // Skip both disabled devices and inactive enabled devices.
@ -546,7 +544,7 @@ void Update(unsigned int port, unsigned int slot)
Binding *b = dev->pads[port][slot][padtype].bindings + j; Binding *b = dev->pads[port][slot][padtype].bindings + j;
int cmd = b->command; int cmd = b->command;
int state = dev->virtualControlState[b->controlIndex]; int state = dev->virtualControlState[b->controlIndex];
if (!(turbo & b->turbo)) { if (!(rapidFire & b->rapidFire)) {
if (cmd > 0x0F && cmd != 0x28) { if (cmd > 0x0F && cmd != 0x28) {
ProcessButtonBinding(b, &s[port][slot], state); ProcessButtonBinding(b, &s[port][slot], state);
} else if ((state >> 15) && !(dev->oldVirtualControlState[b->controlIndex] >> 15)) { } else if ((state >> 15) && !(dev->oldVirtualControlState[b->controlIndex] >> 15)) {
@ -631,7 +629,7 @@ void Update(unsigned int port, unsigned int slot)
} }
} }
if (pads[port][slot].mode == 0x41) { if (pads[port][slot].mode == MODE_DIGITAL) {
for (int i = 0; i <= 1; i++) { for (int i = 0; i <= 1; i++) {
if (s[port][slot].sticks[i].horiz >= 100) if (s[port][slot].sticks[i].horiz >= 100)
s[port][slot].buttons[13] += s[port][slot].sticks[i].horiz; s[port][slot].buttons[13] += s[port][slot].sticks[i].horiz;
@ -792,6 +790,8 @@ void ResetPad(int port, int slot)
memset(&pads[port][slot], 0, sizeof(pads[0][0])); memset(&pads[port][slot], 0, sizeof(pads[0][0]));
if (config.padConfigs[port][slot].type == MousePad) if (config.padConfigs[port][slot].type == MousePad)
pads[port][slot].mode = MODE_PS1_MOUSE; pads[port][slot].mode = MODE_PS1_MOUSE;
else if (config.padConfigs[port][slot].type == neGconPad)
pads[port][slot].mode = MODE_NEGCON;
else else
pads[port][slot].mode = MODE_DIGITAL; pads[port][slot].mode = MODE_DIGITAL;
pads[port][slot].umask[0] = pads[port][slot].umask[1] = 0xFF; pads[port][slot].umask[0] = pads[port][slot].umask[1] = 0xFF;
@ -967,10 +967,7 @@ ExtraWndProcResult StatusWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPa
PrepareActivityState(LOWORD(wParam) != WA_INACTIVE); PrepareActivityState(LOWORD(wParam) != WA_INACTIVE);
break; break;
case WM_CLOSE: case WM_CLOSE:
if (config.closeHacks & 1) { if (config.closeHack) {
QueueKeyEvent(VK_ESCAPE, KEYPRESS);
return NO_WND_PROC;
} else if (config.closeHacks & 2) {
ExitProcess(0); ExitProcess(0);
return NO_WND_PROC; return NO_WND_PROC;
} }
@ -1209,6 +1206,14 @@ u8 CALLBACK PADpoll(u8 value)
if (query.lastByte == 0) { if (query.lastByte == 0) {
query.lastByte++; query.lastByte++;
query.currentCommand = value; query.currentCommand = value;
// Only the 0x42(read input and vibration) and 0x43(enter or exit config mode) command cases work outside of config mode, the other cases will be avoided.
if (!pad->config && value != 0x42 && value != 0x43) {
query.numBytes = 0;
query.queryDone = 1;
DEBUG_OUT(0xF3);
return 0xF3;
}
switch (value) { switch (value) {
// CONFIG_MODE // CONFIG_MODE
case 0x43: case 0x43:
@ -1228,7 +1233,8 @@ u8 CALLBACK PADpoll(u8 value)
Update(query.port, query.slot); Update(query.port, query.slot);
ButtonSum *sum = &pad->sum; ButtonSum *sum = &pad->sum;
if (config.padConfigs[query.port][query.slot].type == MousePad) { int padtype = config.padConfigs[query.port][query.slot].type;
if (padtype == MousePad) {
u8 b1 = 0xFC; u8 b1 = 0xFC;
if (sum->buttons[9] > 0) // Left button if (sum->buttons[9] > 0) // Left button
b1 -= 8; b1 -= 8;
@ -1241,8 +1247,31 @@ u8 CALLBACK PADpoll(u8 value)
query.response[6] = sum->sticks[1].vert / 2; query.response[6] = sum->sticks[1].vert / 2;
query.numBytes = 7; query.numBytes = 7;
query.lastByte = 1; query.lastByte = 1;
DEBUG_OUT(pad->mode); DEBUG_OUT(MODE_PS1_MOUSE);
return pad->mode; return MODE_PS1_MOUSE;
}
if (padtype == neGconPad) {
u8 b1 = 0xFF, b2 = 0xFF;
b1 -= (sum->buttons[3] > 0) << 3; // Start
for (int i = 3; i < 6; i++) {
b2 -= (sum->buttons[i + 4] > 0) << i; // R, A, B
}
for (int i = 4; i < 8; i++) {
b1 -= (sum->buttons[i + 8] > 0) << i; // D-pad Up, Right, Down, Left
}
query.response[3] = b1;
query.response[4] = b2;
query.response[5] = Cap((sum->sticks[1].horiz + 255) / 2); // Swivel
query.response[6] = (unsigned char)sum->buttons[10]; // I
query.response[7] = (unsigned char)sum->buttons[11]; // II
query.response[8] = (unsigned char)sum->buttons[6]; // L
query.numBytes = 9;
query.lastByte = 1;
DEBUG_OUT(MODE_NEGCON);
return MODE_NEGCON;
} }
u8 b1 = 0xFF, b2 = 0xFF; u8 b1 = 0xFF, b2 = 0xFF;
@ -1253,7 +1282,7 @@ u8 CALLBACK PADpoll(u8 value)
b2 -= (sum->buttons[i + 4] > 0) << i; b2 -= (sum->buttons[i + 4] > 0) << i;
} }
if (config.padConfigs[query.port][query.slot].type == GuitarPad && !config.GH2) { if (padtype == GuitarPad && !config.GH2) {
sum->buttons[15] = 255; sum->buttons[15] = 255;
// Not sure about this. Forces wammy to be from 0 to 0x7F. // Not sure about this. Forces wammy to be from 0 to 0x7F.
// if (sum->sticks[2].vert > 0) sum->sticks[2].vert = 0; // if (sum->sticks[2].vert > 0) sum->sticks[2].vert = 0;
@ -1264,7 +1293,7 @@ u8 CALLBACK PADpoll(u8 value)
} }
//Left, Right and Down are always pressed on Pop'n Music controller. //Left, Right and Down are always pressed on Pop'n Music controller.
if (config.padConfigs[query.port][query.slot].type == PopnPad) if (padtype == PopnPad)
b1 = b1 & 0x1f; b1 = b1 & 0x1f;
query.response[3] = b1; query.response[3] = b1;
@ -1272,10 +1301,10 @@ u8 CALLBACK PADpoll(u8 value)
query.numBytes = 5; query.numBytes = 5;
if (pad->mode != MODE_DIGITAL) { if (pad->mode != MODE_DIGITAL) {
query.response[5] = Cap((sum->sticks[0].horiz + 255) / 2); query.response[5] = Cap((sum->sticks[0].horiz + 255) / 2); // Right stick: left & right
query.response[6] = Cap((sum->sticks[0].vert + 255) / 2); query.response[6] = Cap((sum->sticks[0].vert + 255) / 2); // Right stick: up & down
query.response[7] = Cap((sum->sticks[1].horiz + 255) / 2); query.response[7] = Cap((sum->sticks[1].horiz + 255) / 2); // Left stick: left & right
query.response[8] = Cap((sum->sticks[1].vert + 255) / 2); query.response[8] = Cap((sum->sticks[1].vert + 255) / 2); // Left stick: up & down
query.numBytes = 9; query.numBytes = 9;
if (pad->mode != MODE_ANALOG) { if (pad->mode != MODE_ANALOG) {
@ -1289,14 +1318,15 @@ u8 CALLBACK PADpoll(u8 value)
query.response[11] = (unsigned char)sum->buttons[12]; //D-pad up query.response[11] = (unsigned char)sum->buttons[12]; //D-pad up
query.response[12] = (unsigned char)sum->buttons[14]; //D-pad down query.response[12] = (unsigned char)sum->buttons[14]; //D-pad down
query.response[13] = (unsigned char)sum->buttons[8]; query.response[13] = (unsigned char)sum->buttons[8]; // Triangle
query.response[14] = (unsigned char)sum->buttons[9]; query.response[14] = (unsigned char)sum->buttons[9]; // Circle
query.response[15] = (unsigned char)sum->buttons[10]; query.response[15] = (unsigned char)sum->buttons[10]; // Cross
query.response[16] = (unsigned char)sum->buttons[11]; query.response[16] = (unsigned char)sum->buttons[11]; // Square
query.response[17] = (unsigned char)sum->buttons[6];
query.response[18] = (unsigned char)sum->buttons[7]; query.response[17] = (unsigned char)sum->buttons[6]; // L1
query.response[19] = (unsigned char)sum->buttons[4]; query.response[18] = (unsigned char)sum->buttons[7]; // R1
query.response[20] = (unsigned char)sum->buttons[5]; query.response[19] = (unsigned char)sum->buttons[4]; // L2
query.response[20] = (unsigned char)sum->buttons[5]; // R2
query.numBytes = 21; query.numBytes = 21;
} }
} }
@ -1375,6 +1405,12 @@ u8 CALLBACK PADpoll(u8 value)
return 0xF3; return 0xF3;
} else { } else {
query.lastByte++; query.lastByte++;
// Only the 0x42(read input and vibration) and 0x43(enter or exit config mode) command cases work outside of config mode, the other cases will be avoided.
if (!pad->config && query.currentCommand != 0x42 && query.currentCommand != 0x43) {
DEBUG_OUT(query.response[query.lastByte]);
return query.response[query.lastByte];
}
switch (query.currentCommand) { switch (query.currentCommand) {
// READ_DATA_AND_VIBRATE // READ_DATA_AND_VIBRATE
case 0x42: case 0x42:
@ -1388,14 +1424,22 @@ u8 CALLBACK PADpoll(u8 value)
case 0x43: case 0x43:
if (query.lastByte == 3) { if (query.lastByte == 3) {
query.queryDone = 1; query.queryDone = 1;
int padtype = config.padConfigs[query.port][query.slot].type;
if (padtype != neGconPad && padtype != MousePad) {
pad->config = value; pad->config = value;
} else if (pad->config != 0) {
pad->config = 0;
}
} }
break; break;
// SET_MODE_AND_LOCK // SET_MODE_AND_LOCK
case 0x44: case 0x44:
if (query.lastByte == 3 && value < 2) { if (query.lastByte == 3 && value < 2) {
if (value == 0 && config.padConfigs[query.port][query.slot].type == MousePad) { int padtype = config.padConfigs[query.port][query.slot].type;
if (padtype == MousePad) {
pad->mode = MODE_PS1_MOUSE; pad->mode = MODE_PS1_MOUSE;
} else if (padtype == neGconPad) {
pad->mode = MODE_NEGCON;
} else { } else {
static const u8 modes[2] = {MODE_DIGITAL, MODE_ANALOG}; static const u8 modes[2] = {MODE_DIGITAL, MODE_ANALOG};
pad->mode = modes[value]; pad->mode = modes[value];
@ -1621,7 +1665,7 @@ s32 CALLBACK PADfreeze(int mode, freezeData *data)
for (int slot = 0; slot < 4; slot++) { for (int slot = 0; slot < 4; slot++) {
u8 mode = pdata.padData[port][slot].mode; u8 mode = pdata.padData[port][slot].mode;
if (mode != MODE_DIGITAL && mode != MODE_ANALOG && mode != MODE_DS2_NATIVE && mode != MODE_PS1_MOUSE) { if (mode != MODE_DIGITAL && mode != MODE_ANALOG && mode != MODE_DS2_NATIVE && mode != MODE_PS1_MOUSE && mode != MODE_NEGCON) {
break; break;
} }

View File

@ -65,40 +65,41 @@ BEGIN
PUSHBUTTON "R1",ID_R1,254,13,34,15 PUSHBUTTON "R1",ID_R1,254,13,34,15
PUSHBUTTON "L2",ID_L2,210,30,34,15 PUSHBUTTON "L2",ID_L2,210,30,34,15
PUSHBUTTON "R2",ID_R2,254,30,34,15 PUSHBUTTON "R2",ID_R2,254,30,34,15
GROUPBOX "D-Pad",IDC_DPAD,196,48,108,70 GROUPBOX "D-Pad",IDC_DPAD,196,49,108,70
PUSHBUTTON "Up",ID_DPAD_UP,233,59,34,15 PUSHBUTTON "Up",ID_DPAD_UP,233,60,34,15
PUSHBUTTON "Left",ID_DPAD_LEFT,214,78,34,15 PUSHBUTTON "Left",ID_DPAD_LEFT,214,79,34,15
PUSHBUTTON "Right",ID_DPAD_RIGHT,252,78,34,15 PUSHBUTTON "Right",ID_DPAD_RIGHT,252,79,34,15
PUSHBUTTON "Down",ID_DPAD_DOWN,233,97,34,15 PUSHBUTTON "Down",ID_DPAD_DOWN,233,97,34,15
GROUPBOX "Face buttons",IDC_FACE,310,48,108,70 GROUPBOX "Face buttons",IDC_FACE,310,49,108,70
PUSHBUTTON "Triangle",ID_TRIANGLE,347,59,34,15 PUSHBUTTON "Triangle",ID_TRIANGLE,347,60,34,15
PUSHBUTTON "Square",ID_SQUARE,328,78,34,15 PUSHBUTTON "Square",ID_SQUARE,328,79,34,15
PUSHBUTTON "Circle",ID_CIRCLE,366,78,34,15 PUSHBUTTON "Circle",ID_CIRCLE,366,79,34,15
PUSHBUTTON "Cross",ID_CROSS,347,97,34,15 PUSHBUTTON "Cross",ID_CROSS,347,98,34,15
GROUPBOX "Left Analog Stick",IDC_LSTICK,196,119,108,70 GROUPBOX "Left Analog Stick",IDC_LSTICK,196,120,108,70
PUSHBUTTON "Up",ID_LSTICK_UP,234,130,30,15 PUSHBUTTON "Up",ID_LSTICK_UP,234,131,30,15
PUSHBUTTON "Left",ID_LSTICK_LEFT,202,149,30,15 PUSHBUTTON "Left",ID_LSTICK_LEFT,202,150,30,15
PUSHBUTTON "L3",ID_L3,234,149,30,15 PUSHBUTTON "L3",ID_L3,234,150,30,15
PUSHBUTTON "Right",ID_LSTICK_RIGHT,266,149,30,15 PUSHBUTTON "Right",ID_LSTICK_RIGHT,266,150,30,15
PUSHBUTTON "Down",ID_LSTICK_DOWN,234,169,30,15 PUSHBUTTON "Down",ID_LSTICK_DOWN,234,170,30,15
GROUPBOX "Right Analog Stick",IDC_RSTICK,310,119,108,70 GROUPBOX "Right Analog Stick",IDC_RSTICK,310,120,108,70
PUSHBUTTON "Up",ID_RSTICK_UP,348,130,30,15 PUSHBUTTON "Up",ID_RSTICK_UP,348,131,30,15
PUSHBUTTON "Left",ID_RSTICK_LEFT,316,149,30,15 PUSHBUTTON "Left",ID_RSTICK_LEFT,316,150,30,15
PUSHBUTTON "R3",ID_R3,348,149,30,15 PUSHBUTTON "R3",ID_R3,348,150,30,15
PUSHBUTTON "Right",ID_RSTICK_RIGHT,380,149,30,15 PUSHBUTTON "Right",ID_RSTICK_RIGHT,380,150,30,15
PUSHBUTTON "Down",ID_RSTICK_DOWN,348,169,30,15 PUSHBUTTON "Down",ID_RSTICK_DOWN,348,170,30,15
// Force Feedback bindings: // Force Feedback bindings:
GROUPBOX "Add Force Feedback Effect",ID_FORCEFEEDBACK_BOX,262,195,155,51 GROUPBOX "Add Force Feedback Effect",ID_FORCEFEEDBACK_BOX,262,194,155,51
COMBOBOX IDC_FORCEFEEDBACK,269,208,142,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_FORCEFEEDBACK,269,207,142,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Big Motor",ID_BIG_MOTOR,269,226,64,14 PUSHBUTTON "Big Motor",ID_BIG_MOTOR,269,225,64,14
PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,347,226,64,14 PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,347,225,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,195,59,15
COMBOBOX IDC_DEVICE_SELECT,259,250,72,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Lock Direction",ID_LOCK_DIRECTION,196,213,59,15
PUSHBUTTON "Lock Input",ID_LOCK_ALL_INPUT,196,196,59,15 PUSHBUTTON "Lock Buttons",ID_LOCK_BUTTONS,196,231,59,15
PUSHBUTTON "Lock Direction",ID_LOCK_DIRECTION,196,214,59,15 PUSHBUTTON "Turbo",ID_TURBO_KEY,196,249,59,15
PUSHBUTTON "Lock Buttons",ID_LOCK_BUTTONS,196,232,59,15 PUSHBUTTON "Exclude Input",ID_EXCLUDE,261,249,59,15
PUSHBUTTON "Ignore Key",ID_IGNORE,196,250,59,15 COMBOBOX IDC_DEVICE_SELECT,326,250,91,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Configure on bind",IDC_CONFIGURE_ON_BIND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,347,265,70,15
// Force Feedback configuration: // Force Feedback configuration:
GROUPBOX "",ID_FF,195,9,222,248 GROUPBOX "",ID_FF,195,9,222,248
COMBOBOX IDC_FF_EFFECT,203,23,206,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_FF_EFFECT,203,23,206,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
@ -129,22 +130,22 @@ BEGIN
PUSHBUTTON "Back to Controls",ID_CONTROLS,196,261,59,15 PUSHBUTTON "Back to Controls",ID_CONTROLS,196,261,59,15
PUSHBUTTON "Test",ID_TEST,257,261,59,15 PUSHBUTTON "Test",ID_TEST,257,261,59,15
// Input configuration: // Input configuration:
GROUPBOX "Configure Binding",ID_SENSITIVITY,195,9,222,98 GROUPBOX "Configure Binding",ID_SENSITIVITY,195,9,222,110
EDITTEXT IDC_AXIS_DEVICE,202,22,74,12,ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_AXIS_DEVICE,202,22,74,12,ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP
COMBOBOX IDC_AXIS_DIRECTION,276,20,70,47,CBS_DROPDOWNLIST | WS_TABSTOP COMBOBOX IDC_AXIS_DIRECTION,276,20,70,47,CBS_DROPDOWNLIST | WS_TABSTOP
EDITTEXT IDC_AXIS_CONTROL,349,22,65,12,ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_AXIS_CONTROL,349,22,65,12,ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP
LTEXT "Sensitivity",IDC_LABEL_SENSITIVITY,202,38,42,8 CONTROL "Flip",IDC_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,37,27,10
CONTROL "Turbo",IDC_TURBO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,50,34,10 CONTROL "Rapid Fire",IDC_RAPID_FIRE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,232,37,44,10
CONTROL "",IDC_SLIDER_SENSITIVITY,"msctls_trackbar32",WS_TABSTOP,240,38,131,17 LTEXT "Sensitivity",IDC_LABEL_SENSITIVITY,202,51,42,8
EDITTEXT IDC_AXIS_SENSITIVITY,377,36,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING CONTROL "",IDC_SLIDER_SENSITIVITY,"msctls_trackbar32",WS_TABSTOP,240,51,131,17
CONTROL "Flip",IDC_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,385,50,27,10 EDITTEXT IDC_AXIS_SENSITIVITY,372,53,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
LTEXT "Dead Zone",IDC_LABEL_DEADZONE,202,63,42,8 LTEXT "Dead Zone",IDC_LABEL_DEADZONE,202,71,42,8
CONTROL "",IDC_SLIDER_DEADZONE,"msctls_trackbar32",WS_TABSTOP,240,59,131,17 CONTROL "",IDC_SLIDER_DEADZONE,"msctls_trackbar32",WS_TABSTOP,240,71,131,17
EDITTEXT IDC_AXIS_DEADZONE,377,62,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING EDITTEXT IDC_AXIS_DEADZONE,372,73,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
LTEXT "Skip Dead Zone",IDC_LABEL_SKIP_DEADZONE,202,80,42,16 LTEXT "Skip Dead Zone",IDC_LABEL_SKIP_DEADZONE,202,92,42,16
CONTROL "",IDC_SLIDER_SKIP_DEADZONE,"msctls_trackbar32",WS_TABSTOP,240,80,131,17 CONTROL "",IDC_SLIDER_SKIP_DEADZONE,"msctls_trackbar32",WS_TABSTOP,240,92,131,17
EDITTEXT IDC_AXIS_SKIP_DEADZONE,377,83,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING EDITTEXT IDC_AXIS_SKIP_DEADZONE,372,94,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
LTEXT "Off",IDC_SKIP_DEADZONE_OFF,390,83,20,12 LTEXT "Off",IDC_SKIP_DEADZONE_OFF,390,94,20,12
END END
IDD_CONFIG_POPN DIALOGEX 0, 0, 424, 283 IDD_CONFIG_POPN DIALOGEX 0, 0, 424, 283
@ -165,17 +166,18 @@ BEGIN
PUSHBUTTON "Yellow R",ID_DPAD_UP,350,48,43,15 PUSHBUTTON "Yellow R",ID_DPAD_UP,350,48,43,15
PUSHBUTTON "White R",ID_L2,372,66,43,15 PUSHBUTTON "White R",ID_L2,372,66,43,15
// Force Feedback bindings: // Force Feedback bindings:
GROUPBOX "Add Force Feedback Effect",ID_FORCEFEEDBACK_BOX,262,195,155,51 GROUPBOX "Add Force Feedback Effect",ID_FORCEFEEDBACK_BOX,262,194,155,51
COMBOBOX IDC_FORCEFEEDBACK,269,208,142,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_FORCEFEEDBACK,269,207,142,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Big Motor",ID_BIG_MOTOR,269,226,64,14 PUSHBUTTON "Big Motor",ID_BIG_MOTOR,269,225,64,14
PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,347,226,64,14 PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,347,225,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,195,59,15
COMBOBOX IDC_DEVICE_SELECT,259,250,72,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Lock Direction",ID_LOCK_DIRECTION,196,213,59,15
PUSHBUTTON "Lock Input",ID_LOCK_ALL_INPUT,196,196,59,15 PUSHBUTTON "Lock Buttons",ID_LOCK_BUTTONS,196,231,59,15
PUSHBUTTON "Lock Direction",ID_LOCK_DIRECTION,196,214,59,15 PUSHBUTTON "Turbo",ID_TURBO_KEY,196,249,59,15
PUSHBUTTON "Lock Buttons",ID_LOCK_BUTTONS,196,232,59,15 PUSHBUTTON "Exclude Input",ID_EXCLUDE,261,249,59,15
PUSHBUTTON "Ignore Key",ID_IGNORE,196,250,59,15 COMBOBOX IDC_DEVICE_SELECT,326,250,91,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Configure on bind",IDC_CONFIGURE_ON_BIND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,347,265,70,15
// Force Feedback configuration: // Force Feedback configuration:
GROUPBOX "",ID_FF,195,9,222,248 GROUPBOX "",ID_FF,195,9,222,248
COMBOBOX IDC_FF_EFFECT,203,23,206,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_FF_EFFECT,203,23,206,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
@ -206,22 +208,22 @@ BEGIN
PUSHBUTTON "Back to Controls",ID_CONTROLS,196,261,59,15 PUSHBUTTON "Back to Controls",ID_CONTROLS,196,261,59,15
PUSHBUTTON "Test",ID_TEST,257,261,59,15 PUSHBUTTON "Test",ID_TEST,257,261,59,15
// Input configuration: // Input configuration:
GROUPBOX "Configure Binding",ID_SENSITIVITY,195,9,222,98 GROUPBOX "Configure Binding",ID_SENSITIVITY,195,9,222,110
EDITTEXT IDC_AXIS_DEVICE,202,22,74,12,ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_AXIS_DEVICE,202,22,74,12,ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP
COMBOBOX IDC_AXIS_DIRECTION,276,20,70,47,CBS_DROPDOWNLIST | WS_TABSTOP COMBOBOX IDC_AXIS_DIRECTION,276,20,70,47,CBS_DROPDOWNLIST | WS_TABSTOP
EDITTEXT IDC_AXIS_CONTROL,349,22,65,12,ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_AXIS_CONTROL,349,22,65,12,ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP
LTEXT "Sensitivity",IDC_LABEL_SENSITIVITY,202,38,42,8 CONTROL "Flip",IDC_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,37,27,10
CONTROL "Turbo",IDC_TURBO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,50,34,10 CONTROL "Rapid Fire",IDC_RAPID_FIRE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,232,37,44,10
CONTROL "",IDC_SLIDER_SENSITIVITY,"msctls_trackbar32",WS_TABSTOP,240,38,131,17 LTEXT "Sensitivity",IDC_LABEL_SENSITIVITY,202,51,42,8
EDITTEXT IDC_AXIS_SENSITIVITY,377,36,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING CONTROL "",IDC_SLIDER_SENSITIVITY,"msctls_trackbar32",WS_TABSTOP,240,51,131,17
CONTROL "Flip",IDC_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,385,50,27,10 EDITTEXT IDC_AXIS_SENSITIVITY,372,53,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
LTEXT "Dead Zone",IDC_LABEL_DEADZONE,202,63,42,8 LTEXT "Dead Zone",IDC_LABEL_DEADZONE,202,71,42,8
CONTROL "",IDC_SLIDER_DEADZONE,"msctls_trackbar32",WS_TABSTOP,240,59,131,17 CONTROL "",IDC_SLIDER_DEADZONE,"msctls_trackbar32",WS_TABSTOP,240,71,131,17
EDITTEXT IDC_AXIS_DEADZONE,377,62,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING EDITTEXT IDC_AXIS_DEADZONE,372,73,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
LTEXT "Skip Dead Zone",IDC_LABEL_SKIP_DEADZONE,202,80,42,16 LTEXT "Skip Dead Zone",IDC_LABEL_SKIP_DEADZONE,202,92,42,16
CONTROL "",IDC_SLIDER_SKIP_DEADZONE,"msctls_trackbar32",WS_TABSTOP,240,80,131,17 CONTROL "",IDC_SLIDER_SKIP_DEADZONE,"msctls_trackbar32",WS_TABSTOP,240,92,131,17
EDITTEXT IDC_AXIS_SKIP_DEADZONE,377,83,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING EDITTEXT IDC_AXIS_SKIP_DEADZONE,372,94,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
LTEXT "Off",IDC_SKIP_DEADZONE_OFF,390,83,20,12 LTEXT "Off",IDC_SKIP_DEADZONE_OFF,390,94,20,12
END END
IDD_CONFIG_GUITAR DIALOGEX 0, 0, 424, 283 IDD_CONFIG_GUITAR DIALOGEX 0, 0, 424, 283
@ -242,17 +244,18 @@ BEGIN
PUSHBUTTON "Strum Bar Up",ID_DPAD_UP,336,146,58,15 PUSHBUTTON "Strum Bar Up",ID_DPAD_UP,336,146,58,15
PUSHBUTTON "Strum Bar Down",ID_DPAD_DOWN,336,164,58,15 PUSHBUTTON "Strum Bar Down",ID_DPAD_DOWN,336,164,58,15
// Force Feedback bindings: // Force Feedback bindings:
GROUPBOX "Add Force Feedback Effect",ID_FORCEFEEDBACK_BOX,262,195,155,51 GROUPBOX "Add Force Feedback Effect",ID_FORCEFEEDBACK_BOX,262,194,155,51
COMBOBOX IDC_FORCEFEEDBACK,269,208,142,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_FORCEFEEDBACK,269,207,142,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Big Motor",ID_BIG_MOTOR,269,226,64,14 PUSHBUTTON "Big Motor",ID_BIG_MOTOR,269,225,64,14
PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,347,226,64,14 PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,347,225,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,195,59,15
COMBOBOX IDC_DEVICE_SELECT,259,250,72,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Lock Direction",ID_LOCK_DIRECTION,196,213,59,15
PUSHBUTTON "Lock Input",ID_LOCK_ALL_INPUT,196,196,59,15 PUSHBUTTON "Lock Buttons",ID_LOCK_BUTTONS,196,231,59,15
PUSHBUTTON "Lock Direction",ID_LOCK_DIRECTION,196,214,59,15 PUSHBUTTON "Turbo",ID_TURBO_KEY,196,249,59,15
PUSHBUTTON "Lock Buttons",ID_LOCK_BUTTONS,196,232,59,15 PUSHBUTTON "Exclude Input",ID_EXCLUDE,261,249,59,15
PUSHBUTTON "Ignore Key",ID_IGNORE,196,250,59,15 COMBOBOX IDC_DEVICE_SELECT,326,250,91,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Configure on bind",IDC_CONFIGURE_ON_BIND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,347,265,70,15
// Force Feedback configuration: // Force Feedback configuration:
GROUPBOX "",ID_FF,195,9,222,248 GROUPBOX "",ID_FF,195,9,222,248
COMBOBOX IDC_FF_EFFECT,203,23,206,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_FF_EFFECT,203,23,206,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
@ -283,22 +286,22 @@ BEGIN
PUSHBUTTON "Back to Controls",ID_CONTROLS,196,261,59,15 PUSHBUTTON "Back to Controls",ID_CONTROLS,196,261,59,15
PUSHBUTTON "Test",ID_TEST,257,261,59,15 PUSHBUTTON "Test",ID_TEST,257,261,59,15
// Input configuration: // Input configuration:
GROUPBOX "Configure Binding",ID_SENSITIVITY,195,9,222,98 GROUPBOX "Configure Binding",ID_SENSITIVITY,195,9,222,110
EDITTEXT IDC_AXIS_DEVICE,202,22,74,12,ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_AXIS_DEVICE,202,22,74,12,ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP
COMBOBOX IDC_AXIS_DIRECTION,276,20,70,47,CBS_DROPDOWNLIST | WS_TABSTOP COMBOBOX IDC_AXIS_DIRECTION,276,20,70,47,CBS_DROPDOWNLIST | WS_TABSTOP
EDITTEXT IDC_AXIS_CONTROL,349,22,65,12,ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_AXIS_CONTROL,349,22,65,12,ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP
LTEXT "Sensitivity",IDC_LABEL_SENSITIVITY,202,38,42,8 CONTROL "Flip",IDC_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,37,27,10
CONTROL "Turbo",IDC_TURBO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,50,34,10 CONTROL "Rapid Fire",IDC_RAPID_FIRE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,232,37,44,10
CONTROL "",IDC_SLIDER_SENSITIVITY,"msctls_trackbar32",WS_TABSTOP,240,38,131,17 LTEXT "Sensitivity",IDC_LABEL_SENSITIVITY,202,51,42,8
EDITTEXT IDC_AXIS_SENSITIVITY,377,36,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING CONTROL "",IDC_SLIDER_SENSITIVITY,"msctls_trackbar32",WS_TABSTOP,240,51,131,17
CONTROL "Flip",IDC_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,385,50,27,10 EDITTEXT IDC_AXIS_SENSITIVITY,372,53,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
LTEXT "Dead Zone",IDC_LABEL_DEADZONE,202,63,42,8 LTEXT "Dead Zone",IDC_LABEL_DEADZONE,202,71,42,8
CONTROL "",IDC_SLIDER_DEADZONE,"msctls_trackbar32",WS_TABSTOP,240,59,131,17 CONTROL "",IDC_SLIDER_DEADZONE,"msctls_trackbar32",WS_TABSTOP,240,71,131,17
EDITTEXT IDC_AXIS_DEADZONE,377,62,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING EDITTEXT IDC_AXIS_DEADZONE,372,73,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
LTEXT "Skip Dead Zone",IDC_LABEL_SKIP_DEADZONE,202,80,42,16 LTEXT "Skip Dead Zone",IDC_LABEL_SKIP_DEADZONE,202,92,42,16
CONTROL "",IDC_SLIDER_SKIP_DEADZONE,"msctls_trackbar32",WS_TABSTOP,240,80,131,17 CONTROL "",IDC_SLIDER_SKIP_DEADZONE,"msctls_trackbar32",WS_TABSTOP,240,92,131,17
EDITTEXT IDC_AXIS_SKIP_DEADZONE,377,83,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING EDITTEXT IDC_AXIS_SKIP_DEADZONE,372,94,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
LTEXT "Off",IDC_SKIP_DEADZONE_OFF,390,83,20,12 LTEXT "Off",IDC_SKIP_DEADZONE_OFF,390,94,20,12
END END
IDD_CONFIG_PS1_MOUSE DIALOGEX 0, 0, 424, 283 IDD_CONFIG_PS1_MOUSE DIALOGEX 0, 0, 424, 283
@ -307,25 +310,28 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN BEGIN
CONTROL "",IDC_BINDINGS_LIST,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_VSCROLL | WS_TABSTOP,7,7,183,285,WS_EX_CLIENTEDGE CONTROL "",IDC_BINDINGS_LIST,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_VSCROLL | WS_TABSTOP,7,7,183,285,WS_EX_CLIENTEDGE
// Input bindings: // Input bindings:
PUSHBUTTON "Mouse",ID_MOUSE,366,30,34,15 PUSHBUTTON "Mouse",ID_MOUSE,379,28,34,15
GROUPBOX "Mouse buttons",IDC_FACE,242,46,124,34
PUSHBUTTON "Left-click",ID_CIRCLE,256,57,45,15
PUSHBUTTON "Right-click",ID_CROSS,307,57,45,15
GROUPBOX "Mouse Axis",IDC_LSTICK,242,81,124,74
PUSHBUTTON "X-axis Left",ID_LSTICK_LEFT,256,112,45,15 PUSHBUTTON "X-axis Left",ID_LSTICK_LEFT,256,112,45,15
PUSHBUTTON "X-axis Right",ID_LSTICK_RIGHT,307,112,45,15 PUSHBUTTON "X-axis Right",ID_LSTICK_RIGHT,307,112,45,15
PUSHBUTTON "Y-axis Up",ID_LSTICK_UP,283,92,45,15 PUSHBUTTON "Y-axis Up",ID_LSTICK_UP,283,92,45,15
PUSHBUTTON "Y-axis Down",ID_LSTICK_DOWN,283,132,45,15 PUSHBUTTON "Y-axis Down",ID_LSTICK_DOWN,283,132,45,15
PUSHBUTTON "Left-click",ID_CIRCLE,256,56,45,15
PUSHBUTTON "Right-click",ID_CROSS,307,56,45,15
// Force Feedback bindings: // Force Feedback bindings:
GROUPBOX "Add Force Feedback Effect",ID_FORCEFEEDBACK_BOX,262,195,155,51 GROUPBOX "Add Force Feedback Effect",ID_FORCEFEEDBACK_BOX,262,194,155,51
COMBOBOX IDC_FORCEFEEDBACK,269,208,142,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_FORCEFEEDBACK,269,207,142,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Big Motor",ID_BIG_MOTOR,269,226,64,14 PUSHBUTTON "Big Motor",ID_BIG_MOTOR,269,225,64,14
PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,347,226,64,14 PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,347,225,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,195,59,15
COMBOBOX IDC_DEVICE_SELECT,259,250,72,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Lock Direction",ID_LOCK_DIRECTION,196,213,59,15
PUSHBUTTON "Lock Input",ID_LOCK_ALL_INPUT,196,196,59,15 PUSHBUTTON "Lock Buttons",ID_LOCK_BUTTONS,196,231,59,15
PUSHBUTTON "Lock Direction",ID_LOCK_DIRECTION,196,214,59,15 PUSHBUTTON "Turbo",ID_TURBO_KEY,196,249,59,15
PUSHBUTTON "Lock Buttons",ID_LOCK_BUTTONS,196,232,59,15 PUSHBUTTON "Exclude Input",ID_EXCLUDE,261,249,59,15
PUSHBUTTON "Ignore Key",ID_IGNORE,196,250,59,15 COMBOBOX IDC_DEVICE_SELECT,326,250,91,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Configure on bind",IDC_CONFIGURE_ON_BIND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,347,265,70,15
// Force Feedback configuration: // Force Feedback configuration:
GROUPBOX "",ID_FF,195,9,222,248 GROUPBOX "",ID_FF,195,9,222,248
COMBOBOX IDC_FF_EFFECT,203,23,206,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_FF_EFFECT,203,23,206,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
@ -356,22 +362,108 @@ BEGIN
PUSHBUTTON "Back to Controls",ID_CONTROLS,196,261,59,15 PUSHBUTTON "Back to Controls",ID_CONTROLS,196,261,59,15
PUSHBUTTON "Test",ID_TEST,257,261,59,15 PUSHBUTTON "Test",ID_TEST,257,261,59,15
// Input configuration: // Input configuration:
GROUPBOX "Configure Binding",ID_SENSITIVITY,195,9,222,98 GROUPBOX "Configure Binding",ID_SENSITIVITY,195,9,222,110
EDITTEXT IDC_AXIS_DEVICE,202,22,74,12,ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_AXIS_DEVICE,202,22,74,12,ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP
COMBOBOX IDC_AXIS_DIRECTION,276,20,70,47,CBS_DROPDOWNLIST | WS_TABSTOP COMBOBOX IDC_AXIS_DIRECTION,276,20,70,47,CBS_DROPDOWNLIST | WS_TABSTOP
EDITTEXT IDC_AXIS_CONTROL,349,22,65,12,ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_AXIS_CONTROL,349,22,65,12,ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP
LTEXT "Sensitivity",IDC_LABEL_SENSITIVITY,202,38,42,8 CONTROL "Flip",IDC_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,37,27,10
CONTROL "Turbo",IDC_TURBO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,50,34,10 CONTROL "Rapid Fire",IDC_RAPID_FIRE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,232,37,44,10
CONTROL "",IDC_SLIDER_SENSITIVITY,"msctls_trackbar32",WS_TABSTOP,240,38,131,17 LTEXT "Sensitivity",IDC_LABEL_SENSITIVITY,202,51,42,8
EDITTEXT IDC_AXIS_SENSITIVITY,377,36,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING CONTROL "",IDC_SLIDER_SENSITIVITY,"msctls_trackbar32",WS_TABSTOP,240,51,131,17
CONTROL "Flip",IDC_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,385,50,27,10 EDITTEXT IDC_AXIS_SENSITIVITY,372,53,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
LTEXT "Dead Zone",IDC_LABEL_DEADZONE,202,63,42,8 LTEXT "Dead Zone",IDC_LABEL_DEADZONE,202,71,42,8
CONTROL "",IDC_SLIDER_DEADZONE,"msctls_trackbar32",WS_TABSTOP,240,59,131,17 CONTROL "",IDC_SLIDER_DEADZONE,"msctls_trackbar32",WS_TABSTOP,240,71,131,17
EDITTEXT IDC_AXIS_DEADZONE,377,62,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING EDITTEXT IDC_AXIS_DEADZONE,372,73,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
LTEXT "Skip Dead Zone",IDC_LABEL_SKIP_DEADZONE,202,80,42,16 LTEXT "Skip Dead Zone",IDC_LABEL_SKIP_DEADZONE,202,92,42,16
CONTROL "",IDC_SLIDER_SKIP_DEADZONE,"msctls_trackbar32",WS_TABSTOP,240,80,131,17 CONTROL "",IDC_SLIDER_SKIP_DEADZONE,"msctls_trackbar32",WS_TABSTOP,240,92,131,17
EDITTEXT IDC_AXIS_SKIP_DEADZONE,377,83,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING EDITTEXT IDC_AXIS_SKIP_DEADZONE,372,94,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
LTEXT "Off",IDC_SKIP_DEADZONE_OFF,390,83,20,12 LTEXT "Off",IDC_SKIP_DEADZONE_OFF,390,94,20,12
END
IDD_CONFIG_NEGCON DIALOGEX 0, 0, 424, 283
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
CONTROL "",IDC_BINDINGS_LIST,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_VSCROLL | WS_TABSTOP,7,7,183,285,WS_EX_CLIENTEDGE
// Input bindings:
GROUPBOX "Shoulder buttons",IDC_SHOULDER,220,30,173,34
PUSHBUTTON "Analog L",ID_L1,233,41,34,15
PUSHBUTTON "Digital R",ID_R1,346,41,34,15
GROUPBOX "D-Pad",IDC_DPAD,196,65,108,70
PUSHBUTTON "Up",ID_DPAD_UP,233,76,34,15
PUSHBUTTON "Left",ID_DPAD_LEFT,214,95,34,15
PUSHBUTTON "Right",ID_DPAD_RIGHT,252,95,34,15
PUSHBUTTON "Down",ID_DPAD_DOWN,233,114,34,15
GROUPBOX "Digital Face buttons",IDC_FACE,310,65,108,34
PUSHBUTTON "B",ID_TRIANGLE,327,76,34,15
PUSHBUTTON "A",ID_CIRCLE,367,76,34,15
GROUPBOX "Analog Face buttons",IDC_FACE_ANALOG,310,101,108,34
PUSHBUTTON "II",ID_SQUARE,327,112,34,15
PUSHBUTTON "I",ID_CROSS,367,112,34,15
GROUPBOX "Analog Rotating Section",IDC_LSTICK,247,136,124,34
PUSHBUTTON "Left",ID_LSTICK_LEFT,261,147,30,15
PUSHBUTTON "Right",ID_LSTICK_RIGHT,327,147,30,15
PUSHBUTTON "Start",ID_START,207,139,34,15
PUSHBUTTON "Mouse",ID_MOUSE,207,158,34,15
// Force Feedback bindings:
GROUPBOX "Add Force Feedback Effect",ID_FORCEFEEDBACK_BOX,262,194,155,51
COMBOBOX IDC_FORCEFEEDBACK,269,207,142,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Big Motor",ID_BIG_MOTOR,269,225,64,14
PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,347,225,64,14
// Special bindings and options:
PUSHBUTTON "Lock Input",ID_LOCK_ALL_INPUT,196,195,59,15
PUSHBUTTON "Lock Direction",ID_LOCK_DIRECTION,196,213,59,15
PUSHBUTTON "Lock Buttons",ID_LOCK_BUTTONS,196,231,59,15
PUSHBUTTON "Turbo",ID_TURBO_KEY,196,249,59,15
PUSHBUTTON "Exclude Input",ID_EXCLUDE,261,249,59,15
COMBOBOX IDC_DEVICE_SELECT,326,250,91,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Configure on bind",IDC_CONFIGURE_ON_BIND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,347,265,70,15
// Force Feedback configuration:
GROUPBOX "",ID_FF,195,9,222,248
COMBOBOX IDC_FF_EFFECT,203,23,206,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "",IDC_FF_AXIS1,"msctls_trackbar32",WS_TABSTOP,199,43,214,17
CONTROL "Axis 1",IDC_FF_AXIS1_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,63,91,10
CONTROL "Flip",IDC_FF_AXIS1_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,302,63,35,10
EDITTEXT IDC_FF_AXIS1_SCALE,375,63,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
CONTROL "",IDC_FF_AXIS2,"msctls_trackbar32",WS_TABSTOP,199,79,214,17
CONTROL "Axis 2",IDC_FF_AXIS2_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,99,91,10
CONTROL "Flip",IDC_FF_AXIS2_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,302,99,35,10
EDITTEXT IDC_FF_AXIS2_SCALE,375,92,40,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
CONTROL "",IDC_FF_AXIS3,"msctls_trackbar32",WS_TABSTOP,199,115,214,17
CONTROL "Axis 3",IDC_FF_AXIS3_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,135,91,10
CONTROL "Flip",IDC_FF_AXIS3_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,302,135,35,10
EDITTEXT IDC_FF_AXIS3_SCALE,375,135,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
CONTROL "",IDC_FF_AXIS4,"msctls_trackbar32",WS_TABSTOP,199,151,214,17
CONTROL "Axis 4",IDC_FF_AXIS4_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,171,91,10
CONTROL "Flip",IDC_FF_AXIS4_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,302,171,35,10
EDITTEXT IDC_FF_AXIS4_SCALE,375,171,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
CONTROL "",IDC_FF_AXIS5,"msctls_trackbar32",WS_TABSTOP,199,187,214,17
CONTROL "Axis 5",IDC_FF_AXIS5_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,207,91,10
CONTROL "Flip",IDC_FF_AXIS5_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,302,207,35,10
EDITTEXT IDC_FF_AXIS5_SCALE,375,207,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
CONTROL "",IDC_FF_AXIS6,"msctls_trackbar32",WS_TABSTOP,199,223,214,17
CONTROL "Axis 6",IDC_FF_AXIS6_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,243,91,10
CONTROL "Flip",IDC_FF_AXIS6_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,302,243,35,10
EDITTEXT IDC_FF_AXIS6_SCALE,375,243,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
PUSHBUTTON "Back to Controls",ID_CONTROLS,196,261,59,15
PUSHBUTTON "Test",ID_TEST,257,261,59,15
// Input configuration:
GROUPBOX "Configure Binding",ID_SENSITIVITY,195,9,222,110
EDITTEXT IDC_AXIS_DEVICE,202,22,74,12,ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP
COMBOBOX IDC_AXIS_DIRECTION,276,20,70,47,CBS_DROPDOWNLIST | WS_TABSTOP
EDITTEXT IDC_AXIS_CONTROL,349,22,65,12,ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP
CONTROL "Flip",IDC_FLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,37,27,10
CONTROL "Rapid Fire",IDC_RAPID_FIRE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,232,37,44,10
LTEXT "Sensitivity",IDC_LABEL_SENSITIVITY,202,51,42,8
CONTROL "",IDC_SLIDER_SENSITIVITY,"msctls_trackbar32",WS_TABSTOP,240,51,131,17
EDITTEXT IDC_AXIS_SENSITIVITY,372,53,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
LTEXT "Dead Zone",IDC_LABEL_DEADZONE,202,71,42,8
CONTROL "",IDC_SLIDER_DEADZONE,"msctls_trackbar32",WS_TABSTOP,240,71,131,17
EDITTEXT IDC_AXIS_DEADZONE,372,73,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
LTEXT "Skip Dead Zone",IDC_LABEL_SKIP_DEADZONE,202,92,42,16
CONTROL "",IDC_SLIDER_SKIP_DEADZONE,"msctls_trackbar32",WS_TABSTOP,240,92,131,17
EDITTEXT IDC_AXIS_SKIP_DEADZONE,372,94,33,12,ES_RIGHT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_RTLREADING
LTEXT "Off",IDC_SKIP_DEADZONE_OFF,390,94,20,12
END END
IDD_GENERAL DIALOGEX 0, 0, 424, 283 IDD_GENERAL DIALOGEX 0, 0, 424, 283
@ -381,43 +473,40 @@ BEGIN
GROUPBOX "Input APIs",IDC_STATIC,7,6,410,133 GROUPBOX "Input APIs",IDC_STATIC,7,6,410,133
GROUPBOX "Keyboard API",IDC_STATIC,16,16,192,51 GROUPBOX "Keyboard API",IDC_STATIC,16,16,192,51
CONTROL "Windows messaging (Recommended)",IDC_KB_WM,"Button",BS_AUTORADIOBUTTON | WS_GROUP,22,28,134,10 CONTROL "Windows messaging (Recommended)",IDC_KB_WM,"Button",BS_AUTORADIOBUTTON | WS_GROUP,22,28,134,10
CONTROL "Raw input (XP and later only)",IDC_KB_RAW,"Button",BS_AUTORADIOBUTTON,22,40,112,10 CONTROL "Raw input",IDC_KB_RAW,"Button",BS_AUTORADIOBUTTON,22,40,112,10
CONTROL "DirectInput",IDC_KB_DI,"Button",BS_AUTORADIOBUTTON,22,52,112,10 CONTROL "DirectInput",IDC_KB_DI,"Button",BS_AUTORADIOBUTTON,22,52,112,10
GROUPBOX "Game Device APIs",IDC_STATIC,16,70,191,62 GROUPBOX "Game Device APIs",IDC_STATIC,16,70,191,62
CONTROL "DirectInput",IDC_G_DI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,22,82,65,10 CONTROL "DirectInput",IDC_G_DI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,22,82,65,10
CONTROL "XInput (Xbox 360 controllers only)",IDC_G_XI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,22,94,125,10 CONTROL "XInput",IDC_G_XI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,22,94,125,10
CONTROL "DualShock 3 native mode (Requires libusb)",IDC_G_DS3, CONTROL "DualShock 3 native mode (Requires libusb)",IDC_G_DS3,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,22,106,151,10 "Button",BS_AUTOCHECKBOX | WS_TABSTOP,22,106,151,10
CONTROL "Monitor when in background",IDC_BACKGROUND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,22,118,106,10 CONTROL "Monitor when in background",IDC_BACKGROUND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,22,118,106,10
GROUPBOX "Mouse API",IDC_STATIC,216,16,192,74 GROUPBOX "Mouse API",IDC_STATIC,216,16,192,85
CONTROL "Windows messaging (Recommended)",IDC_M_WM,"Button",BS_AUTORADIOBUTTON | WS_GROUP,223,27,134,10 CONTROL "Windows messaging (Recommended)",IDC_M_WM,"Button",BS_AUTORADIOBUTTON | WS_GROUP,223,27,134,10
CONTROL "Raw input (XP and later only)",IDC_M_RAW,"Button",BS_AUTORADIOBUTTON,223,39,112,10 CONTROL "Raw input",IDC_M_RAW,"Button",BS_AUTORADIOBUTTON,223,39,112,10
CONTROL "DirectInput",IDC_M_DI,"Button",BS_AUTORADIOBUTTON,223,51,112,10 CONTROL "DirectInput",IDC_M_DI,"Button",BS_AUTORADIOBUTTON,223,51,112,10
CONTROL "Disable",IDC_M_DISABLE,"Button",BS_AUTORADIOBUTTON,223,63,39,10 CONTROL "Disable",IDC_M_DISABLE,"Button",BS_AUTORADIOBUTTON,223,63,39,10
CONTROL "Start without mouse focus",IDC_MOUSE_UNFOCUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,223,75,97,10 CONTROL "Start without mouse focus",IDC_MOUSE_UNFOCUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,223,75,97,10
CONTROL "Always hide cursor",IDC_FORCE_HIDE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,323,75,71,10 CONTROL "Always hide cursor",IDC_FORCE_HIDE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,223,87,71,10
GROUPBOX "Advanced",IDC_STATIC,215,93,192,37
CONTROL "Allow binding multiple PS2 controls to one PC control",IDC_MULTIPLE_BINDING,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,221,102,182,10
CONTROL "Disable screensaver",IDC_DISABLE_SCREENSAVER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,286,115,80,10
CONTROL "Enable logging",IDC_DEBUG_FILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,221,115,62,10
GROUPBOX "Pads",IDC_STATIC,7,142,410,62 GROUPBOX "Pads",IDC_STATIC,7,142,410,62
CONTROL "Port 1 Multitap",IDC_MULTITAP1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,152,63,10 CONTROL "Port 1 Multitap",IDC_MULTITAP1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,152,63,10
CONTROL "Port 2 Multitap",IDC_MULTITAP2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,164,63,10 CONTROL "Port 2 Multitap",IDC_MULTITAP2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,164,63,10
CONTROL "Multiple bindings",IDC_MULTIPLE_BINDING,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,176,63,10
CONTROL "",IDC_PAD_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | WS_TABSTOP,81,151,183,48,WS_EX_CLIENTEDGE CONTROL "",IDC_PAD_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | WS_TABSTOP,81,151,183,48,WS_EX_CLIENTEDGE
COMBOBOX IDC_PAD_TYPE,270,151,140,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_PAD_TYPE,270,151,140,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Use analog mode if possible - PS1 only",IDC_ANALOG_START1, CONTROL "Use analog mode if possible",IDC_ANALOG_START1,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,270,168,137,10 "Button",BS_AUTOCHECKBOX | WS_TABSTOP,270,168,137,10
GROUPBOX "Device Diagnostics",IDC_STATIC,7,207,201,72 GROUPBOX "Device Diagnostics",IDC_STATIC,7,207,201,72
CONTROL "",IDC_DIAG_LIST,"SysListView32",LVS_LIST | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_VSCROLL | WS_TABSTOP,14,217,187,57,WS_EX_CLIENTEDGE CONTROL "",IDC_DIAG_LIST,"SysListView32",LVS_LIST | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_VSCROLL | WS_TABSTOP,14,217,187,57,WS_EX_CLIENTEDGE
GROUPBOX "Hacks",IDC_STATIC,216,207,201,46 GROUPBOX "Hacks and advanced features",IDC_STATIC,216,207,201,46
CONTROL "Send escape on window close",IDC_CLOSE_HACK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,223,217,113,10 CONTROL "Exit emulator on window close",IDC_CLOSE_HACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,223,217,112,10
CONTROL "Exit emulator on window close",IDC_CLOSE_HACK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,223,228,112,10
CONTROL "Safe fullscreen exit on escape",IDC_ESCAPE_FULLSCREEN_HACK, CONTROL "Safe fullscreen exit on escape",IDC_ESCAPE_FULLSCREEN_HACK,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,223,239,112,10 "Button",BS_AUTOCHECKBOX | WS_TABSTOP,223,228,112,10
CONTROL "Disable screensaver",IDC_DISABLE_SCREENSAVER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,223,239,112,10
CONTROL "Save state # in title",IDC_SAVE_STATE_TITLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,336,217,79,10 CONTROL "Save state # in title",IDC_SAVE_STATE_TITLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,336,217,79,10
CONTROL "Guitar Hero 2 Hack",IDC_GH2_HACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,336,228,76,10 CONTROL "Guitar Hero 2 Hack",IDC_GH2_HACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,336,228,79,10
CONTROL "L3 Toggles Turbo",IDC_TURBO_KEY_HACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,336,239,70,10 CONTROL "Enable logging",IDC_DEBUG_FILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,336,239,79,10
PUSHBUTTON "Load Bindings",ID_LOAD,283,259,62,15 PUSHBUTTON "Load Bindings",ID_LOAD,283,259,62,15
PUSHBUTTON "Save Bindings",ID_SAVE,355,259,62,15 PUSHBUTTON "Save Bindings",ID_SAVE,355,259,62,15
END END
@ -481,6 +570,14 @@ BEGIN
BOTTOMMARGIN, 311 BOTTOMMARGIN, 311
END END
IDD_CONFIG_NEGCON, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 417
TOPMARGIN, 7
BOTTOMMARGIN, 311
END
IDD_GENERAL, DIALOG IDD_GENERAL, DIALOG
BEGIN BEGIN
LEFTMARGIN, 7 LEFTMARGIN, 7

View File

@ -1,5 +1,5 @@
/* LilyPad - Pad plugin for PS2 Emulator /* LilyPad - Pad plugin for PS2 Emulator
* Copyright (C) 2002-2014 PCSX2 Dev Team/ChickenLiver * Copyright (C) 2002-2017 PCSX2 Dev Team/ChickenLiver
* *
* PCSX2 is free software: you can redistribute it and/or modify it under the * PCSX2 is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free * terms of the GNU Lesser General Public License as published by the Free
@ -99,7 +99,7 @@ void DeleteBinding(int port, int slot, Device *dev, ForceFeedbackBinding *b)
dev->pads[port][slot][padtype].numFFBindings--; dev->pads[port][slot][padtype].numFFBindings--;
} }
int BindCommand(Device *dev, unsigned int uid, unsigned int port, unsigned int slot, unsigned int padtype, int command, int sensitivity, int turbo, int deadZone) int BindCommand(Device *dev, unsigned int uid, unsigned int port, unsigned int slot, unsigned int padtype, int command, int sensitivity, int rapidFire, int deadZone)
{ {
// Checks needed because I use this directly when loading bindings. // Checks needed because I use this directly when loading bindings.
if (port > 1 || slot > 3 || padtype >= numPadTypes) if (port > 1 || slot > 3 || padtype >= numPadTypes)
@ -136,7 +136,7 @@ int BindCommand(Device *dev, unsigned int uid, unsigned int port, unsigned int s
p->numBindings++; p->numBindings++;
b->command = command; b->command = command;
b->controlIndex = controlIndex; b->controlIndex = controlIndex;
b->turbo = turbo; b->rapidFire = rapidFire;
b->sensitivity = sensitivity; b->sensitivity = sensitivity;
b->deadZone = deadZone; b->deadZone = deadZone;
// Where it appears in listview. // Where it appears in listview.
@ -214,7 +214,6 @@ const GeneralSettingsBool BoolOptionsInfo[] = {
{L"Save State in Title", 0 /*IDC_SAVE_STATE_TITLE*/, 0}, //No longer required, PCSX2 now handles it - avih 2011-05-17 {L"Save State in Title", 0 /*IDC_SAVE_STATE_TITLE*/, 0}, //No longer required, PCSX2 now handles it - avih 2011-05-17
{L"GH2", 0 /*IDC_GH2_HACK*/, 0}, {L"GH2", 0 /*IDC_GH2_HACK*/, 0},
{L"Turbo Key Hack", 0 /*IDC_TURBO_KEY_HACK*/, 0},
}; };
void CALLBACK PADsetSettingsDir(const char *dir) void CALLBACK PADsetSettingsDir(const char *dir)
@ -229,7 +228,7 @@ int SaveSettings(wchar_t *file = 0)
for (size_t i = 0; i < sizeof(BoolOptionsInfo) / sizeof(BoolOptionsInfo[0]); i++) { for (size_t i = 0; i < sizeof(BoolOptionsInfo) / sizeof(BoolOptionsInfo[0]); i++) {
cfg.WriteBool(L"General Settings", BoolOptionsInfo[i].name, config.bools[i]); cfg.WriteBool(L"General Settings", BoolOptionsInfo[i].name, config.bools[i]);
} }
cfg.WriteInt(L"General Settings", L"Close Hacks", config.closeHacks); cfg.WriteInt(L"General Settings", L"Close Hack", config.closeHack);
cfg.WriteInt(L"General Settings", L"Keyboard Mode", config.keyboardApi); cfg.WriteInt(L"General Settings", L"Keyboard Mode", config.keyboardApi);
cfg.WriteInt(L"General Settings", L"Mouse Mode", config.mouseApi); cfg.WriteInt(L"General Settings", L"Mouse Mode", config.mouseApi);
@ -277,7 +276,7 @@ int SaveSettings(wchar_t *file = 0)
Binding *b = dev->pads[port][slot][padtype].bindings + j; Binding *b = dev->pads[port][slot][padtype].bindings + j;
VirtualControl *c = &dev->virtualControls[b->controlIndex]; VirtualControl *c = &dev->virtualControls[b->controlIndex];
wsprintfW(temp, L"Binding %i", bindingCount++); wsprintfW(temp, L"Binding %i", bindingCount++);
wsprintfW(temp2, L"0x%08X, %i, %i, %i, %i, %i, %i, %i", c->uid, port, b->command, b->sensitivity, b->turbo, slot, b->deadZone, padtype); wsprintfW(temp2, L"0x%08X, %i, %i, %i, %i, %i, %i, %i", c->uid, port, b->command, b->sensitivity, b->rapidFire, slot, b->deadZone, padtype);
cfg.WriteStr(id, temp, temp2); cfg.WriteStr(id, temp, temp2);
} }
@ -319,10 +318,7 @@ int LoadSettings(int force, wchar_t *file)
config.bools[i] = cfg.ReadBool(L"General Settings", BoolOptionsInfo[i].name, BoolOptionsInfo[i].defaultValue); config.bools[i] = cfg.ReadBool(L"General Settings", BoolOptionsInfo[i].name, BoolOptionsInfo[i].defaultValue);
} }
config.closeHack = (u8)cfg.ReadInt(L"General Settings", L"Close Hack");
config.closeHacks = (u8)cfg.ReadInt(L"General Settings", L"Close Hacks");
if (config.closeHacks & 1)
config.closeHacks &= ~2;
config.keyboardApi = (DeviceAPI)cfg.ReadInt(L"General Settings", L"Keyboard Mode", LNX_KEYBOARD); config.keyboardApi = (DeviceAPI)cfg.ReadInt(L"General Settings", L"Keyboard Mode", LNX_KEYBOARD);
if (!config.keyboardApi) if (!config.keyboardApi)
@ -379,7 +375,7 @@ int LoadSettings(int force, wchar_t *file)
} }
last = 1; last = 1;
unsigned int uid; unsigned int uid;
int port, command, sensitivity, turbo, slot = 0, deadZone = 0, padtype = 0; int port, command, sensitivity, rapidFire, slot = 0, deadZone = 0, padtype = 0;
int w = 0; int w = 0;
char string[1000]; char string[1000];
while (temp2[w]) { while (temp2[w]) {
@ -387,7 +383,7 @@ int LoadSettings(int force, wchar_t *file)
w++; w++;
} }
string[w] = 0; string[w] = 0;
int len = sscanf(string, " %u , %i , %i , %i , %i , %i , %i , %i", &uid, &port, &command, &sensitivity, &turbo, &slot, &deadZone, &padtype); int len = sscanf(string, " %u , %i , %i , %i , %i , %i , %i , %i", &uid, &port, &command, &sensitivity, &rapidFire, &slot, &deadZone, &padtype);
if (len >= 5 && type) { if (len >= 5 && type) {
VirtualControl *c = dev->GetVirtualControl(uid); VirtualControl *c = dev->GetVirtualControl(uid);
if (!c) if (!c)
@ -401,7 +397,7 @@ int LoadSettings(int force, wchar_t *file)
padtype = 1; padtype = 1;
} }
} }
BindCommand(dev, uid, port, slot, padtype, command, sensitivity, turbo, deadZone); BindCommand(dev, uid, port, slot, padtype, command, sensitivity, rapidFire, deadZone);
} }
} }
} }

View File

@ -1,5 +1,5 @@
/* LilyPad - Pad plugin for PS2 Emulator /* LilyPad - Pad plugin for PS2 Emulator
* Copyright (C) 2016 PCSX2 Dev Team/ChickenLiver * Copyright (C) 2016-2017 PCSX2 Dev Team/ChickenLiver
* *
* PCSX2 is free software: you can redistribute it and/or modify it under the * PCSX2 is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free * terms of the GNU Lesser General Public License as published by the Free
@ -51,7 +51,8 @@ LPWSTR dialog_message(int ID, bool *updateText)
L"\"Dualshock 2\" emulates the default PS2 controller for use in both PS1 and PS2 games.\n\n" L"\"Dualshock 2\" emulates the default PS2 controller for use in both PS1 and PS2 games.\n\n"
L"\"Guitar\" emulates a PS2 controller used in the Guitar Hero and Rock Band series of games.\n\n" L"\"Guitar\" emulates a PS2 controller used in the Guitar Hero and Rock Band series of games.\n\n"
L"\"Pop'n Music controller\" emulates a PS2 controller used exclusively in the Japanese Pop'n Music series of games.\n\n" L"\"Pop'n Music controller\" emulates a PS2 controller used exclusively in the Japanese Pop'n Music series of games.\n\n"
L"\"PS1 Mouse\" emulates the Playstation Mouse. This controller can only be used in a number of PS1 games like \"Command & Conquer: Red Alert\" and \"Myst\"."; L"\"PS1 Mouse\" emulates the Playstation Mouse. This controller can only be used in a number of PS1 games like \"Command & Conquer: Red Alert\" and \"Myst\".\n\n"
L"\"neGcon\" emulates a controller that can be used in a number of PS1 games and PS2 games like the \"Ridge Racer\" and \"Ace Combat\" series.";
case IDC_ANALOG_START1: case IDC_ANALOG_START1:
return L"Automatically switch a pad from digital mode to analog mode whenever a pad is set to digital mode, if the pad's mode is not locked." return L"Automatically switch a pad from digital mode to analog mode whenever a pad is set to digital mode, if the pad's mode is not locked."
L"This removes the need for manually enabling analog mode with a press of the analog button for games that support, but do not automatically enable analog mode.\n\n" L"This removes the need for manually enabling analog mode with a press of the analog button for games that support, but do not automatically enable analog mode.\n\n"
@ -62,6 +63,8 @@ LPWSTR dialog_message(int ID, bool *updateText)
L"Double-click a device in the list or right-click it and select \"Test Device\" to display a continuously updated list of the state of all inputs on the selected device.\n" L"Double-click a device in the list or right-click it and select \"Test Device\" to display a continuously updated list of the state of all inputs on the selected device.\n"
L"Use this option to check if all the inputs on a controller function properly.\n\n" L"Use this option to check if all the inputs on a controller function properly.\n\n"
L"Right-click and select \"Refresh\" to update the list of devices in case a recently connected device has not shown up yet."; L"Right-click and select \"Refresh\" to update the list of devices in case a recently connected device has not shown up yet.";
case IDC_G_XI:
return L"Xbox 360 controllers(and devices imitating it) only";
// Pad tabs // Pad tabs
case IDC_BINDINGS_LIST: case IDC_BINDINGS_LIST:
return L"Shows a list of currently bound inputs of the selected Pad.\n\n" return L"Shows a list of currently bound inputs of the selected Pad.\n\n"
@ -87,9 +90,8 @@ LPWSTR dialog_message(int ID, bool *updateText)
L"This option is useful when analog mode is enabled in a game that does not support it, as this causes the game to not recognise any input or to not even detect a controller.\n\n" L"This option is useful when analog mode is enabled in a game that does not support it, as this causes the game to not recognise any input or to not even detect a controller.\n\n"
L"This option can also be used to enable analog mode in games that support, but do not automatically enable analog mode.\n\n" L"This option can also be used to enable analog mode in games that support, but do not automatically enable analog mode.\n\n"
L"Note: Analog mode enables the analog sticks to function on a DualShock controller, while in digital mode it behaves as an original PlayStation controller.\n\n"; L"Note: Analog mode enables the analog sticks to function on a DualShock controller, while in digital mode it behaves as an original PlayStation controller.\n\n";
case ID_IGNORE: case ID_TURBO_KEY:
return L"Blocks the assigned keyboard button and does not pass it on to PCSX2. It currently cannot block the windows key (for unknown reasons).\n\n" return L"Sets a key to send a TAB press to the emulator, which toggles Turbo mode(200% speed) in PCSX2.";
L"Ignored keys are listed with pad 1's bindings. You do not have to configure ignored keys again when you change the keyboard input mode.";
case ID_LOCK_ALL_INPUT: case ID_LOCK_ALL_INPUT:
return L"Locks the current state of the pad. Any further input is handled normally, but the initial pad state is the locked state instead of a state with no buttons pressed. " return L"Locks the current state of the pad. Any further input is handled normally, but the initial pad state is the locked state instead of a state with no buttons pressed. "
L"Pressing it again releases the old pad state, if the old pad state had any keys pressed. Otherwise, it's released automatically."; L"Pressing it again releases the old pad state, if the old pad state had any keys pressed. Otherwise, it's released automatically.";
@ -99,7 +101,7 @@ LPWSTR dialog_message(int ID, bool *updateText)
case ID_LOCK_BUTTONS: case ID_LOCK_BUTTONS:
return L"Locks the current state of the buttons. Pressing this when all input is locked unlocks only the buttons. " return L"Locks the current state of the buttons. Pressing this when all input is locked unlocks only the buttons. "
L"Pressing it again will lock them again, keeping the d-pad and analog sticks locked."; L"Pressing it again will lock them again, keeping the d-pad and analog sticks locked.";
case IDC_TURBO: case IDC_RAPID_FIRE:
return L"Automatically presses/releases the input every other time the button is polled."; return L"Automatically presses/releases the input every other time the button is polled.";
case IDC_FLIP: case IDC_FLIP:
return L"Inverts a button or axis, making down up and up down."; return L"Inverts a button or axis, making down up and up down.";

View File

@ -14,7 +14,7 @@
#define IDR_INI1 111 #define IDR_INI1 111
#define IDD_CONFIG_POPN 112 #define IDD_CONFIG_POPN 112
#define IDD_CONFIG_PS1_MOUSE 113 #define IDD_CONFIG_PS1_MOUSE 113
#define IDC_CLOSE_HACK1 1099 #define IDD_CONFIG_NEGCON 114
#define IDC_KB_DISABLE 1100 #define IDC_KB_DISABLE 1100
#define IDC_KB_DI 1101 #define IDC_KB_DI 1101
#define IDC_KB_WM 1102 #define IDC_KB_WM 1102
@ -27,7 +27,7 @@
#define IDC_G_XI 1109 #define IDC_G_XI 1109
#define IDC_G_DI 1110 #define IDC_G_DI 1110
#define IDC_G_DS3 1111 #define IDC_G_DS3 1111
#define IDC_CLOSE_HACK2 1112 #define IDC_CLOSE_HACK 1112
#define IDC_DEBUG_FILE 1113 #define IDC_DEBUG_FILE 1113
#define IDC_GUITAR1 1114 #define IDC_GUITAR1 1114
#define IDC_ANALOG_START1 1115 #define IDC_ANALOG_START1 1115
@ -40,7 +40,6 @@
#define IDC_MULTIPLE_BINDING 1122 #define IDC_MULTIPLE_BINDING 1122
#define IDC_FORCE_HIDE 1124 #define IDC_FORCE_HIDE 1124
#define IDC_GH2_HACK 1125 #define IDC_GH2_HACK 1125
#define IDC_TURBO_KEY_HACK 1128
#define IDC_SAVE_STATE_TITLE 1129 #define IDC_SAVE_STATE_TITLE 1129
#define IDC_PAD_LIST 1130 #define IDC_PAD_LIST 1130
#define IDC_COMBO1 1131 #define IDC_COMBO1 1131
@ -51,7 +50,7 @@
#define IDC_AXIS_DIRECTION 0x1002 #define IDC_AXIS_DIRECTION 0x1002
#define IDC_AXIS_CONTROL 0x1003 #define IDC_AXIS_CONTROL 0x1003
#define IDC_AXIS_SENSITIVITY 0x1004 #define IDC_AXIS_SENSITIVITY 0x1004
#define IDC_TURBO 0x1005 #define IDC_RAPID_FIRE 0x1005
#define IDC_AXIS_DEVICE 0x1006 #define IDC_AXIS_DEVICE 0x1006
#define ID_SENSITIVITY 0x1007 #define ID_SENSITIVITY 0x1007
#define IDC_SLIDER_DEADZONE 0x1008 #define IDC_SLIDER_DEADZONE 0x1008
@ -96,14 +95,16 @@
#define ID_RSTICK_DOWN 0x1116 #define ID_RSTICK_DOWN 0x1116
#define ID_RSTICK_LEFT 0x1117 #define ID_RSTICK_LEFT 0x1117
#define ID_ANALOG 0x1118 #define ID_ANALOG 0x1118
#define ID_IGNORE 0x1119 #define ID_EXCLUDE 0x1119
#define IDC_FORCEFEEDBACK 0x111A #define ID_TURBO_KEY 0x111A
#define IDC_FORCEFEEDBACK_FUNCTION 0x111B #define IDC_FORCEFEEDBACK 0x1130
#define ID_BIG_MOTOR 0x111C #define IDC_FORCEFEEDBACK_FUNCTION 0x1131
#define ID_SMALL_MOTOR 0x111D #define ID_BIG_MOTOR 0x1132
#define ID_FORCEFEEDBACK_BOX 0x111E #define ID_SMALL_MOTOR 0x1133
#define IDC_CONFIGURE_ON_BIND 0x111F #define ID_FORCEFEEDBACK_BOX 0x1134
#define IDC_DEVICE_SELECT 0x1120 #define IDC_CONFIGURE_ON_BIND 0x1135
#define IDC_DEVICE_SELECT 0x1136
#define IDC_FACE_ANALOG 0x1137
#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