mirror of
https://github.com/fltk/fltk.git
synced 2026-05-29 04:26:27 +08:00
Fix crash in howto-drag-and-drop under macOS
This commit is contained in:
@@ -31,7 +31,8 @@ Fl_Quartz_Image_Surface_Driver::Fl_Quartz_Image_Surface_Driver(int w, int h, int
|
|||||||
if (high_res) {
|
if (high_res) {
|
||||||
s = Fl_Graphics_Driver::default_driver().scale();
|
s = Fl_Graphics_Driver::default_driver().scale();
|
||||||
Fl_Window *cw = Fl_Window::current();
|
Fl_Window *cw = Fl_Window::current();
|
||||||
if (cw && Fl_Cocoa_Window_Driver::driver(cw)->mapped_to_retina()) s *= 2;
|
Fl_Cocoa_Window_Driver *dr = cw ? Fl_Cocoa_Window_Driver::driver(cw) : NULL;
|
||||||
|
if (dr && dr->mapped_to_retina()) s *= 2;
|
||||||
W *= s; H *= s;
|
W *= s; H *= s;
|
||||||
}
|
}
|
||||||
CGColorSpaceRef lut = CGColorSpaceCreateDeviceRGB();
|
CGColorSpaceRef lut = CGColorSpaceCreateDeviceRGB();
|
||||||
|
|||||||
Reference in New Issue
Block a user