From 2087aa285e29ede190725a27f8c998ed119cdb9e Mon Sep 17 00:00:00 2001 From: Toad King Date: Mon, 20 Aug 2012 17:35:33 -0400 Subject: [PATCH] (GX) crash/compile fixes --- console/griffin/hook.h | 2 ++ console/rgui/rgui.c | 13 +++++-------- gx/frontend/main.c | 1 + 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/console/griffin/hook.h b/console/griffin/hook.h index 33329f88b7..d52ff6351b 100644 --- a/console/griffin/hook.h +++ b/console/griffin/hook.h @@ -98,6 +98,8 @@ #define video_set_aspect_ratio_func(aspectratio_idx) gx_set_aspect_ratio(driver.video_data, aspectratio_idx) #define video_stop_func() gx_stop() #define video_start_func() gx_start() +#define video_viewport_size_func(width, height) ((void)0) +#define video_read_viewport_func(buffer) (false) #define input_init_func() gx_input_initialize() #define input_poll_func() gx_input_poll(driver.input_data) diff --git a/console/rgui/rgui.c b/console/rgui/rgui.c index a45110baaf..b1875f9f07 100644 --- a/console/rgui/rgui.c +++ b/console/rgui/rgui.c @@ -417,9 +417,6 @@ static void render_text(rgui_handle_t *rgui) static void rgui_settings_toggle_setting(rgui_file_type_t setting, rgui_action_t action, rgui_file_type_t menu_type) { unsigned port = menu_type - RGUI_SETTINGS_CONTROLLER_1; -#ifdef GEKKO - gx_video_t *gx = (gx_video_t*)driver.video_data; -#endif switch (setting) { @@ -491,7 +488,7 @@ static void rgui_settings_toggle_setting(rgui_file_type_t setting, rgui_action_t if(g_console.gamma_correction > 0) { g_console.gamma_correction--; - driver.video->apply_state_changes(); + driver.video->apply_state_changes(); } } else if (action == RGUI_ACTION_RIGHT) @@ -499,7 +496,7 @@ static void rgui_settings_toggle_setting(rgui_file_type_t setting, rgui_action_t if(g_console.gamma_correction < MAX_GAMMA_SETTING) { g_console.gamma_correction++; - driver.video->apply_state_changes(); + driver.video->apply_state_changes(); } } break; @@ -533,17 +530,17 @@ static void rgui_settings_toggle_setting(rgui_file_type_t setting, rgui_action_t if (action == RGUI_ACTION_START) { rarch_settings_default(S_DEF_OVERSCAN); - driver.video->apply_state_changes(); + driver.video->apply_state_changes(); } else if (action == RGUI_ACTION_LEFT) { rarch_settings_change(S_OVERSCAN_DECREMENT); - driver.video->apply_state_changes(); + driver.video->apply_state_changes(); } else if (action == RGUI_ACTION_RIGHT) { rarch_settings_change(S_OVERSCAN_INCREMENT); - driver.video->apply_state_changes(); + driver.video->apply_state_changes(); } break; case RGUI_SETTINGS_AUDIO_MUTE: diff --git a/gx/frontend/main.c b/gx/frontend/main.c index 2694f6294c..e15e5f5f5f 100644 --- a/gx/frontend/main.c +++ b/gx/frontend/main.c @@ -348,6 +348,7 @@ int main(void) input_gx.init(); video_gx.start(); + driver.video = &video_gx; gx_video_t *gx = (gx_video_t*)driver.video_data; gx->menu_data = menu_framebuf;