mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 12:51:42 +00:00
imgui_snapshot: check if game is loaded before accessing XDBF
This commit is contained in:
parent
2bd80f29b1
commit
c3fb9babbb
1 changed files with 10 additions and 6 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
#include <user/config.h>
|
#include <user/config.h>
|
||||||
#include <decompressor.h>
|
#include <decompressor.h>
|
||||||
#include <kernel/xdbf.h>
|
#include <kernel/xdbf.h>
|
||||||
|
#include <app.h>
|
||||||
|
|
||||||
void ImDrawDataSnapshot::Clear()
|
void ImDrawDataSnapshot::Clear()
|
||||||
{
|
{
|
||||||
|
|
@ -221,14 +222,17 @@ void ImFontAtlasSnapshot::GenerateGlyphRanges()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = XDBF_LANGUAGE_ENGLISH; i <= XDBF_LANGUAGE_ITALIAN; i++)
|
if (g_isGameLoaded)
|
||||||
{
|
{
|
||||||
auto achievements = g_xdbfWrapper.GetAchievements(static_cast<EXDBFLanguage>(i));
|
for (size_t i = XDBF_LANGUAGE_ENGLISH; i <= XDBF_LANGUAGE_ITALIAN; i++)
|
||||||
for (auto& achievement : achievements)
|
|
||||||
{
|
{
|
||||||
GetGlyphs(glyphs, achievement.Name);
|
auto achievements = g_xdbfWrapper.GetAchievements(static_cast<EXDBFLanguage>(i));
|
||||||
GetGlyphs(glyphs, achievement.UnlockedDesc);
|
for (auto& achievement : achievements)
|
||||||
GetGlyphs(glyphs, achievement.LockedDesc);
|
{
|
||||||
|
GetGlyphs(glyphs, achievement.Name);
|
||||||
|
GetGlyphs(glyphs, achievement.UnlockedDesc);
|
||||||
|
GetGlyphs(glyphs, achievement.LockedDesc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue