1
0
mirror of synced 2025-01-18 00:56:49 +01:00

fix: Missing includes, rename init function

This commit is contained in:
WerWolv 2023-12-18 11:24:40 +01:00
parent edc4b18975
commit d798713c60
2 changed files with 6 additions and 6 deletions

View File

@ -3,8 +3,8 @@
#include <functional>
#include <future>
#include <list>
#include <ranges>
#include <string>
#include <vector>
#include <mutex>
@ -57,7 +57,7 @@ namespace hex::init {
void initGLFW();
void initImGui();
void initMyself();
void loadAssets();
void exitGLFW() const;
void exitImGui() const;

View File

@ -42,7 +42,7 @@ namespace hex::init {
WindowSplash::WindowSplash() : m_window(nullptr) {
this->initGLFW();
this->initImGui();
this->initMyself();
this->loadAssets();
ImHexApi::System::impl::setGPUVendor(reinterpret_cast<const char *>(glGetString(GL_VENDOR)));
@ -132,10 +132,10 @@ namespace hex::init {
} else if (colorString.starts_with("#")) {
u32 color = std::strtoul(colorString.substr(1).c_str(), nullptr, 16);
return ImColor((color >> 16) & 0xFF, (color >> 8) & 0xFF, color & 0xFF, 0x50);
return IM_COL32((color >> 16) & 0xFF, (color >> 8) & 0xFF, color & 0xFF, 0x50);
} else {
log::error("Invalid color string '{}'", colorString);
return { 0xFF, 0x00, 0xFF, 0xFF };
return IM_COL32(0xFF, 0x00, 0xFF, 0xFF);
}
}
@ -501,7 +501,7 @@ namespace hex::init {
/**
* @brief Initialize resources for the splash window
*/
void WindowSplash::initMyself() {
void WindowSplash::loadAssets() {
// Load splash screen image from romfs
this->splashBackgroundTexture = ImGuiExt::Texture(romfs::get("splash_background.png").span(), ImGuiExt::Texture::Filter::Linear);