diff --git a/Aerofoil/GpFileSystem_Win32.cpp b/Aerofoil/GpFileSystem_Win32.cpp index 14e98ed..77e7be6 100644 --- a/Aerofoil/GpFileSystem_Win32.cpp +++ b/Aerofoil/GpFileSystem_Win32.cpp @@ -115,6 +115,7 @@ GpFileSystem_Win32::GpFileSystem_Win32(IGpAllocator *alloc) , m_userHousesDir(alloc) , m_userSavesDir(alloc) , m_resourcesDir(alloc) + , m_exportDir(alloc) { m_executablePath[0] = 0; } @@ -155,18 +156,23 @@ bool GpFileSystem_Win32::Init() if (!m_logsDir.Set(m_prefsDir) || !m_logsDir.Append(L"\\Logs")) return false; + if (!m_exportDir.Set(m_prefsDir) || !m_exportDir.Append(L"\\Export")) + return false; + CreateDirectoryW(m_prefsDir.Buffer(), nullptr); CreateDirectoryW(m_scoresDir.Buffer(), nullptr); CreateDirectoryW(m_userHousesDir.Buffer(), nullptr); CreateDirectoryW(m_userSavesDir.Buffer(), nullptr); CreateDirectoryW(m_logsDir.Buffer(), nullptr); + CreateDirectoryW(m_exportDir.Buffer(), nullptr); if (!m_prefsDir.Append(L"\\") || !m_scoresDir.Append(L"\\") || !m_userHousesDir.Append(L"\\") || !m_userSavesDir.Append(L"\\") || !m_logsDir.Append(L"\\") || - !m_resourcesDir.Append(L"\\")) + !m_resourcesDir.Append(L"\\") || + !m_exportDir.Append(L"\\")) return false; DWORD modulePathSize = GetModuleFileNameW(nullptr, m_executablePath, MAX_PATH); @@ -509,6 +515,9 @@ bool GpFileSystem_Win32::ResolvePath(PortabilityLayer::VirtualDirectory_t virtua case PortabilityLayer::VirtualDirectories::kLogs: baseDir = m_logsDir.Buffer(); break; + case PortabilityLayer::VirtualDirectories::kSourceExport: + baseDir = m_exportDir.Buffer(); + break; default: return false; } diff --git a/Aerofoil/GpFileSystem_Win32.h b/Aerofoil/GpFileSystem_Win32.h index 8b75eb7..9e0ab79 100644 --- a/Aerofoil/GpFileSystem_Win32.h +++ b/Aerofoil/GpFileSystem_Win32.h @@ -42,6 +42,7 @@ private: GpWString m_userHousesDir; GpWString m_userSavesDir; GpWString m_resourcesDir; + GpWString m_exportDir; wchar_t m_executablePath[MAX_PATH]; IGpAllocator *m_alloc;