|
@@ -15090,7 +15090,11 @@ static void Platform_SetClipboardTextFn_DefaultImpl(ImGuiContext* ctx, const cha
|
|
#endif
|
|
#endif
|
|
static bool Platform_OpenInShellFn_DefaultImpl(ImGuiContext*, const char* path)
|
|
static bool Platform_OpenInShellFn_DefaultImpl(ImGuiContext*, const char* path)
|
|
{
|
|
{
|
|
- return (INT_PTR)::ShellExecuteA(NULL, "open", path, NULL, NULL, SW_SHOWDEFAULT) > 32;
|
|
|
|
|
|
+ const int path_wsize = ::MultiByteToWideChar(CP_UTF8, 0, path, -1, NULL, 0);
|
|
|
|
+ ImVector<wchar_t> path_wbuf;
|
|
|
|
+ path_wbuf.resize(path_wsize);
|
|
|
|
+ ::MultiByteToWideChar(CP_UTF8, 0, path, -1, path_wbuf.Data, path_wsize);
|
|
|
|
+ return (INT_PTR)::ShellExecuteW(NULL, L"open", path_wbuf.Data, NULL, NULL, SW_SHOWDEFAULT) > 32;
|
|
}
|
|
}
|
|
#else
|
|
#else
|
|
#include <sys/wait.h>
|
|
#include <sys/wait.h>
|