MacOS: Force disable application HiDPI support on NSView, fixes #794

This commit is contained in:
LD 2019-11-28 22:24:30 +01:00
parent d8481e7d22
commit f72c72b36a

View File

@ -549,6 +549,11 @@ open_window() {
_parent_window_handle->attach_child(_window_handle);
}
// Always disable application HiDPI support, Cocoa will do the eventual upscaling for us.
// Note: setWantsBestResolutionOpenGLSurface method is supported from MacOS 10.7 onwards
if ([_view respondsToSelector:@selector(setWantsBestResolutionOpenGLSurface:)]) {
[_view setWantsBestResolutionOpenGLSurface:NO];
}
if (_properties.has_icon_filename()) {
NSImage *image = load_image(_properties.get_icon_filename());
if (image != nil) {