Merge pull request #5 from skidau/buildfix-0

OSX build fix by Juha Laukkanen.  This one works with wxWidgets 3.0 and Cairo 1.14.2.
This commit is contained in:
skidau 2015-07-11 10:35:50 +10:00
commit 8d22dfc526
2 changed files with 3 additions and 2 deletions

View File

@ -61,6 +61,7 @@ ENDIF( NOT VERSION )
# Fill in SDLMAIN_LIBRARY on OS X manually to avoid using SDLMain.m # Fill in SDLMAIN_LIBRARY on OS X manually to avoid using SDLMain.m
# OS X users will have to compile and install SDL from source. # OS X users will have to compile and install SDL from source.
if( APPLE AND ENABLE_SDL ) if( APPLE AND ENABLE_SDL )
ADD_DEFINITIONS (-DwxMAC_USE_CORE_GRAPHICS )
SET(SDLMAIN_LIBRARY "-lSDLmain") SET(SDLMAIN_LIBRARY "-lSDLmain")
endif( APPLE AND ENABLE_SDL ) endif( APPLE AND ENABLE_SDL )

View File

@ -2324,8 +2324,8 @@ void CairoDrawingPanel::DrawArea(wxWindowDC &dc)
cr = cairo_reference((cairo_t*)gc->GetNativeContext()); cr = cairo_reference((cairo_t*)gc->GetNativeContext());
#else #else
#if defined(__WXMAC__) && wxMAC_USE_CORE_GRAPHICS #if defined(__WXMAC__) && wxMAC_USE_CORE_GRAPHICS
CGContextRef* c = gc->GetNativeContext(); CGContextRef c = static_cast<CGContextRef>(gc->GetNativeContext());
cairo_surface_t* s = cairo_quartz_surface_create_for_cg_context(c); cairo_surface_t* s = cairo_quartz_surface_create_for_cg_context(c, width, height);
cr = cairo_create(s); cr = cairo_create(s);
cairo_surface_destroy(s); cairo_surface_destroy(s);
#else #else