mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-11 04:35:05 +01:00
citra_qt: Remove image allocation limit (#6682)
This commit is contained in:
parent
f3ac6f054f
commit
943d5eeddf
@ -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())));
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user