mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
* Some more Windows-related Breakpad fixes.
This commit is contained in:
@@ -96,8 +96,8 @@ LaunchUploader( const wchar_t* dump_dir, const wchar_t* minidump_id, void* that,
|
|||||||
const char* productName = static_cast<BreakPad*>(that)->productName();
|
const char* productName = static_cast<BreakPad*>(that)->productName();
|
||||||
|
|
||||||
// convert productName to widechars, which sadly means the product name must be Latin1
|
// convert productName to widechars, which sadly means the product name must be Latin1
|
||||||
wchar_t productName[ 256 ];
|
wchar_t wcProductName[ 256 ];
|
||||||
char* out = (char*)product_name;
|
char* out = (char*)wcProductName;
|
||||||
const char* in = productName - 1;
|
const char* in = productName - 1;
|
||||||
do {
|
do {
|
||||||
*out++ = *++in; //latin1 chars fit in first byte of each wchar
|
*out++ = *++in; //latin1 chars fit in first byte of each wchar
|
||||||
@@ -111,19 +111,19 @@ LaunchUploader( const wchar_t* dump_dir, const wchar_t* minidump_id, void* that,
|
|||||||
wcscat( command, L"\" \"" );
|
wcscat( command, L"\" \"" );
|
||||||
wcscat( command, minidump_id );
|
wcscat( command, minidump_id );
|
||||||
wcscat( command, L"\" \"" );
|
wcscat( command, L"\" \"" );
|
||||||
wcscat( command, product_name );
|
wcscat( command, wcProductName );
|
||||||
wcscat( command, L"\"" );
|
wcscat( command, L"\"" );
|
||||||
|
|
||||||
STARTUPINFO si;
|
STARTUPINFO si;
|
||||||
PROCESS_INFORMATION pi;
|
PROCESS_INFORMATION pi;
|
||||||
|
|
||||||
ZeroMemory( &si, sizeof( si ) );
|
ZeroMemory( &si, sizeof( si ) );
|
||||||
si.cb = sizeof(si);
|
si.cb = sizeof( si );
|
||||||
si.dwFlags = STARTF_USESHOWWINDOW;
|
si.dwFlags = STARTF_USESHOWWINDOW;
|
||||||
si.wShowWindow = SW_SHOWNORMAL;
|
si.wShowWindow = SW_SHOWNORMAL;
|
||||||
ZeroMemory( &pi, sizeof(pi) );
|
ZeroMemory( &pi, sizeof( pi ) );
|
||||||
|
|
||||||
if (CreateProcess( NULL, command, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
|
if ( CreateProcess( NULL, command, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi ) )
|
||||||
{
|
{
|
||||||
CloseHandle( pi.hProcess );
|
CloseHandle( pi.hProcess );
|
||||||
CloseHandle( pi.hThread );
|
CloseHandle( pi.hThread );
|
||||||
|
Reference in New Issue
Block a user