fix: Banner position being wrong while provider is loaded

This commit is contained in:
WerWolv
2025-02-02 21:15:31 +01:00
parent f345edb252
commit 71c11a5923

View File

@@ -626,7 +626,8 @@ namespace hex {
// Draw Banners
{
const bool onWelcomeScreen = !ImHexApi::Provider::isValid();
const auto currentProvider = ImHexApi::Provider::get();
const bool onWelcomeScreen = currentProvider == nullptr || !currentProvider->isAvailable();
const auto windowPos = ImHexApi::System::getMainWindowPosition();
float startY = windowPos.y + ImGui::GetTextLineHeight() + ((ImGui::GetTextLineHeight() + (ImGui::GetStyle().FramePadding.y * 2.0F)) * (onWelcomeScreen ? 1 : 2));