1
0
mirror of synced 2025-02-21 12:29:47 +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); auto message = reinterpret_cast<COPYDATASTRUCT *>(lParam);
if (message == nullptr) break; if (message == nullptr) break;
auto path = reinterpret_cast<const char *>(message->lpData); auto data = reinterpret_cast<const char8_t *>(message->lpData);
if (path == nullptr) break; 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); EventManager::post<RequestOpenFile>(path);
break; break;
} }