From eaa1442b14b723903bf991d5356a660913b961ed Mon Sep 17 00:00:00 2001 From: Wolfgang Becker Date: Tue, 19 Aug 2014 19:42:37 +0200 Subject: [PATCH] Update keys for cheat menu and console only when items are enabled. Fixes #1062. --- src/supertux/menu/keyboard_menu.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/supertux/menu/keyboard_menu.cpp b/src/supertux/menu/keyboard_menu.cpp index 9babe7a5f..e88374c52 100644 --- a/src/supertux/menu/keyboard_menu.cpp +++ b/src/supertux/menu/keyboard_menu.cpp @@ -127,11 +127,13 @@ KeyboardMenu::refresh() .change_input(get_key_name(kbd_cfg.reversemap_key(Controller::PEEK_UP))); get_item_by_id((int) Controller::PEEK_DOWN) .change_input(get_key_name(kbd_cfg.reversemap_key(Controller::PEEK_DOWN))); - get_item_by_id((int) Controller::CHEAT_MENU) - .change_input(get_key_name(kbd_cfg.reversemap_key(Controller::CHEAT_MENU))); - if (g_config->console_enabled) - { + if (g_config->developer_mode) { + get_item_by_id((int) Controller::CHEAT_MENU) + .change_input(get_key_name(kbd_cfg.reversemap_key(Controller::CHEAT_MENU))); + } + + if (g_config->developer_mode || g_config->console_enabled) { get_item_by_id((int) Controller::CONSOLE).change_input(get_key_name( kbd_cfg.reversemap_key(Controller::CONSOLE))); } -- 2.11.0