diff --git a/console/rmenu/context/rmenu_ctx_ps3.c b/console/rmenu/context/rmenu_ctx_ps3.c
index 87de72d2a5..91a3769c1a 100644
--- a/console/rmenu/context/rmenu_ctx_ps3.c
+++ b/console/rmenu/context/rmenu_ctx_ps3.c
@@ -14,6 +14,10 @@
* If not, see .
*/
+#ifdef HAVE_SYSUTILS
+#include
+#endif
+
#include "../rmenu.h"
#include "../../../gfx/context/ps3_ctx.h"
@@ -47,6 +51,14 @@ static void rmenu_ctx_ps3_render_bg(rmenu_position_t *position)
(void)position;
}
+static void rmenu_ctx_ps3_swap_buffers(void)
+{
+ gfx_ctx_swap_buffers();
+#ifdef HAVE_SYSUTILS
+ cellSysutilCheckCallback();
+#endif
+}
+
const rmenu_context_t rmenu_ctx_ps3 = {
.clear = rmenu_ctx_ps3_clear,
.blend = rmenu_ctx_ps3_blend,
@@ -54,4 +66,5 @@ const rmenu_context_t rmenu_ctx_ps3 = {
.init_textures = rmenu_ctx_ps3_init_textures,
.render_selection_panel = rmenu_ctx_ps3_render_selection_panel,
.render_bg = rmenu_ctx_ps3_render_bg,
-};
\ No newline at end of file
+ .swap_buffers = rmenu_ctx_ps3_swap_buffers,
+};
diff --git a/console/rmenu/context/rmenu_ctx_xdk.c b/console/rmenu/context/rmenu_ctx_xdk.c
index e0acee0a2a..828dc844a7 100644
--- a/console/rmenu/context/rmenu_ctx_xdk.c
+++ b/console/rmenu/context/rmenu_ctx_xdk.c
@@ -89,6 +89,11 @@ static void rmenu_ctx_xdk_render_bg(rmenu_position_t *position)
texture_image_render(&m_menuMainBG);
}
+static void rmenu_ctx_xdk_swap_buffers(void)
+{
+ gfx_ctx_swap_buffers();
+}
+
const rmenu_context_t rmenu_ctx_xdk = {
rmenu_ctx_xdk_clear,
rmenu_ctx_xdk_blend,
@@ -96,4 +101,5 @@ const rmenu_context_t rmenu_ctx_xdk = {
rmenu_ctx_xdk_init_textures,
rmenu_ctx_xdk_render_selection_panel,
rmenu_ctx_xdk_render_bg,
+ rmenu_ctx_xdk_swap_buffers,
};
diff --git a/console/rmenu/rmenu.c b/console/rmenu/rmenu.c
index 9e599f16e2..c5f7242e5f 100644
--- a/console/rmenu/rmenu.c
+++ b/console/rmenu/rmenu.c
@@ -16,7 +16,6 @@
#if defined(__CELLOS_LV2__)
#include
-#include
#include
#if(CELL_SDK_VERSION > 0x340000)
@@ -51,12 +50,6 @@
#endif
#include "../../gfx/gfx_context.h"
-#if defined(__CELLOS_LV2__)
-#include "../../gfx/context/ps3_ctx.h"
-#elif defined(_XBOX)
-#include "../../gfx/context/xdk_ctx.h"
-#endif
-
#if defined(HAVE_CG)
#include "../../gfx/shader_cg.h"
#endif
@@ -1002,10 +995,7 @@ static void rarch_filename_input_and_save (unsigned filename_type)
while(OSK_IS_RUNNING(g_console.oskutil_handle))
{
context->clear();
- gfx_ctx_swap_buffers();
-#ifdef HAVE_SYSUTILS
- cellSysutilCheckCallback();
-#endif
+ context->swap_buffers();
}
if(g_console.oskutil_handle.text_can_be_fetched)
@@ -1038,10 +1028,7 @@ static void rarch_filename_input_and_save (unsigned filename_type)
{
/* OSK Util gets updated */
context->clear();
- gfx_ctx_swap_buffers();
-#ifdef HAVE_SYSUTILS
- cellSysutilCheckCallback();
-#endif
+ context->swap_buffers();
}
if(g_console.oskutil_handle.text_can_be_fetched)
@@ -1412,10 +1399,7 @@ static void producesettingentry(menu *current_menu, item *items, unsigned switch
while(OSK_IS_RUNNING(g_console.oskutil_handle))
{
context->clear();
- gfx_ctx_swap_buffers();
-#ifdef HAVE_SYSUTILS
- cellSysutilCheckCallback();
-#endif
+ context->swap_buffers();
}
if(g_console.oskutil_handle.text_can_be_fetched)
@@ -2557,10 +2541,7 @@ void menu_loop(void)
render_msg_place_func(msg_queue_x_position, msg_queue_y_position, msg_queue_font_size, WHITE, message);
}
- gfx_ctx_swap_buffers();
-#ifdef HAVE_SYSUTILS
- cellSysutilCheckCallback();
-#endif
+ context->swap_buffers();
if(current_menu->enum_id == INGAME_MENU_RESIZE && (old_state & (1 << RETRO_DEVICE_ID_JOYPAD_Y)) || current_menu->enum_id == INGAME_MENU_SCREENSHOT)
{ }
diff --git a/console/rmenu/rmenu.h b/console/rmenu/rmenu.h
index 634b2e4956..54629109a8 100644
--- a/console/rmenu/rmenu.h
+++ b/console/rmenu/rmenu.h
@@ -111,6 +111,7 @@ typedef struct rmenu_context
void (*init_textures)(void);
void (*render_selection_panel)(rmenu_position_t *position);
void (*render_bg)(rmenu_position_t *position);
+ void (*swap_buffers)(void);
} rmenu_context_t;
enum
| |