| 211 | } |
| 212 | |
| 213 | bool Utils::Proc::openFile(const std::string &path) |
| 214 | { |
| 215 | #if defined(__linux__) |
| 216 | if (isWSL()) { |
| 217 | const auto windowsPath = wslToWindowsPath(path); |
| 218 | if (windowsPath) { |
| 219 | const char* args[] = { "cmd.exe", "/C", "start", "", windowsPath->c_str(), NULL }; |
| 220 | SDL_CreateProcess(args, false); |
| 221 | return true; |
| 222 | } |
| 223 | SDL_OpenURL(path.c_str()); |
| 224 | return false; |
| 225 | } |
| 226 | #endif |
| 227 | SDL_OpenURL(path.c_str()); |
| 228 | return true; |
| 229 | } |
| 230 | |
| 231 | bool Utils::Proc::openInFileBrowser(const std::string &path) |
| 232 | { |
nothing calls this directly
no test coverage detected