summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicevivox.cpp
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2010-03-02 15:43:20 -0800
committerRoxie Linden <roxie@lindenlab.com>2010-03-02 15:43:20 -0800
commit836ab95d90298092dd845f47b5ac51817d7bb665 (patch)
tree52a35340afa0d6f1d2314f32c67f3ceccdc5cfcd /indra/newview/llvoicevivox.cpp
parent66efd3f43248c7db6b5a832ed5a293eeb1f98957 (diff)
Windows launching changes for vivox and diamondware voice did not get properly merged.
Diffstat (limited to 'indra/newview/llvoicevivox.cpp')
-rw-r--r--indra/newview/llvoicevivox.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index c75405e12e..e4e3b23ea6 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -825,6 +825,7 @@ void LLVivoxVoiceClient::stateMachine()
// SLIM SDK: these arguments are no longer necessary.
// std::string args = " -p tcp -h -c";
std::string args;
+ std::string cmd;
std::string loglevel = gSavedSettings.getString("VivoxDebugLevel");
if(loglevel.empty())
@@ -839,20 +840,18 @@ void LLVivoxVoiceClient::stateMachine()
#if LL_WINDOWS
PROCESS_INFORMATION pinfo;
- STARTUPINFOW sinfo;
+ STARTUPINFOA sinfo;
memset(&sinfo, 0, sizeof(sinfo));
- std::string exe_dir = gDirUtilp->getExecutableDir();
-
- llutf16string exe_path16 = utf8str_to_utf16str(exe_path);
- llutf16string exe_dir16 = utf8str_to_utf16str(exe_dir);
- llutf16string args16 = utf8str_to_utf16str(args);
- // Create a writeable copy to keep Windows happy.
- U16 *argscpy_16 = new U16[args16.size() + 1];
- wcscpy_s(argscpy_16,args16.size()+1,args16.c_str());
-
- if(!CreateProcessW(exe_path.c_str(), args2, NULL, NULL, FALSE, 0, NULL, exe_dir.c_str(), &sinfo, &pinfo))
+ std::string exe_dir = gDirUtilp->getAppRODataDir();
+ cmd = "SLVoice.exe";
+ cmd += args;
+
+ // So retarded. Windows requires that the second parameter to CreateProcessA be writable (non-const) string...
+ char *args2 = new char[args.size() + 1];
+ strcpy(args2, args.c_str());
+ if(!CreateProcessA(exe_path.c_str(), args2, NULL, NULL, FALSE, 0, NULL, exe_dir.c_str(), &sinfo, &pinfo))
{
// DWORD dwErr = GetLastError();
}
@@ -864,7 +863,7 @@ void LLVivoxVoiceClient::stateMachine()
CloseHandle(pinfo.hThread); // stops leaks - nothing else
}
- delete[] argscpy_16;
+ delete[] args2;
#else // LL_WINDOWS
// This should be the same for mac and linux
{