mirror of https://github.com/OpenTTD/OpenTTD
(svn r10198) -Fix (r10194): did not search all search paths.
parent
966e2738b9
commit
0c369c21e0
|
@ -40,7 +40,8 @@ enum Subdirectory {
|
||||||
* Types of searchpaths OpenTTD might use
|
* Types of searchpaths OpenTTD might use
|
||||||
*/
|
*/
|
||||||
enum Searchpath {
|
enum Searchpath {
|
||||||
SP_WORKING_DIR, ///< Search in the working directory
|
SP_FIRST_DIR,
|
||||||
|
SP_WORKING_DIR = SP_FIRST_DIR, ///< Search in the working directory
|
||||||
SP_PERSONAL_DIR, ///< Search in the personal directory
|
SP_PERSONAL_DIR, ///< Search in the personal directory
|
||||||
SP_SHARED_DIR, ///< Search in the shared directory, like 'Shared Files' under Windows
|
SP_SHARED_DIR, ///< Search in the shared directory, like 'Shared Files' under Windows
|
||||||
SP_BINARY_DIR, ///< Search in the directory where the binary resides
|
SP_BINARY_DIR, ///< Search in the directory where the binary resides
|
||||||
|
@ -70,7 +71,7 @@ static inline bool IsValidSearchPath(Searchpath sp)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Iterator for all the search paths */
|
/** Iterator for all the search paths */
|
||||||
#define FOR_ALL_SEARCHPATHS(sp) for (sp = SP_PERSONAL_DIR; sp < NUM_SEARCHPATHS; sp++) if (IsValidSearchPath(sp))
|
#define FOR_ALL_SEARCHPATHS(sp) for (sp = SP_FIRST_DIR; sp < NUM_SEARCHPATHS; sp++) if (IsValidSearchPath(sp))
|
||||||
|
|
||||||
FILE *FioFOpenFile(const char *filename, const char *mode = "rb", Subdirectory subdir = DATA_DIR);
|
FILE *FioFOpenFile(const char *filename, const char *mode = "rb", Subdirectory subdir = DATA_DIR);
|
||||||
bool FioCheckFileExists(const char *filename, Subdirectory subdir = DATA_DIR);
|
bool FioCheckFileExists(const char *filename, Subdirectory subdir = DATA_DIR);
|
||||||
|
|
Loading…
Reference in New Issue