fix windows build; slight refactor

This commit is contained in:
Christopher A. Mosher 2022-12-08 08:47:23 -05:00
parent 6ce62c6bc2
commit 65369d5758
2 changed files with 5 additions and 3 deletions

View File

@ -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()) {

View File

@ -20,6 +20,7 @@
#ifndef WOZFILE_H
#define WOZFILE_H
#include <filesystem>
#include <string>
#include <cstdint>
@ -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;