From 65369d57589498137b013d321a8b9bf9467693e3 Mon Sep 17 00:00:00 2001 From: "Christopher A. Mosher" Date: Thu, 8 Dec 2022 08:47:23 -0500 Subject: [PATCH] fix windows build; slight refactor --- src/configep2.cpp | 5 +++-- src/wozfile.h | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/configep2.cpp b/src/configep2.cpp index 496b673..9701403 100644 --- a/src/configep2.cpp +++ b/src/configep2.cpp @@ -128,12 +128,13 @@ void Config::parse(MemoryRandomAccess& ram, Memory& rom, Slots& slts, int& revis user_config = wxT("epple2"); } user_config += ".conf"; + const std::filesystem::path user_path{user_config.fn_str().data()}; - path = wxGetApp().GetConfigDir() / user_config.fn_str().data(); + path = wxGetApp().GetConfigDir() / user_path; std::cout << "looking for config file: " << path << std::endl; pConfig = new std::ifstream(path.c_str()); if (!pConfig->is_open()) { - path = wxGetApp().GetResDir() / user_config.fn_str().data(); + path = wxGetApp().GetResDir() / user_path; std::cout << "looking for config file: " << path << std::endl; pConfig = new std::ifstream(path.c_str()); if (!pConfig->is_open()) { diff --git a/src/wozfile.h b/src/wozfile.h index 631e3d8..19f7944 100644 --- a/src/wozfile.h +++ b/src/wozfile.h @@ -20,6 +20,7 @@ #ifndef WOZFILE_H #define WOZFILE_H +#include #include #include @@ -45,7 +46,7 @@ static const std::uint8_t C_QTRACK(160); * rather, that information is known by the stepper motor and arm. */ class WozFile { - std::string filePath; + std::filesystem::path filePath; bool loaded; bool modified;