From 943d5eeddf1c926c859c75df3d9a667101c40084 Mon Sep 17 00:00:00 2001 From: GPUCode <47210458+GPUCode@users.noreply.github.com> Date: Wed, 12 Jul 2023 07:43:19 +0300 Subject: [PATCH] citra_qt: Remove image allocation limit (#6682) --- src/citra_qt/qt_image_interface.cpp | 5 +++++ src/citra_qt/qt_image_interface.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/citra_qt/qt_image_interface.cpp b/src/citra_qt/qt_image_interface.cpp index f60162e089..b099ba3956 100644 --- a/src/citra_qt/qt_image_interface.cpp +++ b/src/citra_qt/qt_image_interface.cpp @@ -3,10 +3,15 @@ // Refer to the license.txt file included. #include +#include #include #include "citra_qt/qt_image_interface.h" #include "common/logging/log.h" +QtImageInterface::QtImageInterface() { + QImageReader::setAllocationLimit(0); +} + bool QtImageInterface::DecodePNG(std::vector& dst, u32& width, u32& height, std::span src) { QImage image(QImage::fromData(src.data(), static_cast(src.size()))); diff --git a/src/citra_qt/qt_image_interface.h b/src/citra_qt/qt_image_interface.h index e85f84a437..24652c81ef 100644 --- a/src/citra_qt/qt_image_interface.h +++ b/src/citra_qt/qt_image_interface.h @@ -8,6 +8,7 @@ class QtImageInterface final : public Frontend::ImageInterface { public: + QtImageInterface(); bool DecodePNG(std::vector& dst, u32& width, u32& height, std::span src) override; bool EncodePNG(const std::string& path, u32 width, u32 height, std::span src) override;