summaryrefslogtreecommitdiff
path: root/plugins/dfinput/cfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/dfinput/cfg.c')
-rwxr-xr-xplugins/dfinput/cfg.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/dfinput/cfg.c b/plugins/dfinput/cfg.c
index 1c3ef34d..c8158300 100755
--- a/plugins/dfinput/cfg.c
+++ b/plugins/dfinput/cfg.c
@@ -123,6 +123,7 @@ static void SetDefaultConfig() {
g.cfg.E.EmuDef[EMU_LOADSTATE].EmuKeyEvent = XK_F3;
g.cfg.E.EmuDef[EMU_INCREMENTSTATE].EmuKeyEvent = XK_F2;
g.cfg.E.EmuDef[EMU_SCREENSHOT].EmuKeyEvent = XK_F8;
+ g.cfg.E.EmuDef[EMU_ESCAPE].EmuKeyEvent = XK_Escape;
}
void LoadPADConfig() {
@@ -184,6 +185,11 @@ void LoadPADConfig() {
g.cfg.E.EmuDef[EMU_INCREMENTSTATE].Mapping.Key = a;
g.cfg.E.EmuDef[EMU_INCREMENTSTATE].Mapping.JoyEvType = b;
g.cfg.E.EmuDef[EMU_INCREMENTSTATE].Mapping.J.d = c;
+ } else if (strncmp(buf, "EMU_ESCAPE=", 11) == 0) {
+ sscanf(buf, "EMU_ESCAPE=%d,%d,%d", &a, &b, &c);
+ g.cfg.E.EmuDef[EMU_ESCAPE].Mapping.Key = a;
+ g.cfg.E.EmuDef[EMU_ESCAPE].Mapping.JoyEvType = b;
+ g.cfg.E.EmuDef[EMU_ESCAPE].Mapping.J.d = c;
} else if (strncmp(buf, "Select=", 7) == 0) {
sscanf(buf, "Select=%d,%d,%d", &a, &b, &c);
g.cfg.PadDef[current].KeyDef[DKEY_SELECT].Key = a;
@@ -415,5 +421,8 @@ void SavePADConfig() {
fprintf(fp, "EMU_SCREENSHOT=%d,%d,%d\n", g.cfg.E.EmuDef[EMU_SCREENSHOT].Mapping.Key,
g.cfg.E.EmuDef[EMU_SCREENSHOT].Mapping.JoyEvType,
g.cfg.E.EmuDef[EMU_SCREENSHOT].Mapping.J.d);
+ fprintf(fp, "EMU_ESCAPE=%d,%d,%d\n", g.cfg.E.EmuDef[EMU_ESCAPE].Mapping.Key,
+ g.cfg.E.EmuDef[EMU_ESCAPE].Mapping.JoyEvType,
+ g.cfg.E.EmuDef[EMU_ESCAPE].Mapping.J.d);
fclose(fp);
}