|
|
@@ -4,6 +4,7 @@
|
|
|
*/
|
|
|
|
|
|
#include "boot_config.h"
|
|
|
+#include "dynamic_string.h"
|
|
|
#include "json_object.h"
|
|
|
#include "map.h"
|
|
|
#include "platform.h"
|
|
|
@@ -12,9 +13,10 @@
|
|
|
|
|
|
namespace crown
|
|
|
{
|
|
|
-BootConfig::BootConfig()
|
|
|
+BootConfig::BootConfig(Allocator& a)
|
|
|
: boot_script_name(u64(0))
|
|
|
, boot_package_name(u64(0))
|
|
|
+ , window_title(a)
|
|
|
, window_w(CROWN_DEFAULT_WINDOW_WIDTH)
|
|
|
, window_h(CROWN_DEFAULT_WINDOW_HEIGHT)
|
|
|
, aspect_ratio(-1.0f)
|
|
|
@@ -32,6 +34,9 @@ bool BootConfig::parse(const char* json)
|
|
|
boot_script_name = sjson::parse_resource_id(cfg["boot_script"]);
|
|
|
boot_package_name = sjson::parse_resource_id(cfg["boot_package"]);
|
|
|
|
|
|
+ if (json_object::has(cfg, "window_title"))
|
|
|
+ sjson::parse_string(cfg["window_title"], window_title);
|
|
|
+
|
|
|
// Platform-specific configs
|
|
|
if (json_object::has(cfg, CROWN_PLATFORM_NAME))
|
|
|
{
|