From 43f0646be6f0ffc3abf53d4dd500328e6266da0f Mon Sep 17 00:00:00 2001 From: Jonathan Campbell Date: Sat, 13 Apr 2019 23:34:20 -0700 Subject: [PATCH] Mac OS X remove highdpi --- vs2015/sdl/src/video/quartz/SDL_QuartzVideo.m | 10 ---------- vs2015/sdl/src/video/quartz/SDL_QuartzWM.m | 14 -------------- vs2015/sdl/src/video/quartz/SDL_QuartzWindow.m | 12 ------------ 3 files changed, 36 deletions(-) diff --git a/vs2015/sdl/src/video/quartz/SDL_QuartzVideo.m b/vs2015/sdl/src/video/quartz/SDL_QuartzVideo.m index 26b0aa5eb..2496f7dea 100644 --- a/vs2015/sdl/src/video/quartz/SDL_QuartzVideo.m +++ b/vs2015/sdl/src/video/quartz/SDL_QuartzVideo.m @@ -48,8 +48,6 @@ static inline BOOL IS_SNOW_LEOPARD_OR_LATER(_THIS) return (system_version >= 0x1060); } -extern bool sdl1_hax_highdpi_enable; - static NSWindow *my_qz_window = nil; unsigned char wants_topmost = 0; @@ -1110,11 +1108,6 @@ static SDL_Surface* QZ_SetVideoWindowed (_THIS, SDL_Surface *current, int width, return NULL; } - /* need to convert width and height according to backing store scale (HighDPI). - Sorry pre-Mac OS X 10.7.x users */ - if (sdl1_hax_highdpi_enable) - contentRect = [ qz_window convertRectFromBacking:contentRect ]; - [ qz_window setContentSize:contentRect.size ]; my_qz_window = qz_window; @@ -1142,9 +1135,6 @@ static SDL_Surface* QZ_SetVideoWindowed (_THIS, SDL_Surface *current, int width, } /* We already have a window, just change its size */ else { - if (sdl1_hax_highdpi_enable) - contentRect = [ qz_window convertRectFromBacking:contentRect ]; - [ qz_window setContentSize:contentRect.size ]; current->flags |= (SDL_NOFRAME|SDL_RESIZABLE) & mode_flags; [ window_view setFrameSize:contentRect.size ]; diff --git a/vs2015/sdl/src/video/quartz/SDL_QuartzWM.m b/vs2015/sdl/src/video/quartz/SDL_QuartzWM.m index 9bf7b8b77..3f1eaeb6c 100644 --- a/vs2015/sdl/src/video/quartz/SDL_QuartzWM.m +++ b/vs2015/sdl/src/video/quartz/SDL_QuartzWM.m @@ -161,8 +161,6 @@ void QZ_PrivateLocalToGlobal (_THIS, NSPoint *p) { *p = [ qz_window convertBaseToScreen:*p ]; } -extern bool sdl1_hax_highdpi_enable; - /* Convert SDL coordinate to Cocoa coordinate */ void QZ_PrivateSDLToCocoa (_THIS, NSPoint *p) { { @@ -173,12 +171,6 @@ void QZ_PrivateSDLToCocoa (_THIS, NSPoint *p) { p->y = (p->y * b.size.height) / f.size.height; } - if (sdl1_hax_highdpi_enable && qz_window) { - const CGFloat scale = [ qz_window backingScaleFactor ];//FIXME: Anything better? - p->x /= scale; - p->y /= scale; - } - if ( CGDisplayIsCaptured (display_id) ) { /* capture signals fullscreen */ p->y = CGDisplayPixelsHigh (display_id) - p->y; } @@ -205,12 +197,6 @@ void QZ_PrivateCocoaToSDL (_THIS, NSPoint *p) { *p = [ window_view convertPoint:*p fromView: nil ]; p->y = [window_view frame].size.height - p->y; } - - if (sdl1_hax_highdpi_enable && qz_window) { - const CGFloat scale = [ qz_window backingScaleFactor ];//FIXME: Anything better? - p->x *= scale; - p->y *= scale; - } } /* Convert SDL coordinate to window server (CoreGraphics) coordinate */ diff --git a/vs2015/sdl/src/video/quartz/SDL_QuartzWindow.m b/vs2015/sdl/src/video/quartz/SDL_QuartzWindow.m index 0de0e03db..13713af46 100644 --- a/vs2015/sdl/src/video/quartz/SDL_QuartzWindow.m +++ b/vs2015/sdl/src/video/quartz/SDL_QuartzWindow.m @@ -25,15 +25,6 @@ #include "SDL_QuartzWM.h" #include "SDL_QuartzWindow.h" -bool sdl1_hax_highdpi_enable = false; - -void sdl1_hax_macosx_highdpi_set_enable(const bool enable) { - if (sdl1_hax_highdpi_enable != enable) { - sdl1_hax_highdpi_enable = enable; - // TODO: Force reinitialization of the window - } -} - /* This function makes the *SDL region* of the window 100% opaque. The genie effect uses the alpha component. Otherwise, @@ -150,9 +141,6 @@ void sdl1_hax_make_touch_bar_set_callback(NSTouchBar* (*newcb)(NSWindow*)) { newViewFrame = [ window_view frame ]; - if (sdl1_hax_highdpi_enable) - newViewFrame = [ qz_window convertRectToBacking:newViewFrame ]; - SDL_PrivateResize (newViewFrame.size.width, newViewFrame.size.height); } }