mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Minor refactor
This commit is contained in:
parent
0d36f52bdd
commit
2ad115a2a8
9 changed files with 19 additions and 20 deletions
|
|
@ -66,7 +66,7 @@ Engine::Engine(EngineSettings& settings, EnginePaths* paths)
|
|||
}
|
||||
|
||||
Audio::initialize();
|
||||
gui = new gui::GUI();
|
||||
gui = std::make_unique<gui::GUI>();
|
||||
if (settings.ui.language == "auto") {
|
||||
settings.ui.language = langs::locale_by_envlocale(platform::detect_locale(), paths->getResources());
|
||||
}
|
||||
|
|
@ -125,7 +125,6 @@ void Engine::mainloop() {
|
|||
Engine::~Engine() {
|
||||
scripting::close();
|
||||
screen = nullptr;
|
||||
delete gui;
|
||||
|
||||
Audio::finalize();
|
||||
|
||||
|
|
@ -182,7 +181,7 @@ void Engine::setLanguage(std::string locale) {
|
|||
}
|
||||
|
||||
gui::GUI* Engine::getGUI() {
|
||||
return gui;
|
||||
return gui.get();
|
||||
}
|
||||
|
||||
EngineSettings& Engine::getSettings() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue