Merge branch 'master' into jgrpp
# Conflicts: # src/debug.cpp # src/saveload/afterload.cpp # src/saveload/saveload.cpp # src/settings_type.h # src/town_cmd.cpp # src/window.cpp
This commit is contained in:
@@ -325,15 +325,7 @@ bool FioCheckFileExists(const char *filename, Subdirectory subdir)
|
||||
*/
|
||||
bool FileExists(const char *filename)
|
||||
{
|
||||
#if defined(WINCE)
|
||||
/* There is always one platform that doesn't support basic commands... */
|
||||
HANDLE 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(OTTD2FS(filename), 0) == 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -544,7 +536,7 @@ static void FioCreateDirectory(const char *name)
|
||||
{
|
||||
/* Ignore directory creation errors; they'll surface later on, and most
|
||||
* of the time they are 'directory already exists' errors anyhow. */
|
||||
#if defined(WIN32) || defined(WINCE)
|
||||
#if defined(WIN32)
|
||||
CreateDirectory(OTTD2FS(name), NULL);
|
||||
#elif defined(OS2) && !defined(__INNOTEK_LIBC__)
|
||||
mkdir(OTTD2FS(name));
|
||||
@@ -988,14 +980,14 @@ bool ExtractTar(const char *tar_filename, Subdirectory subdir)
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined(WIN32) || defined(WINCE)
|
||||
#if defined(WIN32)
|
||||
/**
|
||||
* Determine the base (personal dir and game data dir) paths
|
||||
* @param exe the path from the current path to the executable
|
||||
* @note defined in the OS related files (os2.cpp, win32.cpp, unix.cpp etc)
|
||||
*/
|
||||
extern void DetermineBasePaths(const char *exe);
|
||||
#else /* defined(WIN32) || defined(WINCE) */
|
||||
#else /* defined(WIN32) */
|
||||
|
||||
/**
|
||||
* Changes the working directory to the path of the give executable.
|
||||
@@ -1158,7 +1150,7 @@ extern void cocoaSetApplicationBundleDir();
|
||||
_searchpaths[SP_APPLICATION_BUNDLE_DIR] = NULL;
|
||||
#endif
|
||||
}
|
||||
#endif /* defined(WIN32) || defined(WINCE) */
|
||||
#endif /* defined(WIN32) */
|
||||
|
||||
const char *_personal_dir;
|
||||
|
||||
|
Reference in New Issue
Block a user