mirror of https://github.com/auygun/kaliber.git
tmp
This commit is contained in:
parent
6619cd368b
commit
2985fed3d4
|
@ -20,9 +20,22 @@ Platform::Platform(HINSTANCE instance, int cmd_show)
|
|||
: instance_(instance), cmd_show_(cmd_show) {
|
||||
LOG(0) << "Initializing platform.";
|
||||
|
||||
root_path_ = "./";
|
||||
data_path_ = "./";
|
||||
shared_data_path_ = "./";
|
||||
root_path_ = ".\\";
|
||||
data_path_ = ".\\";
|
||||
shared_data_path_ = ".\\";
|
||||
|
||||
char dest[MAX_PATH];
|
||||
memset(dest, 0, sizeof(dest));
|
||||
if (GetModuleFileNameA(NULL, dest, MAX_PATH) > 0) {
|
||||
std::string path = dest;
|
||||
std::size_t last_slash_pos = path.find_last_of('\\');
|
||||
if (last_slash_pos != std::string::npos)
|
||||
path = path.substr(0, last_slash_pos + 1);
|
||||
|
||||
root_path_ = path;
|
||||
data_path_ = path;
|
||||
shared_data_path_ = path;
|
||||
}
|
||||
|
||||
LOG(0) << "Root path: " << root_path_.c_str();
|
||||
LOG(0) << "Data path: " << data_path_.c_str();
|
||||
|
|
Loading…
Reference in New Issue