avplayer WIP

This commit is contained in:
Vladislav Mikhalin 2024-07-26 18:34:36 +03:00
parent e96e66eedd
commit b5c69189e5
24 changed files with 2721 additions and 137 deletions

View file

@ -25,9 +25,9 @@ void MntPoints::UnmountAll() {
m_mnt_pairs.clear();
}
std::filesystem::path MntPoints::GetHostPath(const std::string& guest_directory) {
std::filesystem::path MntPoints::GetHostPath(std::string_view guest_directory) {
// Evil games like Turok2 pass double slashes e.g /app0//game.kpf
auto corrected_path = guest_directory;
std::string corrected_path(guest_directory);
size_t pos = corrected_path.find("//");
while (pos != std::string::npos) {
corrected_path.replace(pos, 2, "/");

View file

@ -31,7 +31,7 @@ public:
void Unmount(const std::filesystem::path& host_folder, const std::string& guest_folder);
void UnmountAll();
std::filesystem::path GetHostPath(const std::string& guest_directory);
std::filesystem::path GetHostPath(std::string_view guest_directory);
const MntPair* GetMount(const std::string& guest_path) {
const auto it = std::ranges::find_if(