mirror of https://github.com/snes9xgit/snes9x.git
GTK: Fix reading of direct modifiers from config.
This commit is contained in:
parent
dd4614dada
commit
f65b876382
|
@ -172,17 +172,21 @@ Binding::Binding (const char *raw_string)
|
|||
bool ctrl = false;
|
||||
bool shift = false;
|
||||
bool alt= false;
|
||||
bool direct = false;
|
||||
unsigned int keyval = 0;
|
||||
char *key;
|
||||
|
||||
if (!strchr (substr, '+'))
|
||||
direct = true;
|
||||
|
||||
key = strtok (substr, "+");
|
||||
while (key)
|
||||
{
|
||||
if (strstr (key, "Alt"))
|
||||
if (strstr (key, "Alt") && !direct)
|
||||
alt = true;
|
||||
else if (strstr (key, "Ctrl"))
|
||||
else if (strstr (key, "Ctrl") && !direct)
|
||||
ctrl = true;
|
||||
else if (strstr (key, "Shift"))
|
||||
else if (strstr (key, "Shift") && !direct)
|
||||
shift = true;
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue