Compare commits

..

2 Commits

Author SHA1 Message Date
sp2xdev 587ae86341 update changelog 2025-08-16 19:22:28 -07:00
bicarus-dev 926f2ef2a0 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.
2025-08-16 19:18:15 -07:00
2 changed files with 8 additions and 4 deletions
+3
View File
@@ -1,3 +1,6 @@
08/17/2025 [spice2x]
DDR: fix codec registration failure when path contains spaces
08/11/2025 [spice2x] 08/11/2025 [spice2x]
SDVX: fix camera hook, remove -sdvxdisablecams SDVX: fix camera hook, remove -sdvxdisablecams
DDR: automatically register codecs in com folder on boot DDR: automatically register codecs in com folder on boot
+4 -3
View File
@@ -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);