all repos — mgba @ 75fa9a80fa51e116f6104cf7f9dd1598f365e66c

mGBA Game Boy Advance Emulator

Qt: Fix build on Qt < 5.10
Vicki Pfau vi@endrift.com
Sun, 23 Feb 2020 18:08:00 -0800
commit

75fa9a80fa51e116f6104cf7f9dd1598f365e66c

parent

210c7a91cd5ff6f1d687724d405dbd2134dcea1a

1 files changed, 6 insertions(+), 0 deletions(-)

jump to
M src/platform/qt/CoreController.cppsrc/platform/qt/CoreController.cpp

@@ -689,6 +689,12 @@ file.open(QIODevice::ReadOnly);

m_eReaderData = file.read(2912); } else if (image.size() == QSize(989, 44)) { const uchar* bits = image.constBits(); + size_t size; +#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) + size = image.sizeInBytes(); +#else + size = image.byteCount(); +#endif m_eReaderData.setRawData(reinterpret_cast<const char*>(bits), image.sizeInBytes()); }