From 1153eba05e0f452c9919459fd02f7853e8ff894f Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 10 Nov 2022 12:40:05 +0100 Subject: Add support for the Wii U platform --- src/FileStream.cpp | 5 +++++ src/StormPort.h | 28 ++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) (limited to 'src') diff --git a/src/FileStream.cpp b/src/FileStream.cpp index d15316a..c431cb6 100644 --- a/src/FileStream.cpp +++ b/src/FileStream.cpp @@ -34,7 +34,12 @@ // Local functions - platform-specific functions #ifndef STORMLIB_WINDOWS + +#ifndef STORMLIB_WIIU static thread_local DWORD dwLastError = ERROR_SUCCESS; +#else +static DWORD dwLastError = ERROR_SUCCESS; +#endif DWORD GetLastError() { diff --git a/src/StormPort.h b/src/StormPort.h index d386414..aa2c9f5 100644 --- a/src/StormPort.h +++ b/src/StormPort.h @@ -254,6 +254,34 @@ #endif +//----------------------------------------------------------------------------- +// Defines for Wii U platform + +#if !defined(STORMLIB_PLATFORM_DEFINED) && defined(__WIIU__) + + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + + #undef STORMLIB_LITTLE_ENDIAN // Wii U is always big endian + + #define STORMLIB_MAC // Use Mac compatible code + #define STORMLIB_WIIU + #define STORMLIB_PLATFORM_DEFINED + +#endif + //----------------------------------------------------------------------------- // Assumption: If the platform is not defined, assume a Linux-like platform -- cgit v1.2.3