Used the proper name for the default theme.
Added some error messages. (Fix for bug #15002.)
This commit is contained in:
parent
89d8f42fdd
commit
4ee49a95e6
1 changed files with 11 additions and 2 deletions
|
@ -14,12 +14,17 @@
|
|||
*/
|
||||
|
||||
#include "controller_base.hpp"
|
||||
|
||||
#include "dialogs.hpp"
|
||||
#include "display.hpp"
|
||||
#include "mouse_handler_base.hpp"
|
||||
#include "foreach.hpp"
|
||||
#include "log.hpp"
|
||||
#include "mouse_handler_base.hpp"
|
||||
#include "preferences_display.hpp"
|
||||
|
||||
static lg::log_domain log_display("display");
|
||||
#define ERR_DP LOG_STREAM(err, log_display)
|
||||
|
||||
controller_base::controller_base(
|
||||
int ticks, const config& game_config, CVideo& /*video*/) :
|
||||
game_config_(game_config),
|
||||
|
@ -255,9 +260,13 @@ const config& controller_base::get_theme(const config& game_config, std::string
|
|||
if (const config &c = game_config.find_child("theme", "name", theme_name))
|
||||
return c;
|
||||
|
||||
if (const config &c = game_config.find_child("theme", "name", "default"))
|
||||
ERR_DP << "Theme '" << theme_name << "' not found. Trying the default theme.\n";
|
||||
|
||||
if (const config &c = game_config.find_child("theme", "name", "Default"))
|
||||
return c;
|
||||
|
||||
ERR_DP << "Default theme not found.\n";
|
||||
|
||||
static config empty;
|
||||
return empty;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue