From df6dfb49702f5173d9f237296e8acb4e0ee711c0 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 5 Jul 2013 04:10:05 +0200 Subject: [PATCH] (OSX/iOS) Start renaming ios_ namespace -functions we're going to implement for OSX as well --- frontend/frontend_objc.c | 6 +++--- gfx/context/ioseagl_ctx.c | 4 ++-- gfx/gl.c | 4 ++-- ios/RetroArch/RAGameView.m | 4 ++-- ios/RetroArch/main.m | 2 +- ios/RetroArch/rarch_wrapper.h | 10 +++++----- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/frontend/frontend_objc.c b/frontend/frontend_objc.c index 0a8d6e4f89..5a0e85678e 100644 --- a/frontend/frontend_objc.c +++ b/frontend/frontend_objc.c @@ -88,7 +88,7 @@ void* rarch_main_apple(void* args) if (init_ret) { rarch_main_clear_state(); - dispatch_async_f(dispatch_get_main_queue(), (void*)1, ios_rarch_exited); + dispatch_async_f(dispatch_get_main_queue(), (void*)1, apple_rarch_exited); return 0; } @@ -124,7 +124,7 @@ void* rarch_main_apple(void* args) #else // This needs to be here to tell the GUI thread that the emulator loop has stopped, // the (void*)1 makes it display the 'Failed to load game' message. - dispatch_async_f(dispatch_get_main_queue(), (void*)1, ios_rarch_exited); + dispatch_async_f(dispatch_get_main_queue(), (void*)1, apple_rarch_exited); return 1; #endif } @@ -182,6 +182,6 @@ void* rarch_main_apple(void* args) rarch_main_clear_state(); - dispatch_async_f(dispatch_get_main_queue(), 0, ios_rarch_exited); + dispatch_async_f(dispatch_get_main_queue(), 0, apple_rarch_exited); return 0; } diff --git a/gfx/context/ioseagl_ctx.c b/gfx/context/ioseagl_ctx.c index b9bbc97274..3f17d75ded 100644 --- a/gfx/context/ioseagl_ctx.c +++ b/gfx/context/ioseagl_ctx.c @@ -78,7 +78,7 @@ static bool gfx_ctx_has_focus(void) static void gfx_ctx_swap_buffers(void) { - ios_flip_game_view(); + apple_flip_game_view(); } static void gfx_ctx_input_driver(const input_driver_t **input, void **input_data) @@ -101,7 +101,7 @@ const gfx_ctx_driver_t gfx_ctx_ios = { gfx_ctx_check_window, gfx_ctx_set_resize, gfx_ctx_has_focus, - ios_flip_game_view, + apple_flip_game_view, gfx_ctx_input_driver, NULL, NULL, diff --git a/gfx/gl.c b/gfx/gl.c index 90a7e8e1cb..a928746223 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -388,8 +388,8 @@ void gl_shader_set_coords(void *data, const struct gl_coords *coords, const math #ifdef IOS // There is no default frame buffer on IOS. -void ios_bind_game_view_fbo(void); -#define gl_bind_backbuffer() ios_bind_game_view_fbo() +void apple_bind_game_view_fbo(void); +#define gl_bind_backbuffer() apple_bind_game_view_fbo() #else #define gl_bind_backbuffer() pglBindFramebuffer(GL_FRAMEBUFFER, 0) #endif diff --git a/ios/RetroArch/RAGameView.m b/ios/RetroArch/RAGameView.m index b0ac957f4e..71dd844af9 100644 --- a/ios/RetroArch/RAGameView.m +++ b/ios/RetroArch/RAGameView.m @@ -168,7 +168,7 @@ void ios_destroy_game_view() [EAGLContext setCurrentContext:nil]; } -void ios_flip_game_view() +void apple_flip_game_view() { if (--g_fast_forward_skips < 0) { @@ -194,7 +194,7 @@ void ios_get_game_view_size(unsigned *width, unsigned *height) *height = *height ? *height : 480; } -void ios_bind_game_view_fbo() +void apple_bind_game_view_fbo(void) { dispatch_sync(dispatch_get_main_queue(), ^{ if (g_context) diff --git a/ios/RetroArch/main.m b/ios/RetroArch/main.m index 6f552a6cf9..4c1d197e7f 100644 --- a/ios/RetroArch/main.m +++ b/ios/RetroArch/main.m @@ -427,7 +427,7 @@ static void event_reload_config(void* userdata) @end -void ios_rarch_exited(void* result) +void apple_rarch_exited(void* result) { [[RetroArch_iOS get] rarchExited:result ? NO : YES]; } diff --git a/ios/RetroArch/rarch_wrapper.h b/ios/RetroArch/rarch_wrapper.h index b4bf3e020f..73575cc9ed 100644 --- a/ios/RetroArch/rarch_wrapper.h +++ b/ios/RetroArch/rarch_wrapper.h @@ -21,15 +21,15 @@ char* ios_get_rarch_system_directory(); // These functions should only be called as arguments to dispatch_sync -void ios_rarch_exited(void* result); +void apple_rarch_exited (void* result); // These functions must only be called in gfx/context/ioseagl_ctx.c -bool ios_init_game_view(); -void ios_destroy_game_view(); -void ios_flip_game_view(); +bool ios_init_game_view(void); +void ios_destroy_game_view(void); +void apple_flip_game_view(void); void ios_set_game_view_sync(unsigned interval); void ios_get_game_view_size(unsigned *width, unsigned *height); -void ios_bind_game_view_fbo(); +void apple_bind_game_view_fbo(void); void ios_add_log_message(const char* format, ...);