diff --git a/data/game_config.cfg b/data/game_config.cfg index 6c5e0c9ba5d..6dde1f7e3af 100644 --- a/data/game_config.cfg +++ b/data/game_config.cfg @@ -29,7 +29,7 @@ # title="maps/wesnoth.png" logo="misc/logo.png" - icon="wesnoth-icon.png" + icon="wesnoth-icon-small.png" title_music="main_menu.ogg" lobby_music="silence.ogg" diff --git a/src/game.cpp b/src/game.cpp index be9d2e98beb..7a535129de5 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -536,6 +536,7 @@ bool game_controller::init_video() return true; } + //NOTE will use the hardcoded icon, game_config is not ready yet image::set_wm_icon(); std::pair resolution; @@ -596,6 +597,10 @@ bool game_controller::init_config(const bool force) const config &cfg = game_config().child("game_config"); game_config::load_config(cfg ? &cfg : NULL); + + //the game_config icon may be different from the hardcoded one + image::set_wm_icon(); + hotkey::deactivate_all_scopes(); hotkey::set_scope_active(hotkey::SCOPE_GENERAL); hotkey::set_scope_active(hotkey::SCOPE_GAME); diff --git a/src/game_config.cpp b/src/game_config.cpp index bb0fe80d32e..b3bfbb78d0b 100644 --- a/src/game_config.cpp +++ b/src/game_config.cpp @@ -63,7 +63,8 @@ namespace game_config default_defeat_music; namespace images { - std::string game_icon, + //NOTE hardcode game_icon because used before that game_config is ready + std::string game_icon = "wesnoth-icon-small.png", game_title, game_logo, // orbs and hp/xp bar