| 1081 | Device *_device = NULL; |
| 1082 | |
| 1083 | int main_runtime(const DeviceOptions &opts) |
| 1084 | { |
| 1085 | CE_ASSERT(_device == NULL, "Crown already initialized"); |
| 1086 | console_server_globals::init(); |
| 1087 | _device = CE_NEW(default_allocator(), Device)(opts, *console_server()); |
| 1088 | int ec = _device->main_loop(); |
| 1089 | CE_DELETE(default_allocator(), _device); |
| 1090 | _device = NULL; |
| 1091 | console_server_globals::shutdown(); |
| 1092 | return ec; |
| 1093 | } |
| 1094 | |
| 1095 | Device *device() |
| 1096 | { |
no test coverage detected