mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
ddr: enclose file path in quotes & use wchar when registering codecs (#354)
## Link to GitHub Issue, if one exists #345 ## Description of change Account for the path to codec DLL having spaces in it and use wide chars. ## Testing Testing 32 and 64 bits.
This commit is contained in:
@@ -84,11 +84,12 @@ namespace games::ddr {
|
|||||||
|
|
||||||
log_info("ddr", "found DLL: {}", filename.string());
|
log_info("ddr", "found DLL: {}", filename.string());
|
||||||
if (filename == "k-clvsd.dll" || filename.string().find("xactengine") == 0) {
|
if (filename == "k-clvsd.dll" || filename.string().find("xactengine") == 0) {
|
||||||
const std::string cmd = "regsvr32.exe /s " + file.path().string();
|
const std::wstring wcmd = L"regsvr32.exe /s \"" + file.path().wstring() + L"\"";
|
||||||
|
const std::string cmd = "regsvr32.exe /s \"" + file.path().string() + "\"";
|
||||||
|
|
||||||
int result = 0;
|
int result = 0;
|
||||||
std::thread t([cmd, &result]() {
|
std::thread t([wcmd, &result]() {
|
||||||
result = system(cmd.c_str());
|
result = _wsystem(wcmd.c_str());
|
||||||
});
|
});
|
||||||
t.join();
|
t.join();
|
||||||
log_info("ddr", "`{}` returned {}", cmd, result);
|
log_info("ddr", "`{}` returned {}", cmd, result);
|
||||||
|
|||||||
Reference in New Issue
Block a user