mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-22 09:09:18 +01:00
erreula: Avoid triggering debug assert in imgui
It does not like empty window titles
This commit is contained in:
parent
12eda10387
commit
d45c2fa6d1
@ -277,10 +277,11 @@ namespace erreula
|
|||||||
ImGui::SetNextWindowBgAlpha(0.9f);
|
ImGui::SetNextWindowBgAlpha(0.9f);
|
||||||
ImGui::PushFont(font);
|
ImGui::PushFont(font);
|
||||||
|
|
||||||
std::string title = "ErrEula";
|
std::string title;
|
||||||
if (appearArg.title)
|
if (appearArg.title)
|
||||||
title = boost::nowide::narrow(GetText(appearArg.title.GetPtr()));
|
title = boost::nowide::narrow(GetText(appearArg.title.GetPtr()));
|
||||||
|
if(title.empty()) // ImGui doesn't allow empty titles, so set one if appearArg.title is not set or empty
|
||||||
|
title = "ErrEula";
|
||||||
if (ImGui::Begin(title.c_str(), nullptr, kPopupFlags))
|
if (ImGui::Begin(title.c_str(), nullptr, kPopupFlags))
|
||||||
{
|
{
|
||||||
const float startx = ImGui::GetWindowSize().x / 2.0f;
|
const float startx = ImGui::GetWindowSize().x / 2.0f;
|
||||||
|
Loading…
Reference in New Issue
Block a user