mirror of https://github.com/PCSX2/pcsx2.git
LilyPad:
Added a new option to the hacks section that sends a tabulator key press to PCSX2. This toggles the turbo mode of the emulator, so users with pads don't have to reach out to the keyboard anymore when they want to switch between normal and turbo gameplay :) Note: I choose R3 for now since most games don't use that button. This could be made configurable in the future though. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4916 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
d27f1877fc
commit
45ae2cb4e8
|
@ -60,6 +60,7 @@ const GeneralSettingsBool BoolOptionsInfo[] = {
|
||||||
|
|
||||||
{L"Save State in Title", IDC_SAVE_STATE_TITLE, 0}, //No longer required, PCSX2 now handles it - avih 2011-05-17
|
{L"Save State in Title", IDC_SAVE_STATE_TITLE, 0}, //No longer required, PCSX2 now handles it - avih 2011-05-17
|
||||||
{L"GH2", IDC_GH2_HACK, 0},
|
{L"GH2", IDC_GH2_HACK, 0},
|
||||||
|
{L"Turbo Key Hack", IDC_TURBO_KEY_HACK, 0},
|
||||||
|
|
||||||
{L"Vista Volume", IDC_VISTA_VOLUME, 1},
|
{L"Vista Volume", IDC_VISTA_VOLUME, 1},
|
||||||
};
|
};
|
||||||
|
|
|
@ -47,6 +47,7 @@ public:
|
||||||
|
|
||||||
u8 saveStateTitle;
|
u8 saveStateTitle;
|
||||||
u8 GH2;
|
u8 GH2;
|
||||||
|
u8 turboKeyHack;
|
||||||
|
|
||||||
u8 vistaVolume;
|
u8 vistaVolume;
|
||||||
};
|
};
|
||||||
|
|
|
@ -347,6 +347,16 @@ void AddForce(ButtonSum *sum, u8 cmd, int delta = 255) {
|
||||||
|
|
||||||
void ProcessButtonBinding(Binding *b, ButtonSum *sum, int value) {
|
void ProcessButtonBinding(Binding *b, ButtonSum *sum, int value) {
|
||||||
if (value < b->deadZone || !value) return;
|
if (value < b->deadZone || !value) return;
|
||||||
|
|
||||||
|
if ( config.turboKeyHack == 1 ){ // send a tabulator keypress to emulator
|
||||||
|
if ( b->command == 0x12 ){ // R3 button
|
||||||
|
static unsigned int LastCheck = 0;
|
||||||
|
unsigned int t = timeGetTime();
|
||||||
|
if (t - LastCheck < 300 ) return;
|
||||||
|
QueueKeyEvent(VK_TAB, KEYPRESS);
|
||||||
|
LastCheck = t;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int sensitivity = b->sensitivity;
|
int sensitivity = b->sensitivity;
|
||||||
if (sensitivity < 0) {
|
if (sensitivity < 0) {
|
||||||
|
|
|
@ -255,6 +255,7 @@ BEGIN
|
||||||
CONTROL "Guitar Hero 2 Hack",IDC_GH2_HACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,336,277,76,10
|
CONTROL "Guitar Hero 2 Hack",IDC_GH2_HACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,336,277,76,10
|
||||||
PUSHBUTTON "Load Bindings",ID_LOAD,283,305,62,15
|
PUSHBUTTON "Load Bindings",ID_LOAD,283,305,62,15
|
||||||
PUSHBUTTON "Save Bindings",ID_SAVE,355,305,62,15
|
PUSHBUTTON "Save Bindings",ID_SAVE,355,305,62,15
|
||||||
|
CONTROL "R3 Toggles Turbo",IDC_TURBO_KEY_HACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,336,288,66,10
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_ABOUT DIALOGEX 0, 0, 108, 66
|
IDD_ABOUT DIALOGEX 0, 0, 108, 66
|
||||||
|
|
|
@ -8,42 +8,43 @@
|
||||||
#define IDD_CONFIG 105
|
#define IDD_CONFIG 105
|
||||||
#define IDD_CONFIG_GUITAR 106
|
#define IDD_CONFIG_GUITAR 106
|
||||||
#define IDD_PROPPAGE_LARGE 107
|
#define IDD_PROPPAGE_LARGE 107
|
||||||
#define IDC_CURSOR1 107
|
#define IDC_CURSOR1 108
|
||||||
#define IDC_ESCAPE_FULLSCREEN_HACK 107
|
#define IDC_ESCAPE_FULLSCREEN_HACK 109
|
||||||
#define IDD_DIAG 109
|
#define IDD_DIAG 110
|
||||||
#define IDC_CLOSE_HACK1 1099
|
#define IDC_CLOSE_HACK1 1099
|
||||||
#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
|
||||||
#define IDC_KB_RAW 1103
|
#define IDC_KB_RAW 1103
|
||||||
#define IDC_DISABLE_PAD1 1104
|
#define IDC_DISABLE_PAD1 1104
|
||||||
#define IDC_M_DISABLE 1106
|
#define IDC_M_DISABLE 1105
|
||||||
#define IDC_M_DI 1107
|
#define IDC_M_DI 1106
|
||||||
#define IDC_M_WM 1108
|
#define IDC_M_WM 1107
|
||||||
#define IDC_M_RAW 1109
|
#define IDC_M_RAW 1108
|
||||||
#define IDC_G_XI 1110
|
#define IDC_G_XI 1109
|
||||||
#define IDC_G_DI 1111
|
#define IDC_G_DI 1110
|
||||||
#define IDC_G_DS3 1112
|
#define IDC_G_DS3 1111
|
||||||
#define IDC_CLOSE_HACK2 1113
|
#define IDC_CLOSE_HACK2 1112
|
||||||
#define IDC_DEBUG_FILE 1114
|
#define IDC_DEBUG_FILE 1113
|
||||||
#define IDC_GUITAR1 1115
|
#define IDC_GUITAR1 1114
|
||||||
#define IDC_ANALOG_START1 1117
|
#define IDC_ANALOG_START1 1115
|
||||||
#define IDC_MULTITAP1 1118
|
#define IDC_MULTITAP1 1116
|
||||||
#define IDC_DISABLE_SCREENSAVER 1119
|
#define IDC_DISABLE_SCREENSAVER 1117
|
||||||
#define IDC_MOUSE_UNFOCUS 1120
|
#define IDC_MOUSE_UNFOCUS 1118
|
||||||
#define IDC_AXIS_BUTTONS 1121
|
#define IDC_AXIS_BUTTONS 1119
|
||||||
#define IDC_MULTITAP2 1121
|
#define IDC_MULTITAP2 1120
|
||||||
#define IDC_BACKGROUND 1122
|
#define IDC_BACKGROUND 1121
|
||||||
#define IDC_MULTIPLE_BINDING 1123
|
#define IDC_MULTIPLE_BINDING 1122
|
||||||
#define IDC_DISABLE_SCREENSAVER2 1124
|
#define IDC_DISABLE_SCREENSAVER2 1123
|
||||||
#define IDC_FORCE_HIDE 1124
|
#define IDC_FORCE_HIDE 1124
|
||||||
#define IDC_GH2_HACK 1125
|
#define IDC_GH2_HACK 1125
|
||||||
#define IDC_FORCEFEEDBACK_HACK1 1126
|
#define IDC_FORCEFEEDBACK_HACK1 1126
|
||||||
#define IDC_VISTA_VOLUME 1126
|
#define IDC_VISTA_VOLUME 1127
|
||||||
|
#define IDC_TURBO_KEY_HACK 1128
|
||||||
#define IDC_SAVE_STATE_TITLE 1129
|
#define IDC_SAVE_STATE_TITLE 1129
|
||||||
#define IDC_PAD_LIST 1133
|
#define IDC_PAD_LIST 1130
|
||||||
#define IDC_COMBO1 1134
|
#define IDC_COMBO1 1131
|
||||||
#define IDC_PAD_TYPE 1134
|
#define IDC_PAD_TYPE 1132
|
||||||
#define IDC_SLIDER1 0x1000
|
#define IDC_SLIDER1 0x1000
|
||||||
#define IDC_FLIP1 0x1001
|
#define IDC_FLIP1 0x1001
|
||||||
#define IDC_AXIS_DIRECTION 0x1002
|
#define IDC_AXIS_DIRECTION 0x1002
|
||||||
|
@ -144,9 +145,9 @@
|
||||||
//
|
//
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 112
|
#define _APS_NEXT_RESOURCE_VALUE 111
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1135
|
#define _APS_NEXT_CONTROL_VALUE 1133
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue