mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-26 09:02:44 -06:00
citra_qt: Remove image allocation limit (#6682)
This commit is contained in:
parent
f3ac6f054f
commit
943d5eeddf
2 changed files with 6 additions and 0 deletions
|
@ -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 a new issue