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.
105 lines
2.5 KiB
C++
105 lines
2.5 KiB
C++
///////////////////////////////////////////////////////////////////////////////
|
|
// Name: wx/msw/private/event.h
|
|
// Purpose: Simple Windows 'event object' wrapper.
|
|
// Author: Troelsk, Vadim Zeitlin
|
|
// Created: 2014-05-07
|
|
// Copyright: (c) 2014 wxWidgets team
|
|
// Licence: wxWindows licence
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _WX_MSW_PRIVATE_EVENT_H_
|
|
#define _WX_MSW_PRIVATE_EVENT_H_
|
|
|
|
#include "wx/msw/private.h"
|
|
|
|
namespace wxWinAPI
|
|
{
|
|
|
|
class Event : public AutoHANDLE<0>
|
|
{
|
|
public:
|
|
enum Kind
|
|
{
|
|
ManualReset,
|
|
AutomaticReset
|
|
};
|
|
|
|
enum InitialState
|
|
{
|
|
Signaled,
|
|
Nonsignaled
|
|
};
|
|
|
|
Event()
|
|
{
|
|
}
|
|
|
|
// Wrappers around {Create,Set,Reset}Event() Windows API functions, with
|
|
// the same semantics.
|
|
bool Create(Kind kind = AutomaticReset,
|
|
InitialState initialState = Nonsignaled,
|
|
const wxChar* name = NULL);
|
|
bool Set();
|
|
bool Reset();
|
|
|
|
private:
|
|
wxDECLARE_NO_COPY_CLASS(Event);
|
|
};
|
|
|
|
} // namespace wxWinAPI
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// Implementations requiring windows.h; these are to moved out-of-line if
|
|
// this class is moved to a public header, or if [parts of] msw/private.h is
|
|
// changed to not depend on windows.h being included.
|
|
// ----------------------------------------------------------------------------
|
|
|
|
inline bool
|
|
wxWinAPI::Event::Create(wxWinAPI::Event::Kind kind,
|
|
wxWinAPI::Event::InitialState initialState,
|
|
const wxChar* name)
|
|
{
|
|
wxCHECK_MSG( !IsOk(), false, wxS("Event can't be created twice") );
|
|
|
|
WXHANDLE handle = ::CreateEvent(NULL,
|
|
kind == ManualReset,
|
|
initialState == Signaled,
|
|
name);
|
|
if ( !handle )
|
|
{
|
|
wxLogLastError(wxS("CreateEvent"));
|
|
return false;
|
|
}
|
|
|
|
m_handle = handle;
|
|
return true;
|
|
}
|
|
|
|
inline bool wxWinAPI::Event::Set()
|
|
{
|
|
wxCHECK_MSG( m_handle, false, wxS("Event must be valid") );
|
|
|
|
if ( !::SetEvent(m_handle) )
|
|
{
|
|
wxLogLastError(wxS("SetEvent"));
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
inline bool wxWinAPI::Event::Reset()
|
|
{
|
|
wxCHECK_MSG( m_handle, false, wxS("Event must be valid") );
|
|
|
|
if ( !::ResetEvent(m_handle) )
|
|
{
|
|
wxLogLastError(wxS("ResetEvent"));
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
#endif // _WX_MSW_PRIVATE_EVENT_H_
|