From 239e4913820c0aae5660cf5d124b9ec5d9705688 Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Sun, 1 Apr 2012 01:01:01 +0200 Subject: [PATCH] (PS3) Implemented rotation callback function --- console/griffin/hook.h | 1 + ps3/menu.c | 6 +++--- ps3/ps3_video_psgl.c | 3 ++- ps3/ps3_video_psgl.h | 1 - 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/console/griffin/hook.h b/console/griffin/hook.h index 56bb4195dd..8b69c92d5b 100644 --- a/console/griffin/hook.h +++ b/console/griffin/hook.h @@ -39,6 +39,7 @@ #define video_focus_func() gl_focus(driver.video_data) #define video_xml_shader_func(path) driver.video->xml_shader(driver.video_data, path) #define video_free_func() gl_free(driver.video_data) +#define video_set_rotation_func(orientation) ps3graphics_set_orientation(driver.video_data, orientation) #define input_init_func() ps3_input_initialize() #define input_poll_func() ps3_input_poll(driver.input_data) diff --git a/ps3/menu.c b/ps3/menu.c index f55b14ea45..baf2888b4a 100644 --- a/ps3/menu.c +++ b/ps3/menu.c @@ -2176,7 +2176,7 @@ static void ingame_menu(uint32_t menu_id) if(g_console.screen_orientation > ORIENTATION_NORMAL) { g_console.screen_orientation--; - ps3graphics_set_orientation(g_console.screen_orientation); + video_gl.set_rotation(NULL, g_console.screen_orientation); set_delay = DELAY_LONG; } } @@ -2186,7 +2186,7 @@ static void ingame_menu(uint32_t menu_id) if((g_console.screen_orientation+1) < ORIENTATION_END) { g_console.screen_orientation++; - ps3graphics_set_orientation(g_console.screen_orientation); + video_gl.set_rotation(NULL, g_console.screen_orientation); set_delay = DELAY_LONG; } } @@ -2194,7 +2194,7 @@ static void ingame_menu(uint32_t menu_id) if(CTRL_START(state)) { g_console.screen_orientation = ORIENTATION_NORMAL; - ps3graphics_set_orientation(g_console.screen_orientation); + video_gl.set_rotation(NULL, g_console.screen_orientation); } strcpy(comment, "Press LEFT or RIGHT to change the [Orientation] settings.\nPress START to reset back to default values."); break; diff --git a/ps3/ps3_video_psgl.c b/ps3/ps3_video_psgl.c index e37bafbc8e..09309516dc 100644 --- a/ps3/ps3_video_psgl.c +++ b/ps3/ps3_video_psgl.c @@ -1696,8 +1696,9 @@ void gl_frame_menu (void) glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]); } -void ps3graphics_set_orientation(uint32_t orientation) +static void ps3graphics_set_orientation(void * data, uint32_t orientation) { + (void)data; switch (orientation) { case ORIENTATION_NORMAL: diff --git a/ps3/ps3_video_psgl.h b/ps3/ps3_video_psgl.h index 18c7dd8e8d..22d06c5e7b 100644 --- a/ps3/ps3_video_psgl.h +++ b/ps3/ps3_video_psgl.h @@ -135,7 +135,6 @@ void ps3_video_deinit(void); void ps3graphics_reinit_fbos (void); void ps3graphics_set_aspect_ratio(uint32_t aspectratio_index); void ps3graphics_set_overscan(bool overscan_enable, float amount, bool recalculate_viewport); -void ps3graphics_set_orientation(uint32_t orientation); void ps3graphics_set_vsync(uint32_t vsync); void ps3graphics_video_init(bool get_all_resolutions); void ps3graphics_video_reinit(void);