Sync filesystem.h/path.h

This commit is contained in:
Connor McLaughlin
2022-07-08 21:57:06 +10:00
parent f89529015c
commit d2ca454576
50 changed files with 1395 additions and 1861 deletions

View File

@ -4,6 +4,7 @@
#include "common/byte_stream.h"
#include "common/file_system.h"
#include "common/log.h"
#include "common/path.h"
#include "common/string_util.h"
#include "core/system.h"
#include "frontend-common/game_database.h"
@ -105,7 +106,7 @@ void RegTestHostInterface::GetGameInfo(const char* path, CDImage* image, std::st
*code = System::GetGameCodeForImage(image, true);
}
*title = FileSystem::GetFileTitleFromPath(path);
*title = Path::GetFileTitle(path);
}
void RegTestHostInterface::OnRunningGameChanged(const std::string& path, CDImage* image, const std::string& game_code,
@ -204,7 +205,7 @@ void RegTestHostInterface::LoadGameSettingsDatabase()
return;
}
const std::string data(FileSystem::ReadStreamToString(stream.get()));
const std::string data(ByteStream::ReadStreamToString(stream.get()));
if (data.empty() || !s_game_settings_db.Load(data))
{
Log_ErrorPrintf("Failed to load game settings database from '%s'. This could cause compatibility issues.", path);
@ -238,7 +239,7 @@ std::string RegTestHostInterface::GetBIOSDirectory()
std::unique_ptr<ByteStream> RegTestHostInterface::OpenPackageFile(const char* path, u32 flags)
{
std::string full_path(GetProgramDirectoryRelativePath("%s", path));
return ByteStream_OpenFileStream(full_path.c_str(), flags);
return ByteStream::OpenFile(full_path.c_str(), flags);
}
bool RegTestHostInterface::AcquireHostDisplay()