Windows: Fix game shortcut character corruption (#1745)

This commit is contained in:
RedBlackAka 2026-02-17 10:32:01 +01:00 committed by GitHub
parent 304db9173b
commit 6c6dd68780
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1918,7 +1918,9 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path,
LOG_ERROR(Frontend, "Failed to get IPersistFile interface");
return false;
}
hres = persist_file->Save(std::filesystem::path{shortcut_path / (name + ".lnk")}.c_str(), TRUE);
hres = persist_file->Save(
std::filesystem::path{shortcut_path / (Common::UTF8ToUTF16W(name) + L".lnk")}.c_str(),
TRUE);
if (FAILED(hres)) {
LOG_ERROR(Frontend, "Failed to save shortcut");
return false;