1
0
mirror of synced 2025-02-20 04:01:01 +01:00

fix: File opening in existing instance not being unicode aware

This commit is contained in:
WerWolv 2022-08-14 13:42:22 +02:00
parent b917bfca07
commit dea6caccf1

View File

@ -161,10 +161,11 @@ namespace hex {
auto message = reinterpret_cast<COPYDATASTRUCT *>(lParam);
if (message == nullptr) break;
auto path = reinterpret_cast<const char *>(message->lpData);
if (path == nullptr) break;
auto data = reinterpret_cast<const char8_t *>(message->lpData);
if (data == nullptr) break;
log::info("Opening file in existing instance: {}", path);
std::fs::path path = data;
log::info("Opening file in existing instance: {}", path.string());
EventManager::post<RequestOpenFile>(path);
break;
}