MCPcopy Create free account
hub / github.com/Wemino/MarkerPatch / Platform_OpenInShellFn_DefaultImpl

Function Platform_OpenInShellFn_DefaultImpl

include/imgui/imgui.cpp:16095–16102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16093#pragma comment(lib, "shell32")
16094#endif
16095static bool Platform_OpenInShellFn_DefaultImpl(ImGuiContext*, const char* path)
16096{
16097 const int path_wsize = ::MultiByteToWideChar(CP_UTF8, 0, path, -1, NULL, 0);
16098 ImVector<wchar_t> path_wbuf;
16099 path_wbuf.resize(path_wsize);
16100 ::MultiByteToWideChar(CP_UTF8, 0, path, -1, path_wbuf.Data, path_wsize);
16101 return (INT_PTR)::ShellExecuteW(NULL, L"open", path_wbuf.Data, NULL, NULL, SW_SHOWDEFAULT) > 32;
16102}
16103#else
16104#include <sys/wait.h>
16105#include <unistd.h>

Callers

nothing calls this directly

Calls 1

resizeMethod · 0.45

Tested by

no test coverage detected