lilypad: Some tweaks and fixes.

Hide all ps1 emu options instead of disable. Some options still got
enabled when they shouldn't have so just hide everything. This way we
avoid adding extra code, plus the gui looks cleaner.

Disable ini read/write for Analog ps1 mode, the feature was accidentaly
enabled for pcsx2. By looking at the code it should only be enabled for
ps1 combatibility mode. Also hide the option for pcsx2 as well.

Move around some of the hacks and advanced options to reflect the recent
changes.
This commit is contained in:
lightningterror 2019-02-09 14:42:57 +01:00
parent 7406e13028
commit c898c13eb9
2 changed files with 23 additions and 23 deletions

View File

@ -892,7 +892,9 @@ int SaveSettings(wchar_t *file = 0)
wchar_t temp[50]; wchar_t temp[50];
wsprintf(temp, L"Pad %i %i", port, slot); wsprintf(temp, L"Pad %i %i", port, slot);
WritePrivateProfileInt(temp, L"Mode", config.padConfigs[port][slot].type, file); WritePrivateProfileInt(temp, L"Mode", config.padConfigs[port][slot].type, file);
noError &= WritePrivateProfileInt(temp, L"Auto Analog", config.padConfigs[port][slot].autoAnalog, file); // PS1 Emu compatibility code, no need to run it on pcsx2.
if (!ps2e)
noError &= WritePrivateProfileInt(temp, L"Auto Analog", config.padConfigs[port][slot].autoAnalog, file);
} }
} }
@ -1008,7 +1010,9 @@ int LoadSettings(int force, wchar_t *file)
wchar_t temp[50]; wchar_t temp[50];
wsprintf(temp, L"Pad %i %i", port, slot); wsprintf(temp, L"Pad %i %i", port, slot);
config.padConfigs[port][slot].type = (PadType)GetPrivateProfileInt(temp, L"Mode", Dualshock2Pad, file); config.padConfigs[port][slot].type = (PadType)GetPrivateProfileInt(temp, L"Mode", Dualshock2Pad, file);
config.padConfigs[port][slot].autoAnalog = GetPrivateProfileBool(temp, L"Auto Analog", 0, file); // PS1 Emu compatibility code, no need to run it on pcsx2.
if (!ps2e)
config.padConfigs[port][slot].autoAnalog = GetPrivateProfileBool(temp, L"Auto Analog", 0, file);
} }
} }
@ -2305,11 +2309,11 @@ INT_PTR CALLBACK GeneralDialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, L
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 disables 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
const UINT *toDisable = PCSX2_disabledWidgets(); const UINT *toDisable = PCSX2_disabledWidgets();
while (toDisable && *toDisable) { while (toDisable && *toDisable) {
EnableWindow(GetDlgItem(hWnd, *toDisable), 0); ShowWindow(GetDlgItem(hWnd, *toDisable), 0);
toDisable++; toDisable++;
} }
} }

View File

