projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed changing key bindings if customization aborted by "Escape" key
[rocksndiamonds.git]
/
src
/
screens.c
diff --git
a/src/screens.c
b/src/screens.c
index e6397b5c6532a66e33ba9a46fde9accd84837853..33df999e188698611fa0a938fe74939d8a4a8dcb 100644
(file)
--- a/
src/screens.c
+++ b/
src/screens.c
@@
-6497,11
+6497,13
@@
static boolean CustomizeKeyboardMain(int player_nr)
{
Key key = GetEventKey((KeyEvent *)&event, FALSE);
{
Key key = GetEventKey((KeyEvent *)&event, FALSE);
+ /* press 'Escape' to abort and keep the old key bindings */
if (key == KSYM_Escape)
{
FadeSkipNextFadeIn();
finished = TRUE;
if (key == KSYM_Escape)
{
FadeSkipNextFadeIn();
finished = TRUE;
+
break;
}
break;
}
@@
-6563,8
+6565,9
@@
static boolean CustomizeKeyboardMain(int player_nr)
BackToFront();
}
BackToFront();
}
- /* write new key bindings back to player setup */
- setup.input[player_nr].key = custom_key;
+ /* write new key bindings back to player setup, if successfully finished */
+ if (success)
+ setup.input[player_nr].key = custom_key;
return success;
}
return success;
}