/*
- * Copyright (C) 2017 Mentor Graphics Development (Deutschland) GmbH
+ * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
using nlohmann::json;
result<json> file_to_json(char const *filename) {
+ json j;
std::ifstream i(filename);
if (i.fail()) {
- return Err<json>("Could not open config file");
+ HMI_DEBUG("wm", "Could not open config file, so use default layer information");
+ j = default_layers_json;
}
- json j;
- i >> j;
+ else {
+ i >> j;
+ }
+
return Ok(j);
}
this->display->add_global_handler(
"ivi_controller", [this](wl_registry *r, uint32_t name, uint32_t v) {
this->controller =
- std::make_unique<struct genivi::controller>(r, name, v);
+ std::make_unique<struct compositor::controller>(r, name, v);
// Init controller hooks
this->controller->chooks = &this->chooks;
auto &layers = c->layers;
// Write output dimensions to ivi controller...
- c->output_size = genivi::size{uint32_t(o->width), uint32_t(o->height)};
+ c->output_size = compositor::size{uint32_t(o->width), uint32_t(o->height)};
// Clear scene
layers.clear();