mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
CtrlCore: MacOS multimonitor with mixed UHD fix
git-svn-id: svn://ultimatepp.org/upp/trunk@13979 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
4ca54df979
commit
42bfcc3d93
1 changed files with 4 additions and 2 deletions
|
|
@ -72,12 +72,14 @@ void CocoInit(int argc, const char **argv, const char **envptr)
|
|||
Font::SetFace(0, ToString((CFStringRef)[sysfont familyName]), Font::TTF);
|
||||
|
||||
Ctrl::SetUHDEnabled(true);
|
||||
bool uhd = true;
|
||||
for (NSScreen *screen in [NSScreen screens]) {
|
||||
if([screen backingScaleFactor] > 1) {
|
||||
SetUHDMode(true);
|
||||
if([screen backingScaleFactor] < 2) {
|
||||
uhd = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
SetUHDMode(uhd);
|
||||
|
||||
Font::SetDefaultFont(StdFont(fceil(DPI([sysfont pointSize]))));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue