Fix CreateMaterial pattern for current build; use ASCII range for icon font (empty PUA font crashed ImGui BuildLookupTable)
This commit is contained in:
@@ -110,9 +110,13 @@ auto CAndromedaGUI::InitFont() -> void
|
|||||||
m_pSegoeFont = io.Fonts->AddFontFromMemoryTTF( &seguoe , sizeof seguoe , 36.f , nullptr , SegoeRanges );
|
m_pSegoeFont = io.Fonts->AddFontFromMemoryTTF( &seguoe , sizeof seguoe , 36.f , nullptr , SegoeRanges );
|
||||||
m_pBoldSegoeFont = io.Fonts->AddFontFromMemoryTTF( &bold_segue , sizeof bold_segue , 36.f , nullptr , SegoeRanges );
|
m_pBoldSegoeFont = io.Fonts->AddFontFromMemoryTTF( &bold_segue , sizeof bold_segue , 36.f , nullptr , SegoeRanges );
|
||||||
|
|
||||||
|
// NOTE: the embedded ico_font.h contains only ASCII glyphs (no PUA).
|
||||||
|
// Declaring a PUA range (0xE000-0xF8FF) leaves the font empty and crashes
|
||||||
|
// ImGui's BuildLookupTable() on the first frame (&Glyphs.back() on a 0-size
|
||||||
|
// glyph vector). Use the ASCII range instead so the font always has glyphs.
|
||||||
static const ImWchar IconRanges[] =
|
static const ImWchar IconRanges[] =
|
||||||
{
|
{
|
||||||
0xE000, 0xF8FF,
|
0x0020, 0x00FF,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
namespace CMaterialSystem2_Search
|
namespace CMaterialSystem2_Search
|
||||||
{
|
{
|
||||||
inline CBasePattern CreateMaterialFn = { VmpStr( "CMaterialSystem2::CreateMaterial" ) , VmpStr( "48 89 5C 24 08 48 89 6C 24 18 56 57 41 56 48 81 EC ? ? ? ?" ) , MATERIALSYSTEM2_DLL };
|
inline CBasePattern CreateMaterialFn = { VmpStr( "CMaterialSystem2::CreateMaterial" ) , VmpStr( "48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 41 56 48 81 EC ? ? ? ? 48 8B 05 ? ? ? ? 48 8B F2" ) , MATERIALSYSTEM2_DLL };
|
||||||
}
|
}
|
||||||
|
|
||||||
class CMaterial2
|
class CMaterial2
|
||||||
|
|||||||
Reference in New Issue
Block a user