return true;
}
-void prepare_browse_movie_without_path_build(std::string_view filename)
+void prepare_browse_movie_without_path_build(const std::filesystem::path &path)
{
- movie_fd = fd_open(filename, O_RDONLY);
+ movie_fd = fd_open(path, O_RDONLY);
init_buffer();
}
void prepare_browse_movie_with_path_build(std::string_view filename)
{
const auto &path = path_build(ANGBAND_DIR_USER, filename);
- movie_fd = fd_open(path.string(), O_RDONLY);
+ movie_fd = fd_open(path, O_RDONLY);
init_buffer();
}
#endif
#pragma once
+#include <filesystem>
#include <string_view>
class PlayerType;
void prepare_movie_hooks(PlayerType *player_ptr);
-void prepare_browse_movie_without_path_build(std::string_view filename);
+void prepare_browse_movie_without_path_build(const std::filesystem::path &path);
void browse_movie();
#ifndef WINDOWS
void prepare_browse_movie_with_path_build(std::string_view filename);
const auto &filename = get_open_filename(&ofn, ANGBAND_DIR_USER, savefile, MAIN_WIN_MAX_PATH);
if (filename.has_value()) {
savefile = filename.value();
- prepare_browse_movie_without_path_build(savefile.string());
+ prepare_browse_movie_without_path_build(savefile);
movie_in_progress = true;
}
}