mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 13:05:25 -05:00
impr: Make splash screen use SVG directly
This commit is contained in:
@@ -552,8 +552,9 @@ namespace hex::init {
|
||||
void WindowSplash::loadAssets() {
|
||||
|
||||
// Load splash screen image from romfs
|
||||
this->m_splashBackgroundTexture = ImGuiExt::Texture::fromImage(romfs::get("splash_background.png").span(), ImGuiExt::Texture::Filter::Linear);
|
||||
this->m_splashTextTexture = ImGuiExt::Texture::fromImage(romfs::get("splash_text.png").span(), ImGuiExt::Texture::Filter::Linear);
|
||||
const auto backingScale = ImHexApi::System::getNativeScale() * ImHexApi::System::getBackingScaleFactor();
|
||||
this->m_splashBackgroundTexture = ImGuiExt::Texture::fromSVG(romfs::get("splash_background.svg").span(), 640 * backingScale, 400 * backingScale, ImGuiExt::Texture::Filter::Linear);
|
||||
this->m_splashTextTexture = ImGuiExt::Texture::fromSVG(romfs::get("splash_text.svg").span(), 640 * backingScale, 400 * backingScale, ImGuiExt::Texture::Filter::Linear);
|
||||
|
||||
// If the image couldn't be loaded correctly, something went wrong during the build process
|
||||
// Close the application since this would lead to errors later on anyway.
|
||||
|
||||
Reference in New Issue
Block a user