mirror of https://github.com/OpenTTD/OpenTTD
(svn r8308) [WinCE] -Revert r5764: in case of WinCE, use the code for FileExists as it was in pre-r5764 for Win32 (tnx Darkvater)
parent
bd52404b8e
commit
79dfc62261
10
src/fios.cpp
10
src/fios.cpp
|
@ -185,7 +185,17 @@ bool FiosDelete(const char *name)
|
||||||
|
|
||||||
bool FileExists(const char *filename)
|
bool FileExists(const char *filename)
|
||||||
{
|
{
|
||||||
|
#if defined(WINCE)
|
||||||
|
/* There is always one platform that doesn't support basic commands... */
|
||||||
|
HANDLE hand;
|
||||||
|
|
||||||
|
hand = CreateFile(OTTD2FS(filename), 0, 0, NULL, OPEN_EXISTING, 0, NULL);
|
||||||
|
if (hand == INVALID_HANDLE_VALUE) return 1;
|
||||||
|
CloseHandle(hand);
|
||||||
|
return 0;
|
||||||
|
#else
|
||||||
return access(filename, 0) == 0;
|
return access(filename, 0) == 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef byte fios_getlist_callback_proc(int mode, const char *filename, const char *ext, char *title);
|
typedef byte fios_getlist_callback_proc(int mode, const char *filename, const char *ext, char *title);
|
||||||
|
|
Loading…
Reference in New Issue