@ -89,7 +89,7 @@ BEGIN
PUSHBUTTON "Down",ID_RSTICK_DOWN,348,191,30,15 PUSHBUTTON "Down",ID_RSTICK_DOWN,348,191,30,15
// Force Feedback bindings: // Force Feedback bindings:
GROUPBOX "Add Force Feedback Effect",ID_FORCEFEEDBACK_BOX,196,215,221,30 GROUPBOX "Add Force Feedback Effect",ID_FORCEFEEDBACK_BOX,196,215,221,30
COMBOBOX IDC_FORCEFEEDBACK,202,225,96,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_FORCEFEEDBACK,202,225,96,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Big Motor",ID_BIG_MOTOR,304,224,50,14 PUSHBUTTON "Big Motor",ID_BIG_MOTOR,304,224,50,14
PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,360,224,50,14 PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,360,224,50,14
// Input options: // Input options:
@ -173,7 +173,7 @@ BEGIN
PUSHBUTTON "White R",ID_L2,372,69,43,15 PUSHBUTTON "White R",ID_L2,372,69,43,15
// Force Feedback bindings: // Force Feedback bindings:
GROUPBOX "Add Force Feedback Effect",ID_FORCEFEEDBACK_BOX,196,215,221,30 GROUPBOX "Add Force Feedback Effect",ID_FORCEFEEDBACK_BOX,196,215,221,30
COMBOBOX IDC_FORCEFEEDBACK,202,225,96,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_FORCEFEEDBACK,202,225,96,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Big Motor",ID_BIG_MOTOR,304,224,50,14 PUSHBUTTON "Big Motor",ID_BIG_MOTOR,304,224,50,14
PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,360,224,50,14 PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,360,224,50,14
// Input options: // Input options:
@ -257,7 +257,7 @@ BEGIN
PUSHBUTTON "Strum Bar Down",ID_DPAD_DOWN,336,191,58,15 PUSHBUTTON "Strum Bar Down",ID_DPAD_DOWN,336,191,58,15
// Force Feedback bindings: // Force Feedback bindings:
GROUPBOX "Add Force Feedback Effect",ID_FORCEFEEDBACK_BOX,196,215,221,30 GROUPBOX "Add Force Feedback Effect",ID_FORCEFEEDBACK_BOX,196,215,221,30
COMBOBOX IDC_FORCEFEEDBACK,202,225,96,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_FORCEFEEDBACK,202,225,96,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Big Motor",ID_BIG_MOTOR,304,224,50,14 PUSHBUTTON "Big Motor",ID_BIG_MOTOR,304,224,50,14
PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,360,224,50,14 PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,360,224,50,14
// Input options: // Input options:
@ -339,7 +339,7 @@ BEGIN
PUSHBUTTON "Y-axis Down",ID_LSTICK_DOWN,283,132,45,15 PUSHBUTTON "Y-axis Down",ID_LSTICK_DOWN,283,132,45,15
// Force Feedback bindings: // Force Feedback bindings:
GROUPBOX "Add Force Feedback Effect",ID_FORCEFEEDBACK_BOX,196,215,221,30 GROUPBOX "Add Force Feedback Effect",ID_FORCEFEEDBACK_BOX,196,215,221,30
COMBOBOX IDC_FORCEFEEDBACK,202,225,96,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_FORCEFEEDBACK,202,225,96,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Big Motor",ID_BIG_MOTOR,304,224,50,14 PUSHBUTTON "Big Motor",ID_BIG_MOTOR,304,224,50,14
PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,360,224,50,14 PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,360,224,50,14
// Input options: // Input options:
@ -403,7 +403,7 @@ BEGIN
PUSHBUTTON "Mouse",ID_MOUSE,207,158,34,15 PUSHBUTTON "Mouse",ID_MOUSE,207,158,34,15
// Force Feedback bindings: // Force Feedback bindings:
GROUPBOX "Add Force Feedback Effect",ID_FORCEFEEDBACK_BOX,196,215,221,30 GROUPBOX "Add Force Feedback Effect",ID_FORCEFEEDBACK_BOX,196,215,221,30
COMBOBOX IDC_FORCEFEEDBACK,202,225,96,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_FORCEFEEDBACK,202,225,96,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Big Motor",ID_BIG_MOTOR,304,224,50,14 PUSHBUTTON "Big Motor",ID_BIG_MOTOR,304,224,50,14
PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,360,224,50,14 PUSHBUTTON "Small Motor",ID_SMALL_MOTOR,360,224,50,14
// Input options: // Input options:
@ -452,8 +452,7 @@ BEGIN
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",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,85 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
@ -465,22 +464,19 @@ BEGIN
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, CONTROL "Multiple bindings",IDC_MULTIPLE_BINDING, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,176,63,10
"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,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Use analog mode if possible",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 and advanced features",IDC_STATIC,216,207,201,46 GROUPBOX "Hacks and advanced features",IDC_STATIC,216,207,201,46
CONTROL "Exit emulator on window close",IDC_CLOSE_HACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,223,217,112,10 CONTROL "Enable logging",IDC_DEBUG_FILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,223,217,79,10
CONTROL "Safe fullscreen exit on escape",IDC_ESCAPE_FULLSCREEN_HACK, CONTROL "Guitar Hero 2 Hack",IDC_GH2_HACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,223,228,79,10
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,223,228,112,10 CONTROL "Save state # in title",IDC_SAVE_STATE_TITLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,223,239,79,10
CONTROL "Disable screensaver",IDC_DISABLE_SCREENSAVER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,223,239,112,10 CONTROL "Disable screensaver",IDC_DISABLE_SCREENSAVER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,303,217,79,10
CONTROL "Save state # in title",IDC_SAVE_STATE_TITLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,336,217,79,10 CONTROL "Safe fullscreen exit on escape",IDC_ESCAPE_FULLSCREEN_HACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,303,228,112,10
CONTROL "Guitar Hero 2 Hack",IDC_GH2_HACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,336,228,79,10 CONTROL "Exit emulator on window close",IDC_CLOSE_HACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,303,239,112,10
CONTROL "Enable logging",IDC_DEBUG_FILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,336,239,79,10
PUSHBUTTON "Restore Defaults",ID_RESTORE_DEFAULTS,219,259,62,15 PUSHBUTTON "Restore Defaults",ID_RESTORE_DEFAULTS,219,259,62,15
PUSHBUTTON "Load Bindings",ID_LOAD,287,259,62,15 PUSHBUTTON "Load Bindings",ID_LOAD,287,259,62,15
PUSHBUTTON "Save Bindings",ID_SAVE,355,259,62,15 PUSHBUTTON "Save Bindings",ID_SAVE,355,259,62,15