impr: Make splash screen use SVG directly
Before Width: | Height: | Size: 157 KiB |
Before Width: | Height: | Size: 40 KiB |
415
main/gui/romfs/splash_background.svg
Normal file
After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 150 KiB |
358
main/gui/romfs/splash_text.svg
Normal file
After Width: | Height: | Size: 173 KiB |
@ -552,8 +552,9 @@ namespace hex::init {
|
|||||||
void WindowSplash::loadAssets() {
|
void WindowSplash::loadAssets() {
|
||||||
|
|
||||||
// Load splash screen image from romfs
|
// Load splash screen image from romfs
|
||||||
this->m_splashBackgroundTexture = ImGuiExt::Texture::fromImage(romfs::get("splash_background.png").span(), ImGuiExt::Texture::Filter::Linear);
|
const auto backingScale = ImHexApi::System::getNativeScale() * ImHexApi::System::getBackingScaleFactor();
|
||||||
this->m_splashTextTexture = ImGuiExt::Texture::fromImage(romfs::get("splash_text.png").span(), ImGuiExt::Texture::Filter::Linear);
|
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
|
// 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.
|
// Close the application since this would lead to errors later on anyway.
|
||||||
|
249
main/romfs/splash_text.svg
Normal file
After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |