New SystemToolkit to manage access to files and settings folders in an

OS dependent way
This commit is contained in:
brunoherbelin
2020-04-29 19:58:49 +02:00
parent 7aaaa37e4b
commit c18cd1bcc6
5 changed files with 133 additions and 4 deletions

View File

@@ -31,6 +31,7 @@
#include "defines.h"
#include "Log.h"
#include "SystemToolkit.h"
#include "TextEditor.h"
#include "UserInterfaceManager.h"
#include "RenderingManager.h"
@@ -125,6 +126,12 @@ bool UserInterface::Init()
// prevent bug with imgui clipboard (null at start)
ImGui::SetClipboardText("");
// setup settings filename
std::string inifile = SystemToolkit::settingsFileCompletePath("imgui.ini");
char *inifilepath = (char *) malloc( (inifile.size() + 1) * sizeof(char) );
std::sprintf(inifilepath, "%s", inifile.c_str() );
io.IniFilename = inifilepath;
return true;
}