mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-22 22:05:38 +00:00
Common/PageFaultHandler: Fix for Windows/ARM64
This commit is contained in:
parent
ea355c20ad
commit
44b3c9be6e
|
@ -68,7 +68,7 @@ static bool IsStoreInstruction(const void* ptr)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(WIN32) && defined(CPU_X64)
|
||||
#if defined(WIN32) && (defined(CPU_X64) || defined(CPU_AARCH64))
|
||||
static PVOID s_veh_handle;
|
||||
|
||||
static LONG ExceptionHandler(PEXCEPTION_POINTERS exi)
|
||||
|
@ -190,7 +190,7 @@ bool InstallHandler(void* owner, Callback callback)
|
|||
|
||||
if (was_empty)
|
||||
{
|
||||
#if defined(WIN32) && defined(CPU_X64)
|
||||
#if defined(WIN32) && (defined(CPU_X64) || defined(CPU_AARCH64))
|
||||
s_veh_handle = AddVectoredExceptionHandler(1, ExceptionHandler);
|
||||
if (!s_veh_handle)
|
||||
{
|
||||
|
@ -247,7 +247,7 @@ bool RemoveHandler(void* owner)
|
|||
|
||||
if (m_handlers.empty())
|
||||
{
|
||||
#if defined(WIN32) && defined(CPU_X64)
|
||||
#if defined(WIN32) && (defined(CPU_X64) || defined(CPU_AARCH64))
|
||||
RemoveVectoredExceptionHandler(s_veh_handle);
|
||||
s_veh_handle = nullptr;
|
||||
#elif defined(USE_SIGSEGV)
|
||||
|
|
Loading…
Reference in a new issue