Skip to content

Commit

Permalink
fix: 防止 3D 游戏模式下打开叠加层可能导致的崩溃 (Blinue#840)
Browse files Browse the repository at this point in the history
  • Loading branch information
Blinue authored Mar 3, 2024
1 parent 49fc5c9 commit 91a366b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Magpie.Core/OverlayDrawer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,9 @@ bool OverlayDrawer::_BuildFonts() noexcept {

ImFontAtlas& fontAtlas = *ImGui::GetIO().Fonts;

bool fontCacheDisabled = MagApp::Get().GetOptions().IsDisableFontCache();
const MagOptions& options = MagApp::Get().GetOptions();
// 3D 游戏模式下字体纹理中有光标纹理,不支持缓存
const bool fontCacheDisabled = options.IsDisableFontCache() || options.Is3DGameMode();
if (!fontCacheDisabled && ImGuiFontsCacheManager::Get().Load(language, fontAtlas)) {
_fontUI = fontAtlas.Fonts[0];
_fontMonoNumbers = fontAtlas.Fonts[1];
Expand Down

0 comments on commit 91a366b

Please sign in to comment.