diff --git a/console/console_ext.h b/console/console_ext.h
index 1c5f7646c0..a479278a9a 100644
--- a/console/console_ext.h
+++ b/console/console_ext.h
@@ -50,6 +50,8 @@ struct aspect_ratio_elem
float value;
};
+extern struct aspect_ratio_elem aspectratio_lut[ASPECT_RATIO_END];
+
#include "console_ext_input.h"
/*============================================================
diff --git a/console/griffin/func_hooks.h b/console/griffin/func_hooks.h
index ed391ce23c..6aa2dfbda5 100644
--- a/console/griffin/func_hooks.h
+++ b/console/griffin/func_hooks.h
@@ -19,7 +19,7 @@
/*============================================================
GENERAL
============================================================ */
-#if defined(__CELLOS_LV2__) || defined(_XBOX)
+#if defined(__CELLOS_LV2__) || defined(_XBOX) || defined(GEKKO)
#define HAVE_GRIFFIN_OVERRIDE_VIDEO_FRAME_FUNC 1
#endif
diff --git a/console/griffin/griffin.c b/console/griffin/griffin.c
deleted file mode 100644
index 5ecb01a2de..0000000000
--- a/console/griffin/griffin.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/* SSNES - A frontend for libretro.
- * Copyright (C) 2010-2012 - Hans-Kristian Arntzen
- * Copyright (C) 2011-2012 - Daniel De Matteis
- *
- * SSNES is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Found-
- * ation, either version 3 of the License, or (at your option) any later version.
- *
- * SSNES is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with SSNES.
- * If not, see .
- */
-
-#if defined(_XBOX)
-#include "../../msvc/msvc_compat.h"
-#endif
-
-/*============================================================
- CONSOLE EXTENSIONS
-============================================================ */
-#include "../console_ext.c"
-
-/*============================================================
- COMPATIBILITY
-============================================================ */
-#include "../../compat/compat.c"
-
-/*============================================================
- CONFIG FILE
-============================================================ */
-#ifdef _XBOX
-#undef __SSNES_POSIX_STRING_H
-#undef __SSNES_MSVC_COMPAT_H
-#undef strcasecmp
-#endif
-#include "../../conf/config_file.c"
-
-#include "func_hooks.h"
-
-/*============================================================
- VIDEO
-============================================================ */
-#if defined(__CELLOS_LV2__)
-#include "../../gfx/shader_cg.c"
-#include "../../ps3/ps3_video_psgl.c"
-#include "../../ps3/image.c"
-#elif defined(_XBOX)
-#include "../../360/xdk360_video.cpp"
-#include "../../360/fonts.cpp"
-#endif
-
-/*============================================================
- INPUT
-============================================================ */
-#if defined(__CELLOS_LV2__)
-#include "../../ps3/ps3_input.c"
-#elif defined(_XBOX)
-#include "../../360/xdk360_input.c"
-#endif
-
-/*============================================================
- SNES STATE
-============================================================ */
-#include "../../gfx/state_tracker.c"
-
-/*============================================================
- DRIVERS
-============================================================ */
-#include "../../driver.c"
-
-/*============================================================
- FIFO BUFFER
-============================================================ */
-#include "../../fifo_buffer.c"
-
-/*============================================================
- AUDIO HERMITE
-============================================================ */
-#include "../../audio/hermite.c"
-
-/*============================================================
- RSOUND
-============================================================ */
-#ifdef __CELLOS_LV2__
-#include "../../console/librsound/librsound.c"
-#include "../../audio/rsound.c"
-#endif
-
-/*============================================================
- AUDIO UTILS
-============================================================ */
-#include "../../audio/utils.c"
-
-/*============================================================
- AUDIO
-============================================================ */
-#if defined(__CELLOS_LV2__)
-#include "../../ps3/ps3_audio.c"
-#elif defined(_XBOX)
-#include "../../360/xdk360_audio.cpp"
-#endif
-
-/*============================================================
- DYNAMIC
-============================================================ */
-#include "../../dynamic.c"
-
-/*============================================================
- FILE
-============================================================ */
-#if defined(__CELLOS_LV2__) || defined(_XBOX)
-#include "../fileio/file_browser.c"
-#endif
-#include "../../file.c"
-#include "../../file_path.c"
-
-/*============================================================
- MESSAGE
-============================================================ */
-#include "../../message.c"
-
-/*============================================================
- PATCH
-============================================================ */
-#include "../../patch.c"
-
-/*============================================================
- SETTINGS
-============================================================ */
-#include "../../settings.c"
-
-/*============================================================
- REWIND
-============================================================ */
-#include "../../rewind.c"
-
-
-
-/*============================================================
- MAIN
-============================================================ */
-#if defined(__CELLOS_LV2__)
-#include "../../ps3/main.c"
-#elif defined(_XBOX)
-#include "../../360/main.c"
-#endif
-
-/*============================================================
- SSNES
-============================================================ */
-#include "../../ssnes.c"
-
-/*============================================================
- THREAD
-============================================================ */
-#include "../../thread.c"
-
-/*============================================================
- NETPLAY
-============================================================ */
-#include "../../netplay.c"
-
-/*============================================================
- MENU
-============================================================ */
-#if defined(__CELLOS_LV2__)
-#include "../../ps3/menu.c"
-#elif defined(_XBOX)
-#include "../../360/menu.cpp"
-#endif
diff --git a/console/griffin/hook.h b/console/griffin/hook.h
index 16ac93f626..303180dc36 100644
--- a/console/griffin/hook.h
+++ b/console/griffin/hook.h
@@ -71,4 +71,29 @@
xdk360_input_state(driver.input_data, snes_keybinds, port, device, index, id)
#define input_key_pressed_func(key) xdk360_key_pressed(driver.input_data, key)
#define input_free_func() xdk360_free_input(driver.input_data)
+
+/*============================================================
+ GAMECUBE / WII
+============================================================ */
+
+#elif defined(GEKKO)
+
+#define video_init_func(video_info, input, input_data) wii_init(video_info, input, input_data)
+#define video_frame_func(data, width, height, pitch, msg) \
+ wii_frame(driver.video_data, data, width, height, pitch, msg)
+#define video_set_nonblock_state_func(state) wii_set_nonblock_state(driver.video_data, state)
+#define video_alive_func() wii_alive(driver.video_data)
+#define video_focus_func() wii_focus(driver.video_data)
+#define video_xml_shader_func(path) driver.video->xml_shader(driver.video_data, path)
+#define video_free_func() wii_free(driver.video_data)
+#define video_set_rotation_func(orientation) wii_set_orientation(driver.video_data, orientation)
+#define video_set_aspect_ratio_func(aspectratio_idx) wii_set_aspect_ratio(driver.video_data, aspectratio_idx)
+
+#define input_init_func() wii_input_initialize()
+#define input_poll_func() wii_input_poll(driver.input_data)
+#define input_input_state_func(snes_keybinds, port, device, index, id) \
+ wii_input_state(driver.input_data, snes_keybinds, port, device, index, id)
+#define input_key_pressed_func(key) wii_key_pressed(driver.input_data, key)
+#define input_free_func() wii_free_input(driver.input_data)
+
#endif
diff --git a/wii/video.c b/wii/video.c
index 9cc2ea0c36..82568f5272 100644
--- a/wii/video.c
+++ b/wii/video.c
@@ -16,6 +16,7 @@
#include "../driver.h"
#include "../general.h"
#include "driver.h"
+#include "../console/console_ext.h"
#include
#include
#include
@@ -274,6 +275,30 @@ static void wii_free(void *data)
(void)data;
}
+static void wii_swap(void * data)
+{
+ (void)data;
+ /* TODO */
+}
+
+static void wii_set_aspect_ratio(void * data, uint32_t aspectratio_index)
+{
+ (void)data;
+
+ g_settings.video.aspect_ratio = aspectratio_lut[g_console.aspect_ratio_index].value;
+ g_settings.video.force_aspect = false;
+
+ /* TODO */
+}
+
+static void wii_set_rotation(void * data, uint32_t orientation)
+{
+ (void)data;
+ (void)orientation;
+
+ /* TODO */
+}
+
const video_driver_t video_wii = {
.init = wii_init,
.frame = wii_frame,
@@ -281,6 +306,9 @@ const video_driver_t video_wii = {
.set_nonblock_state = wii_set_nonblock_state,
.focus = wii_focus,
.free = wii_free,
- .ident = "wii"
+ .ident = "wii",
+ .set_swap_block_state = wii_swap,
+ .set_rotation = wii_set_rotation,
+ .set_aspect_ratio = wii_set_aspect_ratio,
+ .swap = wii_swap
};
-