diff options
author | Jacek Antonelli | 2008-12-01 17:39:58 -0600 |
---|---|---|
committer | Jacek Antonelli | 2008-12-01 17:40:06 -0600 |
commit | 7abecb48babe6a6f09bf6692ba55076546cfced9 (patch) | |
tree | 8d18a88513fb97adf32c10aae78f4be1984942db /linden/indra/win_crash_logger | |
parent | Second Life viewer sources 1.21.6 (diff) | |
download | meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.zip meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.gz meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.bz2 meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.xz |
Second Life viewer sources 1.22.0-RC
Diffstat (limited to 'linden/indra/win_crash_logger')
-rw-r--r-- | linden/indra/win_crash_logger/llcrashloggerwindows.cpp | 2 | ||||
-rw-r--r-- | linden/indra/win_crash_logger/win_crash_logger.cpp | 49 |
2 files changed, 2 insertions, 49 deletions
diff --git a/linden/indra/win_crash_logger/llcrashloggerwindows.cpp b/linden/indra/win_crash_logger/llcrashloggerwindows.cpp index 03f2394..89581f1 100644 --- a/linden/indra/win_crash_logger/llcrashloggerwindows.cpp +++ b/linden/indra/win_crash_logger/llcrashloggerwindows.cpp | |||
@@ -322,7 +322,7 @@ bool LLCrashLoggerWindows::mainLoop() | |||
322 | { | 322 | { |
323 | gHwndReport = CreateDialog(hInst, MAKEINTRESOURCE(IDD_PREVREPORTBOX), 0, NULL); | 323 | gHwndReport = CreateDialog(hInst, MAKEINTRESOURCE(IDD_PREVREPORTBOX), 0, NULL); |
324 | // Ignore result | 324 | // Ignore result |
325 | (void) SendDlgItemMessage(gHwndReport, IDC_CHECK_AUTO, BM_SETCHECK, 1, 0); | 325 | (void) SendDlgItemMessage(gHwndReport, IDC_CHECK_AUTO, BM_SETCHECK, 0, 0); |
326 | // Include the product name in the caption and various dialog items. | 326 | // Include the product name in the caption and various dialog items. |
327 | ProcessCaption(gHwndReport); | 327 | ProcessCaption(gHwndReport); |
328 | ProcessDlgItemText(gHwndReport, IDC_STATIC_MSG); | 328 | ProcessDlgItemText(gHwndReport, IDC_STATIC_MSG); |
diff --git a/linden/indra/win_crash_logger/win_crash_logger.cpp b/linden/indra/win_crash_logger/win_crash_logger.cpp index 773aa68..3056094 100644 --- a/linden/indra/win_crash_logger/win_crash_logger.cpp +++ b/linden/indra/win_crash_logger/win_crash_logger.cpp | |||
@@ -54,56 +54,9 @@ int APIENTRY WinMain(HINSTANCE hInstance, | |||
54 | { | 54 | { |
55 | llinfos << "Starting crash reporter" << llendl; | 55 | llinfos << "Starting crash reporter" << llendl; |
56 | 56 | ||
57 | // In Win32, we need to generate argc and argv ourselves... | ||
58 | // Note: GetCommandLine() returns a potentially return a LPTSTR | ||
59 | // which can resolve to a LPWSTR (unicode string). | ||
60 | // (That's why it's different from lpCmdLine which is a LPSTR.) | ||
61 | // We don't currently do unicode, so call the non-unicode version | ||
62 | // directly. | ||
63 | llinfos << "Processing command line" << llendl; | ||
64 | LPSTR cmd_line_including_exe_name = GetCommandLineA(); | ||
65 | |||
66 | const S32 MAX_ARGS = 100; | ||
67 | int argc = 0; | ||
68 | char *argv[MAX_ARGS]; | ||
69 | |||
70 | char *token = NULL; | ||
71 | if( cmd_line_including_exe_name[0] == '\"' ) | ||
72 | { | ||
73 | // Exe name is enclosed in quotes | ||
74 | token = strtok( cmd_line_including_exe_name, "\"" ); | ||
75 | argv[argc++] = token; | ||
76 | token = strtok( NULL, " \t," ); | ||
77 | } | ||
78 | else | ||
79 | { | ||
80 | // Exe name is not enclosed in quotes | ||
81 | token = strtok( cmd_line_including_exe_name, " \t," ); | ||
82 | } | ||
83 | |||
84 | while( (token != NULL) && (argc < MAX_ARGS) ) | ||
85 | { | ||
86 | argv[argc++] = token; | ||
87 | /* Get next token: */ | ||
88 | if (*(token + strlen(token) + 1) == '\"') | ||
89 | { | ||
90 | token = strtok( NULL, "\""); | ||
91 | } | ||
92 | else | ||
93 | { | ||
94 | token = strtok( NULL, " \t," ); | ||
95 | } | ||
96 | } | ||
97 | |||
98 | LLCrashLoggerWindows app; | 57 | LLCrashLoggerWindows app; |
99 | bool ok = app.parseCommandOptions(argc, argv); | ||
100 | if(!ok) | ||
101 | { | ||
102 | llwarns << "Unable to parse command line." << llendl; | ||
103 | } | ||
104 | |||
105 | app.setHandle(hInstance); | 58 | app.setHandle(hInstance); |
106 | ok = app.init(); | 59 | bool ok = app.init(); |
107 | if(!ok) | 60 | if(!ok) |
108 | { | 61 | { |
109 | llwarns << "Unable to initialize application." << llendl; | 62 | llwarns << "Unable to initialize application." << llendl; |