auto merge WASM config on emscripten builds
This commit is contained in:
parent
9f33ac872f
commit
e5aef6ffb8
|
@ -118,7 +118,6 @@ const nlohmann::json& Configuration::operator()() const
|
|||
|
||||
void Configuration::merge(const nlohmann::json& incoming)
|
||||
{
|
||||
sb::Log::log("Merging into configuration", sb::Log::DEBUG);
|
||||
if (!incoming.empty())
|
||||
{
|
||||
/* loop over first level key/value pairs */
|
||||
|
|
|
@ -21,6 +21,8 @@ Game::Game()
|
|||
_configuration.merge(USER_CONFIG_PATH);
|
||||
#ifdef __ANDROID__
|
||||
_configuration.merge(ANDROID_CONFIG_PATH);
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
_configuration.merge(WASM_CONFIG_PATH);
|
||||
#endif
|
||||
if (configuration()["configuration"]["auto-refresh"])
|
||||
{
|
||||
|
|
|
@ -75,6 +75,7 @@ private:
|
|||
|
||||
inline static const std::string USER_CONFIG_PATH = "config.json";
|
||||
inline static const std::string ANDROID_CONFIG_PATH = "config_android.json";
|
||||
inline static const std::string WASM_CONFIG_PATH = "config_wasm.json";
|
||||
|
||||
/*!
|
||||
* Overrides SDL's default log function to log a message to stdout/stderr and, if log is enabled in the
|
||||
|
|
Loading…
Reference in New Issue