diff --git a/360/frontend-xdk/menu.h b/360/frontend-xdk/menu.h
index be612e44eb..055efe2257 100644
--- a/360/frontend-xdk/menu.h
+++ b/360/frontend-xdk/menu.h
@@ -220,8 +220,4 @@ class CRetroArchControls: public CXuiSceneImpl
extern CRetroArch app;
#endif
-int menu_init (void);
-void menu_free (void);
-void menu_loop (void);
-
#endif
diff --git a/console/griffin/griffin.c b/console/griffin/griffin.c
index 2cd9fc6b4d..c3c213757e 100644
--- a/console/griffin/griffin.c
+++ b/console/griffin/griffin.c
@@ -259,6 +259,8 @@ MENU
============================================================ */
#if defined(_XBOX360)
#include "../../360/frontend-xdk/menu.cpp"
+#elif defined(_XBOX1)
+#include "../../xbox1/frontend/menu.cpp"
#elif defined(GEKKO)
#include "../../wii/frontend/rgui.c"
#include "../../wii/frontend/list.c"
diff --git a/xbox1/frontend/menu.cpp b/xbox1/frontend/menu.cpp
new file mode 100644
index 0000000000..de9b223efc
--- /dev/null
+++ b/xbox1/frontend/menu.cpp
@@ -0,0 +1,89 @@
+/* RetroArch - A frontend for libretro.
+ * Copyright (C) 2010-2012 - Hans-Kristian Arntzen
+ * Copyright (C) 2011-2012 - Daniel De Matteis
+ *
+ * RetroArch 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.
+ *
+ * RetroArch 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 RetroArch.
+ * If not, see .
+ */
+
+#include "../../xbox1/RetroLaunch/Global.h"
+#include "../../xbox1/RetroLaunch/IniFile.h"
+#include "../../xbox1/RetroLaunch/IoSupport.h"
+#include "../../xbox1/RetroLaunch/Input.h"
+#include "../../xbox1/RetroLaunch/Debug.h"
+#include "../../xbox1/RetroLaunch/Font.h"
+#include "../../xbox1/RetroLaunch/MenuManager.h"
+#include "../../xbox1/RetroLaunch/RomList.h"
+
+bool g_bExit = false;
+
+int menu_init(void)
+{
+ g_debug.Print("Starting RetroLaunch\n");
+
+ // Set file cache size
+ XSetFileCacheSize(8 * 1024 * 1024);
+
+ // Mount drives
+ g_IOSupport.Mount("A:", "cdrom0");
+ g_IOSupport.Mount("E:", "Harddisk0\\Partition1");
+ g_IOSupport.Mount("Z:", "Harddisk0\\Partition2");
+ g_IOSupport.Mount("F:", "Harddisk0\\Partition6");
+ g_IOSupport.Mount("G:", "Harddisk0\\Partition7");
+
+ // Get RetroArch's native d3d device
+
+ // Parse ini file for settings
+ g_iniFile.CheckForIniEntry();
+
+ // Load the rom list if it isn't already loaded
+ if (!g_romList.IsLoaded())
+ g_romList.Load();
+
+ // Init input here
+ g_input.Create();
+
+ // Load the font here
+ g_font.Create();
+
+ // Build menu here (Menu state -> Main Menu)
+ g_menuManager.Create();
+
+ g_console.mode_switch = MODE_MENU;
+
+ return 0;
+}
+
+void menu_free(void) {}
+
+void menu_loop(void)
+{
+ xdk_d3d_video_t *d3d = (xdk_d3d_video_t*)driver.video_data;
+ //rarch_console_load_game("D:\\ssf2x.gba");
+
+ // Loop the app
+ while (!g_bExit)
+ {
+ d3d->d3d_render_device->Clear(0, NULL, D3DCLEAR_TARGET,
+ D3DCOLOR_XRGB(0, 0, 0),
+ 1.0f, 0);
+
+ d3d->d3d_render_device->BeginScene();
+ d3d->d3d_render_device->SetFlickerFilter(g_iniFile.m_currentIniEntry.dwFlickerFilter);
+ d3d->d3d_render_device->SetSoftDisplayFilter(g_iniFile.m_currentIniEntry.bSoftDisplayFilter);
+
+ g_input.GetInput();
+ g_menuManager.Update();
+
+ d3d->d3d_render_device->EndScene();
+ d3d->d3d_render_device->Present(NULL, NULL, NULL, NULL);
+ }
+}
diff --git a/xdk/frontend/main.c b/xdk/frontend/main.c
index d0ed8a6edf..af27ba5593 100644
--- a/xdk/frontend/main.c
+++ b/xdk/frontend/main.c
@@ -20,6 +20,8 @@
#include
#include
+#include "../../xdk/menu_shared.h"
+
#ifdef _XBOX360
#include
#include "../../360/frontend-xdk/menu.h"
@@ -49,11 +51,13 @@ static void set_default_settings (void)
{
//g_settings
g_settings.rewind_enable = false;
+#ifdef _XBOX360
strlcpy(g_settings.video.cg_shader_path, default_paths.shader_file, sizeof(g_settings.video.cg_shader_path));
+ strlcpy(g_settings.video.second_pass_shader, default_paths.shader_file, sizeof(g_settings.video.second_pass_shader));
+#endif
g_settings.video.fbo_scale_x = 2.0f;
g_settings.video.fbo_scale_y = 2.0f;
g_settings.video.render_to_texture = true;
- strlcpy(g_settings.video.second_pass_shader, default_paths.shader_file, sizeof(g_settings.video.second_pass_shader));
g_settings.video.second_pass_smooth = true;
g_settings.video.smooth = true;
g_settings.video.vsync = true;
@@ -139,12 +143,12 @@ static void get_environment_settings (void)
}
#endif
- strlcpy(default_paths.shader_file, "game:\\media\\shaders\\stock.cg", sizeof(default_paths.shader_file));
#ifdef _XBOX1
/* FIXME: Hardcoded */
strlcpy(default_paths.config_file, "D:\\retroarch.cfg", sizeof(default_paths.config_file));
strlcpy(g_settings.system_directory, "D:\\system\\", sizeof(g_settings.system_directory));
#else
+ strlcpy(default_paths.shader_file, "game:\\media\\shaders\\stock.cg", sizeof(default_paths.shader_file));
strlcpy(default_paths.config_file, "game:\\retroarch.cfg", sizeof(default_paths.config_file));
strlcpy(g_settings.system_directory, "game:\\system\\", sizeof(g_settings.system_directory));
#endif
@@ -163,78 +167,6 @@ static void configure_libretro(const char *path_prefix, const char * extension)
init_libretro_sym();
}
-#ifdef _XBOX1
-#include "../../xbox1/RetroLaunch/Global.h"
-#include "../../xbox1/RetroLaunch/IniFile.h"
-#include "../../xbox1/RetroLaunch/IoSupport.h"
-#include "../../xbox1/RetroLaunch/Input.h"
-#include "../../xbox1/RetroLaunch/Debug.h"
-#include "../../xbox1/RetroLaunch/Font.h"
-#include "../../xbox1/RetroLaunch/MenuManager.h"
-#include "../../xbox1/RetroLaunch/RomList.h"
-
-bool g_bExit = false;
-
-static void menu_init(void)
-{
- g_debug.Print("Starting RetroLaunch\n");
-
- // Set file cache size
- XSetFileCacheSize(8 * 1024 * 1024);
-
- // Mount drives
- g_IOSupport.Mount("A:", "cdrom0");
- g_IOSupport.Mount("E:", "Harddisk0\\Partition1");
- g_IOSupport.Mount("Z:", "Harddisk0\\Partition2");
- g_IOSupport.Mount("F:", "Harddisk0\\Partition6");
- g_IOSupport.Mount("G:", "Harddisk0\\Partition7");
-
- // Get RetroArch's native d3d device
-
- // Parse ini file for settings
- g_iniFile.CheckForIniEntry();
-
- // Load the rom list if it isn't already loaded
- if (!g_romList.IsLoaded()) {
- g_romList.Load();
- }
-
- // Init input here
- g_input.Create();
-
- // Load the font here
- g_font.Create();
-
- // Build menu here (Menu state -> Main Menu)
- g_menuManager.Create();
-
- g_console.mode_switch = MODE_MENU;
-}
-
-static void menu_free(void) {}
-static void menu_loop(void)
-{
- xdk_d3d_video_t *d3d = (xdk_d3d_video_t*)driver.video_data;
- //rarch_console_load_game("D:\\ssf2x.gba");
- // Loop the app
- while (!g_bExit)
- {
- d3d->d3d_render_device->Clear(0, NULL, D3DCLEAR_TARGET,
- D3DCOLOR_XRGB(0, 0, 0),
- 1.0f, 0);
-
- d3d->d3d_render_device->BeginScene();
- d3d->d3d_render_device->SetFlickerFilter(g_iniFile.m_currentIniEntry.dwFlickerFilter);
- d3d->d3d_render_device->SetSoftDisplayFilter(g_iniFile.m_currentIniEntry.bSoftDisplayFilter);
-
- g_input.GetInput();
- g_menuManager.Update();
-
- d3d->d3d_render_device->EndScene();
- d3d->d3d_render_device->Present(NULL, NULL, NULL, NULL);
- }
-}
-#endif
int main(int argc, char *argv[])
{
diff --git a/xdk/menu_shared.h b/xdk/menu_shared.h
new file mode 100644
index 0000000000..9487fea619
--- /dev/null
+++ b/xdk/menu_shared.h
@@ -0,0 +1,24 @@
+/* RetroArch - A frontend for libretro.
+ * Copyright (C) 2010-2012 - Hans-Kristian Arntzen
+ * Copyright (C) 2011-2012 - Daniel De Matteis
+ *
+ * RetroArch 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.
+ *
+ * RetroArch 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 RetroArch.
+ * If not, see .
+ */
+
+#ifndef _XDK_MENU_SHARED_H
+#define _XDK_MENU_SHARED_H
+
+int menu_init (void);
+void menu_free (void);
+void menu_loop (void);
+
+#endif