fix: Crash when loading oobe screen

This commit is contained in:
WerWolv
2024-05-04 19:54:57 +02:00
parent 39dd67af78
commit f2b4e49ff3

View File

@@ -76,7 +76,7 @@ namespace hex::plugin::builtin {
// Draw banner
ImGui::SetCursorPos(scaled({ 25 * bannerSlideIn, 25 }));
const auto bannerSize = s_imhexBanner.getSize() / (1.5F * (1.0F / ImHexApi::System::getGlobalScale()));
const auto bannerSize = s_imhexBanner.getSize() / (3.0F * (1.0F / ImHexApi::System::getGlobalScale()));
ImGui::Image(
s_imhexBanner,
bannerSize,
@@ -443,7 +443,7 @@ namespace hex::plugin::builtin {
ImHexApi::System::setWindowResizable(false);
const auto imageTheme = ThemeManager::getImageTheme();
s_imhexBanner = ImGuiExt::Texture::fromImage(romfs::get(hex::format("assets/{}/banner.png", imageTheme)).span<std::byte>());
s_imhexBanner = ImGuiExt::Texture::fromSVG(romfs::get(hex::format("assets/{}/banner.svg", imageTheme)).span<std::byte>());
s_compassTexture = ImGuiExt::Texture::fromImage(romfs::get("assets/common/compass.png").span<std::byte>());
s_globeTexture = ImGuiExt::Texture::fromImage(romfs::get("assets/common/globe.png").span<std::byte>());
s_screenshotDescriptions = nlohmann::json::parse(romfs::get("assets/screenshot_descriptions.json").string());