mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-14 05:55:13 +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.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#include <QImage>
|
#include <QImage>
|
||||||
|
#include <QImageReader>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include "citra_qt/qt_image_interface.h"
|
#include "citra_qt/qt_image_interface.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
|
|
||||||
|
QtImageInterface::QtImageInterface() {
|
||||||
|
QImageReader::setAllocationLimit(0);
|
||||||
|
}
|
||||||
|
|
||||||
bool QtImageInterface::DecodePNG(std::vector<u8>& dst, u32& width, u32& height,
|
bool QtImageInterface::DecodePNG(std::vector<u8>& dst, u32& width, u32& height,
|
||||||
std::span<const u8> src) {
|
std::span<const u8> src) {
|
||||||
QImage image(QImage::fromData(src.data(), static_cast<int>(src.size())));
|
QImage image(QImage::fromData(src.data(), static_cast<int>(src.size())));
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
class QtImageInterface final : public Frontend::ImageInterface {
|
class QtImageInterface final : public Frontend::ImageInterface {
|
||||||
public:
|
public:
|
||||||
|
QtImageInterface();
|
||||||
bool DecodePNG(std::vector<u8>& dst, u32& width, u32& height, std::span<const u8> src) override;
|
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,
|
bool EncodePNG(const std::string& path, u32 width, u32 height,
|
||||||
std::span<const u8> src) override;
|
std::span<const u8> src) override;
|
||||||
|
Loading…
Reference in New Issue
Block a user