X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/48d63da328f1c10d45a39fd08f3919e7f5ae7386..11bf9fea53d75b460aaa4028a591917b6dd6fe54:/src/stc/PlatWX.cpp diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index af67c0cdaa..b752c39689 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -211,13 +211,14 @@ void SurfaceImpl::Init(SurfaceID hdc_, WindowID) { hdc = (wxDC*)hdc_; } -void SurfaceImpl::InitPixMap(int width, int height, Surface *WXUNUSED(surface_), WindowID) { +void SurfaceImpl::InitPixMap(int width, int height, Surface *WXUNUSED(surface_), WindowID winid) { Release(); hdc = new wxMemoryDC(); hdcOwned = true; if (width < 1) width = 1; if (height < 1) height = 1; - bitmap = new wxBitmap(width, height); + bitmap = new wxBitmap(); + bitmap->CreateScaled(width, height,wxBITMAP_SCREEN_DEPTH,((wxWindow*)winid)->GetContentScaleFactor()); ((wxMemoryDC*)hdc)->SelectObject(*bitmap); } @@ -1409,7 +1410,7 @@ ColourDesired Platform::ChromeHighlight() { const char *Platform::DefaultFont() { static char buf[128]; - strcpy(buf, wxNORMAL_FONT->GetFaceName().mbc_str()); + wxStrlcpy(buf, wxNORMAL_FONT->GetFaceName().mbc_str(), WXSIZEOF(buf)); return buf; }