diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index d993e84d29..366381c0de 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -70,7 +70,7 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, isGrouping = false; groupCounter = 0; -#ifdef __APPLE__ +#if RETINA_OPENGL_PATCH SetViewWantsBestResolution( true ); #endif @@ -126,7 +126,7 @@ void OPENGL_GAL::BeginDrawing() SetCurrent( *glContext ); clientDC = new wxClientDC( this ); -#ifdef __APPLE__ +#ifdef RETINA_OPENGL_PATCH const float scaleFactor = GetBackingScaleFactor(); #else const float scaleFactor = 1.0f; @@ -538,7 +538,7 @@ void OPENGL_GAL::ResizeScreen( int aWidth, int aHeight ) { screenSize = VECTOR2I( aWidth, aHeight ); -#ifdef __APPLE__ +#ifdef RETINA_OPENGL_PATCH const float scaleFactor = GetBackingScaleFactor(); #else const float scaleFactor = 1.0f; diff --git a/patches/wxwidgets-3.0.2_macosx_retina_opengl.patch b/patches/wxwidgets-3.0.2_macosx_retina_opengl.patch index 079d033cbf..0af995214d 100644 --- a/patches/wxwidgets-3.0.2_macosx_retina_opengl.patch +++ b/patches/wxwidgets-3.0.2_macosx_retina_opengl.patch @@ -1,5 +1,18 @@ ---- include/wx/osx/glcanvas.h 2015-05-16 15:40:21.000000000 +0200 -+++ include/wx/osx/glcanvas.h 2015-05-16 16:44:53.000000000 +0200 +diff -rupN include/wx/glcanvas.h include/wx/glcanvas.h +--- include/wx/glcanvas.h 2015-05-21 00:36:27.406145182 +0200 ++++ include/wx/glcanvas.h 2015-05-21 00:37:59.169474782 +0200 +@@ -19,6 +19,8 @@ + #include "wx/palette.h" + #include "wx/window.h" + ++#define RETINA_OPENGL_PATCH ++ + class WXDLLIMPEXP_FWD_GL wxGLCanvas; + class WXDLLIMPEXP_FWD_GL wxGLContext; + +diff -rupN include/wx/osx/glcanvas.h include/wx/osx/glcanvas.h +--- include/wx/osx/glcanvas.h 2015-05-21 00:36:27.419478515 +0200 ++++ include/wx/osx/glcanvas.h 2015-05-21 00:36:37.319478112 +0200 @@ -88,6 +88,9 @@ public: // update the view port of the current context to match this window void SetViewport(); @@ -10,8 +23,9 @@ // deprecated methods // ------------------ ---- src/osx/cocoa/glcanvas.mm 2015-05-16 15:40:24.000000000 +0200 -+++ src/osx/cocoa/glcanvas.mm 2015-05-16 17:10:50.000000000 +0200 +diff -rupN src/osx/cocoa/glcanvas.mm src/osx/cocoa/glcanvas.mm +--- src/osx/cocoa/glcanvas.mm 2015-05-21 00:36:27.542811843 +0200 ++++ src/osx/cocoa/glcanvas.mm 2015-05-21 00:36:37.322811445 +0200 @@ -313,6 +313,22 @@ bool wxGLCanvas::SwapBuffers() return true; }