[Kernel] Added support for writing/reading GPD files
This breaks settings in games that are using them and savefiles in games that use settings to store progress
This commit is contained in:
committed by
Radosław Gliński
parent
ccf7adf015
commit
1110cdd372
@@ -245,10 +245,13 @@ std::map<uint32_t, std::unique_ptr<ImmediateTexture>> ImGuiDrawer::LoadIcons(
|
||||
int width, height, channels;
|
||||
|
||||
for (const auto& icon : data) {
|
||||
unsigned char* image_data =
|
||||
stbi_load_from_memory(icon.second.first, icon.second.second, &width,
|
||||
&height, &channels, STBI_rgb_alpha);
|
||||
unsigned char* image_data = stbi_load_from_memory(
|
||||
icon.second.data(), static_cast<int>(icon.second.size()), &width,
|
||||
&height, &channels, STBI_rgb_alpha);
|
||||
|
||||
if (!image_data) {
|
||||
continue;
|
||||
}
|
||||
icons_[icon.first] = (immediate_drawer_->CreateTexture(
|
||||
width, height, ImmediateTextureFilter::kLinear, true,
|
||||
reinterpret_cast<uint8_t*>(image_data)));
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <span>
|
||||
#include <vector>
|
||||
|
||||
#include "third_party/imgui/imgui.h"
|
||||
@@ -34,7 +35,7 @@ class ImGuiDialog;
|
||||
class ImGuiNotification;
|
||||
class Window;
|
||||
|
||||
using IconsData = std::map<uint32_t, std::pair<const uint8_t*, uint32_t>>;
|
||||
using IconsData = std::map<uint32_t, std::span<const uint8_t>>;
|
||||
|
||||
class ImGuiDrawer : public WindowInputListener, public UIDrawer {
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user