forked from markus/S_New4
add second function for getexepath
This commit is contained in:
parent
c21df9cdfa
commit
3693cf7658
@ -995,11 +995,18 @@ std::string getexepath()
|
||||
ssize_t count = readlink( "/proc/self/exe", result, PATH_MAX );
|
||||
return std::string( result, (count > 0) ? static_cast<size_t>(count) : 0 );
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
#ifdef V2
|
||||
char buffer[MAX_PATH];
|
||||
GetModuleFileName( NULL, buffer, MAX_PATH );
|
||||
return buffer;
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
wchar_t buffer[MAX_PATH];
|
||||
char CharArray[MAX_PATH + 1];
|
||||
memset( CharArray, 0, MAX_PATH + 1);
|
||||
GetModuleFileName( nullptr, buffer, MAX_PATH );
|
||||
wcstombs(CharArray, buffer, MAX_PATH + 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
void setPathSymbol(Settings &settings)
|
||||
|
Loading…
Reference in New Issue
Block a user