mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-05 17:13:29 +08:00
fix(renderer): Load backup font on proton
This commit is contained in:
parent
d7bcd26791
commit
479b8b0d20
@ -38,7 +38,10 @@ namespace big
|
||||
ImGui_ImplDX11_Init(m_d3d_device.Get(), m_d3d_device_context.Get());
|
||||
ImGui_ImplWin32_Init(g_pointers->m_hwnd);
|
||||
|
||||
auto font_file = std::ifstream(file("C:/Windows/Fonts/msyh.ttc").get_path(), std::ios::binary | std::ios::ate);
|
||||
file font_file_path("C:/Windows/Fonts/msyh.ttc");
|
||||
if (!font_file_path.exists())
|
||||
font_file_path = { "C:/Windows/Fonts/msyh.ttf" };
|
||||
auto font_file = std::ifstream(font_file_path.get_path(), std::ios::binary | std::ios::ate);
|
||||
const auto font_data_size = static_cast<int>(font_file.tellg());
|
||||
const auto font_data = std::make_unique<std::uint8_t[]>(font_data_size);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user