From 8655885818137bc46fca80e4f662bbfb6975f83f Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 13 May 2015 13:35:38 +1000 Subject: Bug [#1703]. Fix bug when drawing text margins in buffered mode which would use default encoding instead of chosen encoding. --- cocoa/PlatCocoa.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cocoa') diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 442f1f3bb..02cae162b 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -223,7 +223,7 @@ void SurfaceImpl::Init(SurfaceID sid, WindowID) //-------------------------------------------------------------------------------------------------- -void SurfaceImpl::InitPixMap(int width, int height, Surface* /* surface_ */, WindowID /* wid */) +void SurfaceImpl::InitPixMap(int width, int height, Surface* surface_, WindowID /* wid */) { Release(); @@ -269,6 +269,10 @@ void SurfaceImpl::InitPixMap(int width, int height, Surface* /* surface_ */, Win CGContextSetRGBFillColor( gc, 1.0, 1.0, 1.0, 1.0 ); CGContextFillRect( gc, CGRectMake( 0, 0, width, height ) ); } + + SurfaceImpl *psurfOther = static_cast(surface_); + unicodeMode = psurfOther->unicodeMode; + codePage = psurfOther->codePage; } //-------------------------------------------------------------------------------------------------- -- cgit v1.2.3