App::I static singleton to pointer
This commit is contained in:
@@ -78,9 +78,9 @@ void NodeDialogBrowse::init_controls()
|
||||
static char path_buffer[256];
|
||||
btn_path = find<NodeButton>("btn-path");
|
||||
btn_path->on_click = [this](Node*){
|
||||
App::I.pick_dir([this](std::string path){
|
||||
App::I->pick_dir([this](std::string path){
|
||||
LOG("change working path to %s", path.c_str());
|
||||
App::I.work_path = path;
|
||||
App::I->work_path = path;
|
||||
#ifdef _WIN32
|
||||
GetFullPathNameA(path.c_str(), sizeof(path_buffer), path_buffer, nullptr);
|
||||
#else
|
||||
@@ -94,9 +94,9 @@ void NodeDialogBrowse::init_controls()
|
||||
};
|
||||
working_path = find<NodeText>("path");
|
||||
#ifdef _WIN32
|
||||
GetFullPathNameA(App::I.work_path.c_str(), sizeof(path_buffer), path_buffer, nullptr);
|
||||
GetFullPathNameA(App::I->work_path.c_str(), sizeof(path_buffer), path_buffer, nullptr);
|
||||
#else
|
||||
realpath(App::I.work_path.c_str(), path_buffer);
|
||||
realpath(App::I->work_path.c_str(), path_buffer);
|
||||
#endif
|
||||
working_path->set_text_format("Working dir: %s", path_buffer);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user