Commit 2cbb6ebc authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Cleanups

parent 3092c1b0
Pipeline #19865 failed with stages
in 2 minutes and 5 seconds
...@@ -28,32 +28,32 @@ bool ngen_Rewrite(size_t &addr, size_t retadr, size_t acc); ...@@ -28,32 +28,32 @@ bool ngen_Rewrite(size_t &addr, size_t retadr, size_t acc);
bool BM_LockedWrite(u8* address); bool BM_LockedWrite(u8* address);
static LONG ExceptionHandler(EXCEPTION_POINTERS *ExceptionInfo) static LONG ExceptionHandler(EXCEPTION_POINTERS *ep)
{ {
EXCEPTION_POINTERS* ep = ExceptionInfo;
u32 dwCode = ep->ExceptionRecord->ExceptionCode; u32 dwCode = ep->ExceptionRecord->ExceptionCode;
EXCEPTION_RECORD* pExceptionRecord=ep->ExceptionRecord;
if (dwCode != EXCEPTION_ACCESS_VIOLATION) if (dwCode != EXCEPTION_ACCESS_VIOLATION)
return EXCEPTION_CONTINUE_SEARCH; return EXCEPTION_CONTINUE_SEARCH;
EXCEPTION_RECORD* pExceptionRecord=ep->ExceptionRecord;
u8* address=(u8*)pExceptionRecord->ExceptionInformation[1]; u8* address=(u8*)pExceptionRecord->ExceptionInformation[1];
//printf("[EXC] During access to : 0x%X\n", address); //printf("[EXC] During access to : 0x%X\n", address);
// code protection in RAM
if (bm_RamWriteAccess(address)) if (bm_RamWriteAccess(address))
{
return EXCEPTION_CONTINUE_EXECUTION; return EXCEPTION_CONTINUE_EXECUTION;
} // texture protection in VRAM
else if (VramLockedWrite(address)) else if (VramLockedWrite(address))
return EXCEPTION_CONTINUE_EXECUTION; return EXCEPTION_CONTINUE_EXECUTION;
#ifndef TARGET_NO_NVMEM #ifndef TARGET_NO_NVMEM
/* FPCB jump table protection */
if (BM_LockedWrite(address)) if (BM_LockedWrite(address))
return EXCEPTION_CONTINUE_EXECUTION; return EXCEPTION_CONTINUE_EXECUTION;
#endif #endif
#if FEAT_SHREC == DYNAREC_JIT && HOST_CPU == CPU_X86 #if FEAT_SHREC == DYNAREC_JIT && HOST_CPU == CPU_X86
// fast mem access rewriting
if ( ngen_Rewrite((size_t&)ep->ContextRecord->Eip,*(size_t*)ep->ContextRecord->Esp,ep->ContextRecord->Eax) ) if ( ngen_Rewrite((size_t&)ep->ContextRecord->Eip,*(size_t*)ep->ContextRecord->Esp,ep->ContextRecord->Eax) )
{ {
//remove the call from call stack //remove the call from call stack
...@@ -63,11 +63,8 @@ static LONG ExceptionHandler(EXCEPTION_POINTERS *ExceptionInfo) ...@@ -63,11 +63,8 @@ static LONG ExceptionHandler(EXCEPTION_POINTERS *ExceptionInfo)
return EXCEPTION_CONTINUE_EXECUTION; return EXCEPTION_CONTINUE_EXECUTION;
} }
#endif #endif
else
{
ERROR_LOG(COMMON, "[GPF]Unhandled access to : %p", address);
}
ERROR_LOG(COMMON, "[GPF]Unhandled access to : %p", address);
return EXCEPTION_CONTINUE_SEARCH; return EXCEPTION_CONTINUE_SEARCH;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment