Changeset 105109 in vbox
- Timestamp:
- Jul 3, 2024 9:51:56 AM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/dxvk-2.3.1/src/util/util_env.cpp
r105107 r105109 7 7 #include <unistd.h> 8 8 #include <limits.h> 9 #endif 10 11 #ifdef VBOX 12 # include <iprt/process.h> 9 13 #endif 10 14 … … 72 76 73 77 std::string getExePath() { 78 #ifdef VBOX 79 std::array<char, PATH_MAX> exePath = {}; 80 if (!RTProcGetExecutablePath(exePath.data(), exePath.size())) 81 return std::string(""); 82 return std::string(exePath.begin(), exePath.begin() + strlen(exePath.begin())); 83 #else 74 84 #if defined(_WIN32) 75 85 std::vector<WCHAR> exePath; … … 87 97 return std::string(exePath.begin(), exePath.begin() + count); 88 98 #endif 99 #endif /* VBOX */ 89 100 } 90 101 … … 109 120 std::array<char, 16> posixName = {}; 110 121 dxvk::str::strlcpy(posixName.data(), name.c_str(), 16); 122 # if defined(VBOX) && defined(RT_OS_DARWIN) 123 ::pthread_setname_np(posixName.data()); 124 # else 111 125 ::pthread_setname_np(pthread_self(), posixName.data()); 126 # endif 112 127 #endif 113 128 }
Note:
See TracChangeset
for help on using the changeset viewer.