Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix tourney ipc clients #99

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class InstanceManager {
const osuInstance = new OsuInstance(processId);
const cmdLine = osuInstance.process.getProcessCommandLine();
if (cmdLine.includes('-spectateclient')) {
const [_, ipcId] = cmdLine.split(' ');
const [_, __, ipcId] = cmdLine.split(' ');

osuInstance.setTourneyIpcId(Number(ipcId));
osuInstance.setIsTourneySpectator(true);
Expand Down
2 changes: 1 addition & 1 deletion packages/tsprocess/lib/functions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ Napi::Value getProcessCommandLine(const Napi::CallbackInfo &args) {

std::wstring commandLine = memory::get_proc_command_line(handle);

return Napi::String::New(env, reinterpret_cast<const char16_t*>(commandLine.c_str()), sizeof(commandLine));
return Napi::String::New(env, reinterpret_cast<const char16_t*>(commandLine.c_str()));
}

Napi::Value readCSharpString(const Napi::CallbackInfo &args) {
Expand Down
Loading