[client,sdl] fix hidden dialog update

This commit is contained in:
akallabeth
2025-05-22 09:09:55 +02:00
parent 6eafefea64
commit 4b86e4bdd0
2 changed files with 6 additions and 3 deletions

View File

@@ -293,8 +293,8 @@ int SdlInputWidgetPairList::run(std::vector<std::string>& result)
auto rc = SDL_RenderPresent(_renderer.get());
if (!rc)
{
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, "SDL_RenderPresent failed with %s",
SDL_GetError());
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, "[%s] SDL_RenderPresent failed with %s",
__func__, SDL_GetError());
}
}

View File

@@ -44,6 +44,9 @@ bool SdlWidgetList::clearWindow()
bool SdlWidgetList::update()
{
if (!visible())
return true;
clearWindow();
updateInternal();
if (!_buttons.update())
@@ -51,7 +54,7 @@ bool SdlWidgetList::update()
auto rc = SDL_RenderPresent(_renderer.get());
if (!rc)
{
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, "SDL_RenderPresent failed with %s",
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, "[%s] SDL_RenderPresent failed with %s", __func__,
SDL_GetError());
}
return rc;