mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-13 01:29:11 +01:00
822326eea9
From wxWidgets master 81570ae070b35c9d52de47b1f14897f3ff1a66c7. include/wx/defs.h -- __w64 warning disable patch by comex brought forward. include/wx/msw/window.h -- added GetContentScaleFactor() which was not implemented on Windows but is necessary for wxBitmap scaling on Mac OS X so it needs to work to avoid #ifdef-ing the code. src/gtk/window.cpp -- Modified DoSetClientSize() to direct call wxWindowGTK::DoSetSize() instead of using public wxWindowBase::SetSize() which now prevents derived classes (like wxAuiToolbar) intercepting the call and breaking it. This matches Windows which does NOT need to call DoSetSize internally. End result is this fixes Dolphin's debug tools toolbars on Linux. src/osx/window_osx.cpp -- Same fix as for GTK since it has the same issue. src/msw/radiobox.cpp -- Hacked to fix display in HiDPI (was clipping off end of text). Updated CMakeLists for Linux and Mac OS X. Small code changes to Dolphin to fix debug error boxes, deprecation warnings, and retain previous UI behavior on Windows.
112 lines
3.1 KiB
C++
112 lines
3.1 KiB
C++
///////////////////////////////////////////////////////////////////////////////
|
|
// Name: wx/msw/stackwalk.h
|
|
// Purpose: wxStackWalker for MSW
|
|
// Author: Vadim Zeitlin
|
|
// Modified by:
|
|
// Created: 2005-01-08
|
|
// Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwindows.org>
|
|
// Licence: wxWindows licence
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _WX_MSW_STACKWALK_H_
|
|
#define _WX_MSW_STACKWALK_H_
|
|
|
|
#include "wx/arrstr.h"
|
|
|
|
// these structs are declared in windows headers
|
|
struct _CONTEXT;
|
|
struct _EXCEPTION_POINTERS;
|
|
|
|
// and these in dbghelp.h
|
|
struct _SYMBOL_INFO;
|
|
struct _SYMBOL_INFOW;
|
|
|
|
#if wxUSE_UNICODE
|
|
#define wxSYMBOL_INFO _SYMBOL_INFOW
|
|
#else // !wxUSE_UNICODE
|
|
#define wxSYMBOL_INFO _SYMBOL_INFO
|
|
#endif // wxUSE_UNICODE/!wxUSE_UNICODE
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// wxStackFrame
|
|
// ----------------------------------------------------------------------------
|
|
|
|
class WXDLLIMPEXP_BASE wxStackFrame : public wxStackFrameBase
|
|
{
|
|
private:
|
|
wxStackFrame *ConstCast() const
|
|
{ return const_cast<wxStackFrame *>(this); }
|
|
|
|
size_t DoGetParamCount() const { return m_paramTypes.GetCount(); }
|
|
|
|
public:
|
|
wxStackFrame(size_t level, void *address, size_t addrFrame)
|
|
: wxStackFrameBase(level, address)
|
|
{
|
|
m_hasName =
|
|
m_hasLocation = false;
|
|
|
|
m_addrFrame = addrFrame;
|
|
}
|
|
|
|
virtual size_t GetParamCount() const
|
|
{
|
|
ConstCast()->OnGetParam();
|
|
return DoGetParamCount();
|
|
}
|
|
|
|
virtual bool
|
|
GetParam(size_t n, wxString *type, wxString *name, wxString *value) const;
|
|
|
|
// callback used by OnGetParam(), don't call directly
|
|
void OnParam(wxSYMBOL_INFO *pSymInfo);
|
|
|
|
protected:
|
|
virtual void OnGetName();
|
|
virtual void OnGetLocation();
|
|
|
|
void OnGetParam();
|
|
|
|
|
|
// helper for debug API: it wants to have addresses as DWORDs
|
|
size_t GetSymAddr() const
|
|
{
|
|
return reinterpret_cast<size_t>(m_address);
|
|
}
|
|
|
|
private:
|
|
bool m_hasName,
|
|
m_hasLocation;
|
|
|
|
size_t m_addrFrame;
|
|
|
|
wxArrayString m_paramTypes,
|
|
m_paramNames,
|
|
m_paramValues;
|
|
};
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// wxStackWalker
|
|
// ----------------------------------------------------------------------------
|
|
|
|
class WXDLLIMPEXP_BASE wxStackWalker : public wxStackWalkerBase
|
|
{
|
|
public:
|
|
// we don't use ctor argument, it is for compatibility with Unix version
|
|
// only
|
|
wxStackWalker(const char * WXUNUSED(argv0) = NULL) { }
|
|
|
|
virtual void Walk(size_t skip = 1, size_t maxDepth = wxSTACKWALKER_MAX_DEPTH);
|
|
#if wxUSE_ON_FATAL_EXCEPTION
|
|
virtual void WalkFromException(size_t maxDepth = wxSTACKWALKER_MAX_DEPTH);
|
|
#endif // wxUSE_ON_FATAL_EXCEPTION
|
|
|
|
|
|
// enumerate stack frames from the given context
|
|
void WalkFrom(const _CONTEXT *ctx, size_t skip = 1, size_t maxDepth = wxSTACKWALKER_MAX_DEPTH);
|
|
void WalkFrom(const _EXCEPTION_POINTERS *ep, size_t skip = 1, size_t maxDepth = wxSTACKWALKER_MAX_DEPTH);
|
|
};
|
|
|
|
#endif // _WX_MSW_STACKWALK_H_
|
|
|