mirror of
https://github.com/open-goal/jak-project
synced 2026-08-21 14:54:53 -04:00
Add deftype (#48)
* initial deftype implementation * fix library setup for windows * implement deftype * fix memory bug * fix formatting
This commit is contained in:
@@ -22,10 +22,11 @@ std::string file_util::get_project_path() {
|
||||
0, pos + 11); // + 12 to include "\jak-project" in the returned filepath
|
||||
#else
|
||||
// do Linux stuff
|
||||
char buffer[FILENAME_MAX];
|
||||
readlink("/proc/self/exe", buffer,
|
||||
FILENAME_MAX); // /proc/self acts like a "virtual folder" containing information about
|
||||
// the current process
|
||||
char buffer[FILENAME_MAX + 1];
|
||||
auto len = readlink("/proc/self/exe", buffer,
|
||||
FILENAME_MAX); // /proc/self acts like a "virtual folder" containing
|
||||
// information about the current process
|
||||
buffer[len] = '\0';
|
||||
std::string::size_type pos =
|
||||
std::string(buffer).rfind("jak-project"); // Strip file path down to /jak-project/ directory
|
||||
return std::string(buffer).substr(
|
||||
|
||||
Reference in New Issue
Block a user