mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
(iOS) 'ret' needs to be passed as pointer
This commit is contained in:
parent
165b502948
commit
000e61dc66
@ -271,16 +271,15 @@ static bool cocoagl_gfx_ctx_set_video_mode(void *data, unsigned width, unsigned
|
||||
return true;
|
||||
}
|
||||
|
||||
static float cocoagl_gfx_ctx_get_scale_from_selector(RAScreen *screen, SEL selector)
|
||||
static float cocoagl_gfx_ctx_get_scale_from_selector(RAScreen *screen, SEL selector, float *ret)
|
||||
{
|
||||
float ret;
|
||||
NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:
|
||||
[[screen class] instanceMethodSignatureForSelector:selector]];
|
||||
[invocation setSelector:selector];
|
||||
[invocation setTarget:screen];
|
||||
[invocation invoke];
|
||||
[invocation getReturnValue:&ret];
|
||||
return ret;
|
||||
[invocation getReturnValue:ret];
|
||||
return *ret;
|
||||
}
|
||||
|
||||
float cocoagl_gfx_ctx_get_native_scale(void)
|
||||
@ -295,7 +294,7 @@ float cocoagl_gfx_ctx_get_native_scale(void)
|
||||
return 0.0f;
|
||||
|
||||
if ([screen respondsToSelector:selector])
|
||||
return cocoagl_gfx_ctx_get_scale_from_selector(screen, selector);
|
||||
return cocoagl_gfx_ctx_get_scale_from_selector(screen, selector, &ret);
|
||||
|
||||
ret = 1.0f;
|
||||
if ([screen respondsToSelector:@selector(scale)])
|
||||
|
Loading…
x
Reference in New Issue
Block a user