void-packages/srcpkgs/pcsx2/patches/6b7f20a9e048e4bd9d7760cb72e...

43 lines
1.2 KiB
Diff

From 6b7f20a9e048e4bd9d7760cb72e6335aee8155d4 Mon Sep 17 00:00:00 2001
From: John Zimmermann <me@johnnynator.dev>
Date: Thu, 2 Jul 2020 12:24:45 +0200
Subject: [PATCH] Allow running on systems without wx stackwalkler
closes #2796
---
pcsx2/gui/AppAssert.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git pcsx2/gui/AppAssert.cpp pcsx2/gui/AppAssert.cpp
index a282715c4e..4ce151f86f 100644
--- pcsx2/gui/AppAssert.cpp
+++ pcsx2/gui/AppAssert.cpp
@@ -19,6 +19,7 @@
#include <wx/stackwalk.h>
+#if wxUSE_STACKWALKER
class StackDump : public wxStackWalker
{
protected:
@@ -94,6 +95,7 @@ static wxString pxGetStackTrace( const FnChar_t* calledFrom )
dump.Walk( 3 );
return dump.GetStackTrace();
}
+#endif
#ifdef __WXDEBUG__
@@ -122,7 +124,11 @@ bool AppDoAssert( const DiagnosticOrigin& origin, const wxChar *msg )
static bool disableAsserts = false;
if( disableAsserts ) return false;
+#if wxUSE_STACKWALKER
wxString trace( pxGetStackTrace(origin.function) );
+#else
+ wxString trace( "Warning: Platform doesn't support wx stackwalker" );
+#endif
wxString dbgmsg( origin.ToString( msg ) );
wxMessageOutputDebug().Printf( L"%s", WX_STR(dbgmsg) );