Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions lib/dolphin/pad/pad.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "../../input.hpp"
#include "../../device.hpp"
#include "../../internal.hpp"
#include "../../fs_helper.hpp"
#include <dolphin/pad.h>
#include <dolphin/si.h>
#include <SDL3/SDL_mouse.h>
Expand Down Expand Up @@ -1283,7 +1284,8 @@ constexpr int32_t k_keyboardVersion = 3;

static void load_keyboard_bindings() {
const auto filePath = std::filesystem::path{aurora::g_config.userPath} / "keyboard_bindings.dat";
SDL_IOStream* file = SDL_IOFromFile(filePath.string().c_str(), "rb");
const auto pathString = fs_path_to_string(filePath);
SDL_IOStream* file = SDL_IOFromFile(pathString.c_str(), "rb");
if (file == nullptr) {
return;
}
Expand Down Expand Up @@ -1353,9 +1355,10 @@ static void load_keyboard_bindings() {

static void save_keyboard_bindings() {
const auto filePath = std::filesystem::path{aurora::g_config.userPath} / "keyboard_bindings.dat";
SDL_IOStream* file = SDL_IOFromFile(filePath.string().c_str(), "wb");
const auto pathString = fs_path_to_string(filePath);
SDL_IOStream* file = SDL_IOFromFile(pathString.c_str(), "wb");
if (file == nullptr) {
aurora::input::Log.warn("save_keyboard_bindings: failed to open {} for writing", filePath.string());
aurora::input::Log.warn("save_keyboard_bindings: failed to open {} for writing", pathString);
return;
}

Expand Down Expand Up @@ -1386,7 +1389,7 @@ void PADSerializeMappings() {
const auto filePath =
basePath / fmt::format("{}_{:04X}_{:04X}.controller", aurora::input::controller_name(controller.m_index),
controller.m_vid, controller.m_pid);
std::string filePathStr = filePath.string();
std::string filePathStr = fs_path_to_string(filePath);

// don't truncate the file if it already exists
const char* openMode = std::filesystem::exists(filePath) ? "r+b" : "wb";
Expand All @@ -1405,7 +1408,7 @@ void PADSerializeMappings() {
// start writing data at next 32-byte aligned offset
const int64_t dataStart = SDL_TellIO(file) + 31 & ~31;
if (dataStart == -1) {
aurora::input::Log.warn("Unable to seek in controller bindings! Path: \"{}\"", filePath.string());
aurora::input::Log.warn("Unable to seek in controller bindings! Path: \"{}\"", filePathStr);
return;
}
SDL_SeekIO(file, dataStart, SDL_IO_SEEK_SET);
Expand Down
3 changes: 2 additions & 1 deletion lib/gfx/pipeline_cache.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "pipeline_cache.hpp"

#include "clear.hpp"
#include "../fs_helper.hpp"
#include "../gx/pipeline.hpp"
#include "../sqlite_utils.hpp"
#include "../webgpu/gpu.hpp"
Expand Down Expand Up @@ -227,7 +228,7 @@ static bool prepare_pipeline_cache_db() {
return true;
}

const auto path = (std::filesystem::path{g_config.cachePath} / "pipeline_cache.db").string();
const auto path = fs_path_to_string(std::filesystem::path{g_config.cachePath} / "pipeline_cache.db");
auto ret = sqlite3_open(path.c_str(), &g_pipelineCacheDb);
if (ret != SQLITE_OK) {
Log.error("Failed to open pipeline cache database: {}", sqlite3_errmsg(g_pipelineCacheDb));
Expand Down
Loading