| 259 | } |
| 260 | |
| 261 | void ModMenu::open_mods_folder() { |
| 262 | std::filesystem::path mods_directory = recomp::mods::get_mods_directory(); |
| 263 | #if defined(WIN32) |
| 264 | std::wstring path_wstr = mods_directory.wstring(); |
| 265 | ShellExecuteW(NULL, L"open", path_wstr.c_str(), NULL, NULL, SW_SHOWDEFAULT); |
| 266 | #elif defined(__linux__) |
| 267 | std::string command = "xdg-open \"" + mods_directory.string() + "\" &"; |
| 268 | std::system(command.c_str()); |
| 269 | #elif defined(__APPLE__) |
| 270 | std::string command = "open \"" + mods_directory.string() + "\""; |
| 271 | std::system(command.c_str()); |
| 272 | #else |
| 273 | static_assert(false, "Not implemented for this platform."); |
| 274 | #endif |
| 275 | } |
| 276 | |
| 277 | void ModMenu::open_install_dialog() { |
| 278 | zelda64::open_file_dialog_multiple([](bool success, const std::list<std::filesystem::path>& paths) { |
nothing calls this directly
no outgoing calls
no test coverage detected