Merge branch 'master' into jgrpp

# Conflicts:
#	src/company_gui.cpp
#	src/group_gui.cpp
#	src/newgrf.cpp
#	src/newgrf_debug_gui.cpp
#	src/saveload/saveload.cpp
This commit is contained in:
Jonathan G Rennison
2023-08-19 01:13:00 +01:00
22 changed files with 109 additions and 171 deletions

View File

@@ -42,7 +42,6 @@ extern bool FiosIsRoot(const char *path);
extern bool FiosIsValidFile(const char *path, const struct dirent *ent, struct stat *sb);
extern bool FiosIsHiddenFile(const struct dirent *ent);
extern void FiosGetDrives(FileList &file_list);
extern bool FiosGetDiskFreeSpace(const char *path, uint64 *tot);
/* get the name of an oldstyle savegame */
extern void GetOldSaveGameName(const std::string &file, char *title, const char *last);
@@ -131,16 +130,11 @@ const FiosItem *FileList::FindItem(const std::string_view file)
}
/**
* Get descriptive texts. Returns the path and free space
* left on the device
* @param path string describing the path
* @param total_free total free space in megabytes, optional (can be nullptr)
* @return StringID describing the path (free space or failure)
* Get the current path/working directory.
*/
StringID FiosGetDescText(const char **path, uint64 *total_free)
std::string FiosGetCurrentPath()
{
*path = _fios_path->c_str();
return FiosGetDiskFreeSpace(*path, total_free) ? STR_SAVELOAD_BYTES_FREE : STR_ERROR_UNABLE_TO_READ_DRIVE;
return *_fios_path;
}
/**