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 ctrl = false;
|
||||||
bool shift = false;
|
bool shift = false;
|
||||||
bool alt= false;
|
bool alt= false;
|
||||||
|
bool direct = false;
|
||||||
unsigned int keyval = 0;
|
unsigned int keyval = 0;
|
||||||
char *key;
|
char *key;
|
||||||
|
|
||||||
|
if (!strchr (substr, '+'))
|
||||||
|
direct = true;
|
||||||
|
|
||||||
key = strtok (substr, "+");
|
key = strtok (substr, "+");
|
||||||
while (key)
|
while (key)
|
||||||
{
|
{
|
||||||
if (strstr (key, "Alt"))
|
if (strstr (key, "Alt") && !direct)
|
||||||
alt = true;
|
alt = true;
|
||||||
else if (strstr (key, "Ctrl"))
|
else if (strstr (key, "Ctrl") && !direct)
|
||||||
ctrl = true;
|
ctrl = true;
|
||||||
else if (strstr (key, "Shift"))
|
else if (strstr (key, "Shift") && !direct)
|
||||||
shift = true;
|
shift = true;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue