summaryrefslogtreecommitdiff
path: root/src/lib/cross_windows.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-06-17 23:21:54 +0200
committerCarl Hetherington <cth@carlh.net>2021-09-21 09:46:32 +0200
commita5f481aae19a6ef5b0cad48edaea5b58fc00ee05 (patch)
tree50ab7bc8fe9a308b8dd1bea778884ac18d55d956 /src/lib/cross_windows.cc
parentff6c51d3aae0195f6612b01b7609342d3f53df26 (diff)
Move 'show in file manager' code to cross_*
Diffstat (limited to 'src/lib/cross_windows.cc')
-rw-r--r--src/lib/cross_windows.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/cross_windows.cc b/src/lib/cross_windows.cc
index ac92aa7eb..f778a60e1 100644
--- a/src/lib/cross_windows.cc
+++ b/src/lib/cross_windows.cc
@@ -694,3 +694,13 @@ dcpomatic::get_process_id ()
return dcp::raw_convert<string>(GetCurrentProcessId());
}
+
+bool
+show_in_file_manager (boost::filesystem::path, boost::filesystem::path select)
+{
+ std::wstringstream args;
+ args << "/select," << select;
+ auto const r = ShellExecute (0, L"open", L"explorer.exe", args.str().c_str(), 0, SW_SHOWDEFAULT);
+ return (reinterpret_cast<int64_t>(r) <= 32);
+}
+