MCPcopy Create free account
hub / github.com/RevoSucks/BM64Recomp / open_mods_folder

Method open_mods_folder

src/ui/ui_mod_menu.cpp:261–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261void 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
277void ModMenu::open_install_dialog() {
278 zelda64::open_file_dialog_multiple([](bool success, const std::list<std::filesystem::path>& paths) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected