(iOS) Wrong example code

This commit is contained in:
Twinaphex 2015-02-24 05:59:39 +01:00
parent 1448d55391
commit 2a0028b7b4

View File

@ -228,7 +228,7 @@ static bool apple_gfx_ctx_set_video_mode(void *data, unsigned width, unsigned he
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("nativeScale"));
RAScreen *screen = (RAScreen*)get_chosen_screen(); RAScreen *screen = (RAScreen*)get_chosen_screen();
if (!screen) if (!screen)
@ -237,7 +237,7 @@ CGFloat apple_gfx_ctx_get_native_scale(void)
(void)selector; (void)selector;
#ifdef IOS #ifdef IOS
if ([screen respondsToSelector:@selector(nativeScale)]) if ([[UIScreen mainScreen] respondsToSelector:selector])
{ {
float ret; float ret;
NSInvocation *invocation = [NSInvocation invocationWithMethodSignature: NSInvocation *invocation = [NSInvocation invocationWithMethodSignature: