Got it working on Windows using Mingw

This commit is contained in:
2024-12-29 21:43:52 -06:00
parent 7e8ce5d58a
commit 7aae9fadba
11 changed files with 130 additions and 31 deletions

View File

@ -26,6 +26,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
/*
Modified by Mike Nolan for this project
I modified it to return home directory and conditionally compile for systems that are not GEKKO / NX etc
*/
#if !defined(SAGO_DISABLE)
#include "platform_folders.h"
#include <iostream>
#include <stdexcept>
@ -218,7 +224,12 @@ std::string getDataHome() {
}
std::string getHomeDir()
{
#if defined(_WIN32)
return GetKnownWindowsFolder(FOLDERID_Profile, "Profile could not be found");
#else
return getHome();
#endif
}
std::string getConfigHome() {
#ifdef _WIN32
@ -458,3 +469,4 @@ std::string getSaveGamesFolder2() {
}
} //namespace sago
#endif

View File

@ -26,9 +26,25 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
/*
Modified by Mike Nolan for this project
I modified it to return home directory and conditionally compile for systems that are not GEKKO / NX etc
*/
#ifndef SAGO_PLATFORM_FOLDERS_H
#define SAGO_PLATFORM_FOLDERS_H
#if defined(GEKKO) || defined(__SWITCH__) || defined(__EMSCRIPTEN__)
#define SAGO_DISABLE
#endif
#if !defined(SAGO_DISABLE)
#include <vector>
#include <string>
@ -285,5 +301,5 @@ private:
} //namespace sago
#endif
#endif /* PLATFORM_FOLDERS_H */