From ed2999e9c7cd8085fd6408e5c26a6b87df30c945 Mon Sep 17 00:00:00 2001 From: David Korth Date: Mon, 27 May 2024 10:10:06 -0400 Subject: [PATCH] [libromdata] (NE|PE)ResourceReader.hpp: Add MAKEINTRESOURCE wrappers. They shouldn't be needed here, since they're defined in IResourceReader, but it doesn't seem to be working in cases where windows.h overrides our own definitions... --- src/libromdata/disc/NEResourceReader.hpp | 7 +++++++ src/libromdata/disc/PEResourceReader.hpp | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/libromdata/disc/NEResourceReader.hpp b/src/libromdata/disc/NEResourceReader.hpp index 8fee20d00..d0bb442c3 100644 --- a/src/libromdata/disc/NEResourceReader.hpp +++ b/src/libromdata/disc/NEResourceReader.hpp @@ -99,6 +99,13 @@ class NEResourceReader final : public IResourceReader */ LibRpFile::IRpFilePtr open(uint16_t type, int id, int lang) final; +#ifdef _WIN32 + open_MAKEINTRESOURCE_wrapper(LPSTR); + open_MAKEINTRESOURCE_wrapper(LPCSTR); + open_MAKEINTRESOURCE_wrapper(LPWSTR); + open_MAKEINTRESOURCE_wrapper(LPCWSTR); +#endif /* _WIN32 */ + /** * Load a VS_VERSION_INFO resource. * Data will be byteswapped to host-endian if necessary. diff --git a/src/libromdata/disc/PEResourceReader.hpp b/src/libromdata/disc/PEResourceReader.hpp index 6a9823fe5..d3ff169cb 100644 --- a/src/libromdata/disc/PEResourceReader.hpp +++ b/src/libromdata/disc/PEResourceReader.hpp @@ -100,6 +100,13 @@ class PEResourceReader final : public IResourceReader */ LibRpFile::IRpFilePtr open(uint16_t type, int id, int lang) final; +#ifdef _WIN32 + open_MAKEINTRESOURCE_wrapper(LPSTR); + open_MAKEINTRESOURCE_wrapper(LPCSTR); + open_MAKEINTRESOURCE_wrapper(LPWSTR); + open_MAKEINTRESOURCE_wrapper(LPCWSTR); +#endif /* _WIN32 */ + /** * Load a VS_VERSION_INFO resource. * Data will be byteswapped to host-endian if necessary.