(iOS) Use apple_gfx_ctx_get_native_scale for handle_touch_event too -

should hopefully fix touch overlay issues on iPhone 6+
This commit is contained in:
Twinaphex 2015-02-24 05:40:45 +01:00
parent 3b06c727b0
commit 1448d55391
2 changed files with 4 additions and 3 deletions

View File

@ -226,7 +226,7 @@ static bool apple_gfx_ctx_set_video_mode(void *data, unsigned width, unsigned he
return true; return true;
} }
static CGFloat apple_gfx_ctx_get_native_scale(void) CGFloat apple_gfx_ctx_get_native_scale(void)
{ {
SEL selector = NSSelectorFromString(BOXSTRING("scale")); SEL selector = NSSelectorFromString(BOXSTRING("scale"));
RAScreen *screen = (RAScreen*)get_chosen_screen(); RAScreen *screen = (RAScreen*)get_chosen_screen();

View File

@ -83,13 +83,14 @@ const void* apple_get_frontend_settings(void)
return settings; return settings;
} }
extern CGFloat apple_gfx_ctx_get_native_scale(void);
// Input helpers: This is kept here because it needs objective-c /* Input helpers: This is kept here because it needs ObjC */
static void handle_touch_event(NSArray* touches) static void handle_touch_event(NSArray* touches)
{ {
NSUInteger i; NSUInteger i;
apple_input_data_t *apple = (apple_input_data_t*)driver.input_data; apple_input_data_t *apple = (apple_input_data_t*)driver.input_data;
const float scale = [[UIScreen mainScreen] scale]; const float scale = apple_gfx_ctx_get_native_scale();
if (!apple) if (!apple)
return; return;