diff --git a/loader/src/hooks/FixClippingRect.cpp b/loader/src/hooks/FixClippingRect.cpp index 3aeb1ebd..a565a128 100644 --- a/loader/src/hooks/FixClippingRect.cpp +++ b/loader/src/hooks/FixClippingRect.cpp @@ -13,4 +13,4 @@ struct MyGameToolbox : Modify { CCEGLView::get()->setScissorInPoints(rect.origin.x, rect.origin.y, rect.size.width, rect.size.height); } } -}; \ No newline at end of file +}; diff --git a/loader/src/platform/windows/util.cpp b/loader/src/platform/windows/util.cpp index a72a3e43..c047dcbf 100644 --- a/loader/src/platform/windows/util.cpp +++ b/loader/src/platform/windows/util.cpp @@ -75,8 +75,17 @@ std::string utils::clipboard::read() { } bool utils::file::openFolder(ghc::filesystem::path const& path) { - ShellExecuteA(NULL, "open", path.string().c_str(), NULL, NULL, SW_SHOWDEFAULT); - return true; + auto success = false; + if (CoInitializeEx(nullptr, COINIT_MULTITHREADED) == S_OK) { + if (auto id = ILCreateFromPathW(path.wstring().c_str())) { + if (SHOpenFolderAndSelectItems(id, 0, nullptr, 0) == S_OK) { + success = true; + } + ILFree(id); + } + CoUninitialize(); + } + return success; } Result utils::file::pickFile(