From 8e37cd4d89f7c802764955cf9c8bc6baa0f754c5 Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Tue, 29 May 2012 22:36:17 +0200 Subject: [PATCH] (360/PS3) Make Quick Menu enums universal for console ports --- 360/main.c | 1 - 360/menu.cpp | 1 - 360/shared.h | 36 ------------------------------------ 360/xdk360_input.c | 1 - 360/xdk360_video.cpp | 1 - console/console_ext.h | 24 ++++++++++++++++++++++++ ps3/menu.c | 4 ++-- ps3/shared.h | 20 -------------------- 8 files changed, 26 insertions(+), 62 deletions(-) delete mode 100644 360/shared.h diff --git a/360/main.c b/360/main.c index 58242aa5a1..05b8c8fa47 100644 --- a/360/main.c +++ b/360/main.c @@ -29,7 +29,6 @@ #include "../conf/config_file_macros.h" #include "../file.h" #include "../general.h" -#include "shared.h" #define DEVICE_MEMORY_UNIT0 1 #define DEVICE_MEMORY_UNIT1 2 diff --git a/360/menu.cpp b/360/menu.cpp index b5113a3fa1..05f2f4047d 100644 --- a/360/menu.cpp +++ b/360/menu.cpp @@ -23,7 +23,6 @@ #include "xdk360_video.h" #include "menu.h" #include "../message.h" -#include "shared.h" #include "../general.h" diff --git a/360/shared.h b/360/shared.h deleted file mode 100644 index fd711c7e3a..0000000000 --- a/360/shared.h +++ /dev/null @@ -1,36 +0,0 @@ -/* 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 _360_SHARED_H -#define _360_SHARED_H - -enum { - MENU_ITEM_LOAD_STATE = 0, - MENU_ITEM_SAVE_STATE, - MENU_ITEM_KEEP_ASPECT_RATIO, - MENU_ITEM_OVERSCAN_AMOUNT, - MENU_ITEM_ORIENTATION, - MENU_ITEM_RESIZE_MODE, - MENU_ITEM_FRAME_ADVANCE, - MENU_ITEM_SCREENSHOT_MODE, - MENU_ITEM_RESET, - MENU_ITEM_RETURN_TO_GAME, - MENU_ITEM_RETURN_TO_DASHBOARD -}; - -#define MENU_ITEM_LAST MENU_ITEM_RETURN_TO_DASHBOARD+1 - -#endif diff --git a/360/xdk360_input.c b/360/xdk360_input.c index ea9a249d6c..58a85c6940 100644 --- a/360/xdk360_input.c +++ b/360/xdk360_input.c @@ -22,7 +22,6 @@ #include "../libretro.h" #include "../console/console_ext.h" #include "xdk360_input.h" -#include "shared.h" #include "menu.h" static uint64_t state[4]; diff --git a/360/xdk360_video.cpp b/360/xdk360_video.cpp index 3390fa8c63..b13a42d827 100644 --- a/360/xdk360_video.cpp +++ b/360/xdk360_video.cpp @@ -31,7 +31,6 @@ #include "../console/console_ext.h" #include "../general.h" #include "../message.h" -#include "shared.h" #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/console/console_ext.h b/console/console_ext.h index e307b85da1..c192ab9b6b 100644 --- a/console/console_ext.h +++ b/console/console_ext.h @@ -115,6 +115,30 @@ void rarch_input_set_keybind(unsigned player, unsigned keybind_action, uint64_t RetroArch ============================================================ */ +enum { + MENU_ITEM_LOAD_STATE = 0, + MENU_ITEM_SAVE_STATE, + MENU_ITEM_KEEP_ASPECT_RATIO, + MENU_ITEM_OVERSCAN_AMOUNT, + MENU_ITEM_ORIENTATION, +#ifdef __CELLOS_LV2__ + MENU_ITEM_SCALE_FACTOR, +#endif + MENU_ITEM_RESIZE_MODE, + MENU_ITEM_FRAME_ADVANCE, + MENU_ITEM_SCREENSHOT_MODE, + MENU_ITEM_RESET, + MENU_ITEM_RETURN_TO_GAME, +#ifdef __CELLOS_LV2__ + MENU_ITEM_RETURN_TO_MENU, + MENU_ITEM_CHANGE_LIBRETRO, + MENU_ITEM_RETURN_TO_MULTIMAN, +#endif + MENU_ITEM_RETURN_TO_DASHBOARD +}; + +#define MENU_ITEM_LAST MENU_ITEM_RETURN_TO_DASHBOARD+1 + #ifdef HAVE_RARCH_MAIN_WRAP struct rarch_main_wrap diff --git a/ps3/menu.c b/ps3/menu.c index cd6095d27f..edfb2160b2 100644 --- a/ps3/menu.c +++ b/ps3/menu.c @@ -2359,7 +2359,7 @@ static void ingame_menu(uint32_t menu_id) } strlcpy(comment, "Press 'CROSS' to quit the emulator and return to multiMAN.", sizeof(comment)); break; - case MENU_ITEM_RETURN_TO_XMB: + case MENU_ITEM_RETURN_TO_DASHBOARD: if(CTRL_CROSS(state)) rarch_settings_change(S_RETURN_TO_DASHBOARD); @@ -2433,7 +2433,7 @@ static void ingame_menu(uint32_t menu_id) cellDbgFontPuts(x_position, (ypos+(ypos_increment*MENU_ITEM_RETURN_TO_MULTIMAN)), font_size, MENU_ITEM_SELECTED(MENU_ITEM_RETURN_TO_MULTIMAN), "Return to multiMAN"); - cellDbgFontPuts(x_position, (ypos+(ypos_increment*MENU_ITEM_RETURN_TO_XMB)), font_size, MENU_ITEM_SELECTED(MENU_ITEM_RETURN_TO_XMB), "Return to XMB"); + cellDbgFontPuts(x_position, (ypos+(ypos_increment*MENU_ITEM_RETURN_TO_DASHBOARD)), font_size, MENU_ITEM_SELECTED(MENU_ITEM_RETURN_TO_DASHBOARD), "Return to XMB"); cellDbgFontDraw(); struct retro_system_info info; diff --git a/ps3/shared.h b/ps3/shared.h index cafcc1f64f..632be12571 100644 --- a/ps3/shared.h +++ b/ps3/shared.h @@ -51,26 +51,6 @@ enum SOUND_MODE_HEADSET }; -enum { - MENU_ITEM_LOAD_STATE = 0, - MENU_ITEM_SAVE_STATE, - MENU_ITEM_KEEP_ASPECT_RATIO, - MENU_ITEM_OVERSCAN_AMOUNT, - MENU_ITEM_ORIENTATION, - MENU_ITEM_SCALE_FACTOR, - MENU_ITEM_RESIZE_MODE, - MENU_ITEM_FRAME_ADVANCE, - MENU_ITEM_SCREENSHOT_MODE, - MENU_ITEM_RESET, - MENU_ITEM_RETURN_TO_GAME, - MENU_ITEM_RETURN_TO_MENU, - MENU_ITEM_CHANGE_LIBRETRO, - MENU_ITEM_RETURN_TO_MULTIMAN, - MENU_ITEM_RETURN_TO_XMB -}; - -#define MENU_ITEM_LAST MENU_ITEM_RETURN_TO_XMB+1 - extern char contentInfoPath[PATH_MAX]; extern char usrDirPath[PATH_MAX]; extern char DEFAULT_PRESET_FILE[PATH_MAX];