122 bool FiosIsHiddenFile(const struct dirent *ent) |
123 bool FiosIsHiddenFile(const struct dirent *ent) |
123 { |
124 { |
124 return ent->d_name[0] == '.'; |
125 return ent->d_name[0] == '.'; |
125 } |
126 } |
126 |
127 |
127 void ShowInfo(const unsigned char *str) |
128 void ShowInfo(const char *str) |
128 { |
129 { |
129 HAB hab; |
130 HAB hab; |
130 HMQ hmq; |
131 HMQ hmq; |
131 ULONG rc; |
132 ULONG rc; |
132 |
133 |
133 // init PM env. |
134 // init PM env. |
134 hmq = WinCreateMsgQueue((hab = WinInitialize(0)), 0); |
135 hmq = WinCreateMsgQueue((hab = WinInitialize(0)), 0); |
135 |
136 |
136 // display the box |
137 // display the box |
137 rc = WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, str, (const unsigned char *)"OpenTTD", 0, MB_OK | MB_MOVEABLE | MB_INFORMATION); |
138 rc = WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, (const unsigned char *)str, (const unsigned char *)"OpenTTD", 0, MB_OK | MB_MOVEABLE | MB_INFORMATION); |
138 |
139 |
139 // terminate PM env. |
140 // terminate PM env. |
140 WinDestroyMsgQueue(hmq); |
141 WinDestroyMsgQueue(hmq); |
141 WinTerminate(hab); |
142 WinTerminate(hab); |
142 } |
143 } |
143 |
144 |
144 void ShowOSErrorBox(const unsigned char *buf) |
145 void ShowOSErrorBox(const char *buf) |
145 { |
146 { |
146 HAB hab; |
147 HAB hab; |
147 HMQ hmq; |
148 HMQ hmq; |
148 ULONG rc; |
149 ULONG rc; |
149 |
150 |
150 // init PM env. |
151 // init PM env. |
151 hmq = WinCreateMsgQueue((hab = WinInitialize(0)), 0); |
152 hmq = WinCreateMsgQueue((hab = WinInitialize(0)), 0); |
152 |
153 |
153 // display the box |
154 // display the box |
154 rc = WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, buf, (const unsigned char *)"OpenTTD", 0, MB_OK | MB_MOVEABLE | MB_ERROR); |
155 rc = WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, (const unsigned char *)buf, (const unsigned char *)"OpenTTD", 0, MB_OK | MB_MOVEABLE | MB_ERROR); |
155 |
156 |
156 // terminate PM env. |
157 // terminate PM env. |
157 WinDestroyMsgQueue(hmq); |
158 WinDestroyMsgQueue(hmq); |
158 WinTerminate(hab); |
159 WinTerminate(hab); |
159 } |
160 } |