sys: Embed resources into rodata

This commit is contained in:
WerWolv
2021-07-31 17:10:19 +02:00
parent bca7f738a1
commit e8d77f8269
9 changed files with 89 additions and 24 deletions

View File

@@ -2,6 +2,7 @@
#include <hex/helpers/utils.hpp>
#include <hex/helpers/shared_data.hpp>
#include <hex/resources.hpp>
#include <imgui.h>
#include <imgui_internal.h>
@@ -68,11 +69,7 @@ namespace hex::init {
ImTextureID splashTexture;
u32 splashWidth, splashHeight;
for (const auto &path : hex::getPath(hex::ImHexPath::Resources)) {
std::tie(splashTexture, splashWidth, splashHeight) = ImGui::LoadImageFromPath((path + "/splash.png").c_str());
if (splashTexture != nullptr)
break;
}
std::tie(splashTexture, splashWidth, splashHeight) = ImGui::LoadImageFromMemory(splash, splash_size);
if (splashTexture == nullptr) {
log::fatal("Could not load splash screen image!");