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.
74 lines
2.4 KiB
C++
74 lines
2.4 KiB
C++
///////////////////////////////////////////////////////////////////////////////
|
|
// Name: wx/msw/evtloop.h
|
|
// Purpose: wxEventLoop class for wxMSW port
|
|
// Author: Vadim Zeitlin
|
|
// Modified by:
|
|
// Created: 2004-07-31
|
|
// Copyright: (c) 2003-2004 Vadim Zeitlin <vadim@wxwindows.org>
|
|
// Licence: wxWindows licence
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _WX_MSW_EVTLOOP_H_
|
|
#define _WX_MSW_EVTLOOP_H_
|
|
|
|
#include "wx/dynarray.h"
|
|
#include "wx/msw/wrapwin.h"
|
|
#include "wx/window.h"
|
|
#include "wx/msw/evtloopconsole.h" // for wxMSWEventLoopBase
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// wxEventLoop
|
|
// ----------------------------------------------------------------------------
|
|
|
|
WX_DECLARE_EXPORTED_OBJARRAY(MSG, wxMSGArray);
|
|
|
|
class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxMSWEventLoopBase
|
|
{
|
|
public:
|
|
wxGUIEventLoop() { }
|
|
|
|
// process a single message: calls PreProcessMessage() before dispatching
|
|
// it
|
|
virtual void ProcessMessage(WXMSG *msg);
|
|
|
|
// preprocess a message, return true if processed (i.e. no further
|
|
// dispatching required)
|
|
virtual bool PreProcessMessage(WXMSG *msg);
|
|
|
|
// set the critical window: this is the window such that all the events
|
|
// except those to this window (and its children) stop to be processed
|
|
// (typical examples: assert or crash report dialog)
|
|
//
|
|
// calling this function with NULL argument restores the normal event
|
|
// handling
|
|
static void SetCriticalWindow(wxWindowMSW *win) { ms_winCritical = win; }
|
|
|
|
// return true if there is no critical window or if this window is [a child
|
|
// of] the critical one
|
|
static bool AllowProcessing(wxWindowMSW *win)
|
|
{
|
|
return !ms_winCritical || IsChildOfCriticalWindow(win);
|
|
}
|
|
|
|
// override/implement base class virtuals
|
|
virtual bool Dispatch();
|
|
virtual int DispatchTimeout(unsigned long timeout);
|
|
|
|
protected:
|
|
virtual void OnNextIteration();
|
|
virtual void DoYieldFor(long eventsToProcess);
|
|
|
|
private:
|
|
// check if the given window is a child of ms_winCritical (which must be
|
|
// non NULL)
|
|
static bool IsChildOfCriticalWindow(wxWindowMSW *win);
|
|
|
|
// array of messages used for temporary storage by YieldFor()
|
|
wxMSGArray m_arrMSG;
|
|
|
|
// critical window or NULL
|
|
static wxWindowMSW *ms_winCritical;
|
|
};
|
|
|
|
#endif // _WX_MSW_EVTLOOP_H_
|