ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/RenegadeMapSelector/RenegadeMapSelector.cpp
(Generate patch)

Comparing trunk/RenegadeMapSelector/RenegadeMapSelector.cpp (file contents):
Revision 67 by douglas, 2003-03-11T15:50:44-08:00 vs.
Revision 68 by douglas, 2003-03-11T17:16:41-08:00

# Line 73 | Line 73 | int WINAPI WinMain(HINSTANCE hInstance,
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]);
# Line 80 | Line 81 | int WINAPI WinMain(HINSTANCE hInstance,
81          for (int index = 1; index < argc; index++)
82          {
83                  string arg = fix(argv[index]);
83                string error;
84  
85                  if (arg == "-D")
86                  {
# Line 107 | Line 107 | int WINAPI WinMain(HINSTANCE hInstance,
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  
# Line 146 | Line 154 | int CALLBACK selector(HWND hwndDlg, UINT
154                          if (debug) cerr << "data = " << data << "\n";
155  
156                          DlgDirList(hwndDlg, data, IDC_AVAILABLE, 0, DDL_ARCHIVE);
157 +                        SetCurrentDirectory("..");
158  
159                          delete [] data;
160                  }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines