mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-05-09 03:41:10 +08:00
Mac OS X remove highdpi
This commit is contained in:
parent
46de461733
commit
43f0646be6
@ -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 ];
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user