Revert "Add OSX implementation for cocoagl_gfx_ctx_get_native_scale"

This reverts commit a408a5e59a57627b3ea9440e1ec26f04ad25c552.
This commit is contained in:
Twinaphex 2015-11-01 12:45:36 +01:00
parent a408a5e59a
commit 51426f64c2
2 changed files with 9 additions and 13 deletions

View File

@ -299,7 +299,7 @@ static bool cocoagl_gfx_ctx_set_video_mode(void *data,
(void)data;
/* TODO: Maybe iOS users should be able to show/hide the status bar here? */
// TODO: Maybe iOS users should be able to show/hide the status bar here?
return true;
}
@ -326,19 +326,12 @@ float cocoagl_gfx_ctx_get_native_scale(void)
if (!screen)
return 0.0f;
#if TARGET_OS_IPHONE
if ([screen respondsToSelector:selector])
return cocoagl_gfx_ctx_get_scale_from_selector(screen, selector, &ret);
#endif
ret = 1.0f;
#if TARGET_OS_IPHONE
if ([screen respondsToSelector:@selector(scale)])
ret = screen.scale;
#elif MAC_OS_X_VERSION_10_7
if (screen.backingScaleFactor > 1.0f)
ret = screen.backingScaleFactor;
#endif
return ret;
}

View File

@ -31,8 +31,6 @@
static id apple_platform;
extern float cocoagl_gfx_ctx_get_native_scale(void);
void apple_rarch_exited(void)
{
[[NSApplication sharedApplication] terminate:nil];
@ -112,11 +110,16 @@ void apple_rarch_exited(void)
{
NSPoint pos;
NSPoint mouse_pos;
CGFloat backing_scale_factor = cocoagl_gfx_ctx_get_native_scale();
/* Relative */
apple->mouse_rel_x = event.deltaX;
apple->mouse_rel_y = event.deltaY;
#if MAC_OS_X_VERSION_10_7
RAScreen *screen = [RAScreen mainScreen];
CGFloat backing_scale_factor = screen.backingScaleFactor;
#else
CGFloat backing_scale_factor = 1.0f;
#endif
/* Absolute */
pos = [[CocoaView get] convertPoint:[event locationInWindow] fromView:nil];