From: Wolfgang Becker Date: Tue, 19 Aug 2014 17:42:37 +0000 (+0200) Subject: Update keys for cheat menu and console only when items are enabled. Fixes #1062. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=eaa1442b14b723903bf991d5356a660913b961ed;p=supertux.git Update keys for cheat menu and console only when items are enabled. Fixes #1062. --- 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))); }