lr: deadlock on exit with custom textures (win32)

less log
This commit is contained in:
Flyinghead 2021-08-02 12:07:40 +02:00
parent 789fd21bb7
commit 8a46853dfd
2 changed files with 3 additions and 2 deletions

View File

@ -585,6 +585,7 @@ void dc_term_emulator()
sh4_cpu.Term();
if (settings.platform.system != DC_PLATFORM_DREAMCAST)
naomi_cart_Close();
custom_texture.Terminate(); // lr: avoid deadlock on exit (win32)
devicesTerm();
mem_Term();
_vmem_release();

View File

@ -82,14 +82,14 @@ size_t UnwindInfo::end(u32 offset, ptrdiff_t rwRxOffset)
#endif
bool result = RtlAddFunctionTable(table, 1, (DWORD64)startAddr);
tables.push_back(table);
NOTICE_LOG(DYNAREC, "RtlAddFunctionTable %p sz %d rc %d tables: %d", startAddr, table[0].EndAddress, result, (u32)tables.size());
DEBUG_LOG(DYNAREC, "RtlAddFunctionTable %p sz %d rc %d tables: %d", startAddr, table[0].EndAddress, result, (u32)tables.size());
return (unwindInfo + codes.size() * sizeof(u16) + sizeof(RUNTIME_FUNCTION)) - endAddr;
}
void UnwindInfo::clear()
{
NOTICE_LOG(DYNAREC, "UnwindInfo::clear");
DEBUG_LOG(DYNAREC, "UnwindInfo::clear");
for (RUNTIME_FUNCTION *table : tables)
RtlDeleteFunctionTable(table);
tables.clear();