|
|
This issue seems specific to the macOS platform of FLTK since Metal is involved.
Therefore, adding in your code a small bit of Objective-c should be a working solution.
Here is a suggestion:
starting from your Fl_Window * object (which can also be an Fl_Double_Window), say win,
NSView *view = [fl_xid(win) contentView];
will give you the NSView object, view, corresponding to this window,
NSSize s = [view convertSizeToBacking:NSMakeSize(10, 10)];
int scale = (int(s.width + 0.5) > 10 ? 2 : 1);
will give you the correct scale factor for your window, 2 if it's on a retina display,
1 if it's not.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
[ Direct Link to Message ] | |
|
| |