Skip to content

Commit

Permalink
Fixed game crash on DirectX reset
Browse files Browse the repository at this point in the history
  • Loading branch information
zziger committed Nov 12, 2023
1 parent 26c4fb1 commit 88ed03b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/ui/UI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,12 @@ void UI::OnWindowEvent(WindowEvent& evt) {
static inline int (__thiscall *AssetPool__freeAssetsFromD3d_orig)(void* this_) = nullptr;
static int __fastcall AssetPool__freeAssetsFromD3d(void* this_, void*) {
ImGui_ImplDX8_InvalidateDeviceObjects();
for (auto mod : ModManager::GetMods())
{
mod->info.ReleaseIcon();
}
ModManager::GetInternalMod()->info.ReleaseIcon();
// for (auto mod : ModManager::GetMods())
// {
// mod->info.ReleaseIcon();
// }
// ModManager::GetInternalMod()->info.ReleaseIcon();

return AssetPool__freeAssetsFromD3d_orig(this_);
}

Expand Down

0 comments on commit 88ed03b

Please sign in to comment.