From ca3a0f6691d00402f929d611bd3f62e07be3b567 Mon Sep 17 00:00:00 2001 From: shweet Date: Mon, 19 Jan 2026 15:06:16 -0500 Subject: [PATCH] update dumps + fix trigger bug some more --- src/anm2/anm2_animations.cpp | 2 +- src/imgui/window/animation_preview.cpp | 5 +++-- src/loader.cpp | 26 ++++++++++++++++++++++---- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/src/anm2/anm2_animations.cpp b/src/anm2/anm2_animations.cpp index 7afcaba..4920d5f 100644 --- a/src/anm2/anm2_animations.cpp +++ b/src/anm2/anm2_animations.cpp @@ -40,7 +40,7 @@ namespace anm2ed::anm2 auto& animation = *animations.items.insert(animations.items.begin() + start + count, Animation(element)); for (auto& trigger : animation.triggers.frames) - if (!content.events.contains(trigger.eventID)) content.events[trigger.eventID].name = localize.get(L); + if (!content.events.contains(trigger.eventID)) trigger.eventID = -1; indices.insert(index); count++; diff --git a/src/imgui/window/animation_preview.cpp b/src/imgui/window/animation_preview.cpp index aafca09..ead2ad1 100644 --- a/src/imgui/window/animation_preview.cpp +++ b/src/imgui/window/animation_preview.cpp @@ -693,8 +693,9 @@ namespace anm2ed::imgui drawList->PushClipRect(clipMin, clipMax); ImGui::PushFont(resources.fonts[font::BOLD].get(), font::SIZE_LARGE); auto triggerTextColor = isLightTheme ? TRIGGER_TEXT_COLOR_LIGHT : TRIGGER_TEXT_COLOR_DARK; - drawList->AddText(textPos, ImGui::GetColorU32(triggerTextColor), - anm2.content.events.at(trigger.eventID).name.c_str()); + if (anm2.content.events.contains(trigger.eventID)) + drawList->AddText(textPos, ImGui::GetColorU32(triggerTextColor), + anm2.content.events.at(trigger.eventID).name.c_str()); ImGui::PopFont(); drawList->PopClipRect(); } diff --git a/src/loader.cpp b/src/loader.cpp index c990626..399995e 100644 --- a/src/loader.cpp +++ b/src/loader.cpp @@ -76,9 +76,27 @@ namespace anm2ed mei.ExceptionPointers = exceptionPointers; mei.ClientPointers = FALSE; - const MINIDUMP_TYPE dumpType = static_cast(MiniDumpNormal | MiniDumpWithIndirectlyReferencedMemory | - MiniDumpWithThreadInfo | MiniDumpWithUnloadedModules); - MiniDumpWriteDump(GetCurrentProcess(), pid, file, dumpType, exceptionPointers ? &mei : nullptr, nullptr, nullptr); + DWORD dumpType = MiniDumpWithFullMemory | MiniDumpWithFullMemoryInfo | MiniDumpWithHandleData | + MiniDumpWithThreadInfo | MiniDumpWithUnloadedModules | MiniDumpWithProcessThreadData | + MiniDumpWithPrivateReadWriteMemory | MiniDumpWithDataSegs | MiniDumpWithCodeSegs | + MiniDumpWithIndirectlyReferencedMemory; +#ifdef MiniDumpWithModuleHeaders + dumpType |= MiniDumpWithModuleHeaders; +#endif +#ifdef MiniDumpWithTokenInformation + dumpType |= MiniDumpWithTokenInformation; +#endif +#ifdef MiniDumpWithFullAuxiliaryState + dumpType |= MiniDumpWithFullAuxiliaryState; +#endif +#ifdef MiniDumpWithAvxXStateContext + dumpType |= MiniDumpWithAvxXStateContext; +#endif +#ifdef MiniDumpWithIptTrace + dumpType |= MiniDumpWithIptTrace; +#endif + MiniDumpWriteDump(GetCurrentProcess(), pid, file, static_cast(dumpType), + exceptionPointers ? &mei : nullptr, nullptr, nullptr); FlushFileBuffers(file); CloseHandle(file); @@ -394,4 +412,4 @@ namespace anm2ed SDL_Quit(); } } -} \ No newline at end of file +}