citra_qt: Remove image allocation limit (#6682)

This commit is contained in:
GPUCode 2023-07-12 07:43:19 +03:00 committed by GitHub
parent f3ac6f054f
commit 943d5eeddf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -3,10 +3,15 @@
// Refer to the license.txt file included.
#include <QImage>
#include <QImageReader>
#include <QString>
#include "citra_qt/qt_image_interface.h"
#include "common/logging/log.h"
QtImageInterface::QtImageInterface() {
QImageReader::setAllocationLimit(0);
}
bool QtImageInterface::DecodePNG(std::vector<u8>& dst, u32& width, u32& height,
std::span<const u8> src) {
QImage image(QImage::fromData(src.data(), static_cast<int>(src.size())));

View file

@ -8,6 +8,7 @@
class QtImageInterface final : public Frontend::ImageInterface {
public:
QtImageInterface();
bool DecodePNG(std::vector<u8>& dst, u32& width, u32& height, std::span<const u8> src) override;
bool EncodePNG(const std::string& path, u32 width, u32 height,
std::span<const u8> src) override;