73 |
|
int argc; |
74 |
|
unsigned short** argv = CommandLineToArgvW(GetCommandLineW(), &argc); |
75 |
|
|
76 |
+ |
string error; |
77 |
|
string file = "svrcfg_cnc.ini"; |
78 |
|
|
79 |
|
program = fix(argv[0]); |
81 |
|
for (int index = 1; index < argc; index++) |
82 |
|
{ |
83 |
|
string arg = fix(argv[index]); |
83 |
– |
string error; |
84 |
|
|
85 |
|
if (arg == "-D") |
86 |
|
{ |
107 |
|
if (debug) cerr << "file = " << file << "\n"; |
108 |
|
|
109 |
|
config = new RenegadeConfig(file); |
110 |
< |
config->load(); |
110 |
> |
if (!config->load()) |
111 |
> |
{ |
112 |
> |
error = "Could not open " + file + "."; |
113 |
> |
|
114 |
> |
MessageBox(NULL, error.c_str(), "Bad File", MB_ICONERROR); |
115 |
> |
return 1; |
116 |
> |
} |
117 |
|
|
118 |
|
DialogBox(hInstance, MAKEINTRESOURCE(IDD_MAP_SELECTOR), NULL, selector); |
119 |
|
|
120 |
|
delete config; |
121 |
|
|
122 |
+ |
if (debug) cin.get(); |
123 |
+ |
|
124 |
|
return 0; |
125 |
|
} |
126 |
|
|
154 |
|
if (debug) cerr << "data = " << data << "\n"; |
155 |
|
|
156 |
|
DlgDirList(hwndDlg, data, IDC_AVAILABLE, 0, DDL_ARCHIVE); |
157 |
+ |
SetCurrentDirectory(".."); |
158 |
|
|
159 |
|
delete [] data; |
160 |
|
} |