(RMenu) Portable menu code - still WIP

This commit is contained in:
Twinaphex 2012-08-03 21:22:43 +02:00
parent 0314580bb5
commit 275fdb104b
7 changed files with 19 additions and 1094 deletions

View File

@ -45,7 +45,7 @@ PYTHON2 = python2.exe
GIT = git.exe
endif
PPU_SRCS = ps3/frontend/main.c ps3/frontend/menu.c
PPU_SRCS = ps3/frontend/main.c console/rmenu/rmenu.c
ifeq ($(HAVE_RGL), 1)
DEFINES = -DHAVE_RGL

View File

@ -62,8 +62,8 @@
#include "../../file.h"
#include "../../general.h"
#include "menu.h"
#include "menu-entries.h"
#include "rmenu.h"
#include "rmenu_entries.h"
#define NUM_ENTRY_PER_PAGE 17
#define INPUT_SCALE 2
@ -2234,7 +2234,7 @@ void menu_init (void)
const char *id = info.library_name ? info.library_name : "Unknown";
snprintf(m_title, sizeof(m_title), "Libretro core: %s %s", id, info.library_version);
menu_stack_push(menu_items, FILE_BROWSER_MENU);
menu_stack_push(rmenu_items, FILE_BROWSER_MENU);
filebrowser_set_root_and_ext(&browser, rarch_console_get_rom_ext(), default_paths.filebrowser_startup_dir);
#ifdef _XBOX1
filebrowser_set_root(&tmpBrowser, "D:");
@ -2306,7 +2306,6 @@ void menu_loop(void)
do
{
RARCH_LOG("reaches here #0\n");
//first button input frame
uint64_t input_state_first_frame = 0;
uint64_t input_state = 0;
@ -2416,8 +2415,6 @@ void menu_loop(void)
}
}
RARCH_LOG("reaches here #1\n");
gfx_ctx_clear();
if(current_menu->enum_id == INGAME_MENU_RESIZE && (trig_state & RETRO_DEVICE_ID_JOYPAD_Y) || current_menu->enum_id == INGAME_MENU_SCREENSHOT)
@ -2443,7 +2440,7 @@ void menu_loop(void)
switch(current_menu->enum_id)
{
case FILE_BROWSER_MENU:
select_rom(menu_items, current_menu, trig_state);
select_rom(rmenu_items, current_menu, trig_state);
fb = &browser;
break;
case GENERAL_VIDEO_MENU:
@ -2453,37 +2450,35 @@ void menu_loop(void)
case EMU_AUDIO_MENU:
case PATH_MENU:
case CONTROLS_MENU:
select_setting(menu_items, current_menu, trig_state);
select_setting(rmenu_items, current_menu, trig_state);
break;
case SHADER_CHOICE:
case PRESET_CHOICE:
case BORDER_CHOICE:
case LIBRETRO_CHOICE:
case INPUT_PRESET_CHOICE:
select_file(menu_items, current_menu, trig_state);
select_file(rmenu_items, current_menu, trig_state);
fb = &tmpBrowser;
break;
case PATH_SAVESTATES_DIR_CHOICE:
case PATH_DEFAULT_ROM_DIR_CHOICE:
case PATH_CHEATS_DIR_CHOICE:
case PATH_SRAM_DIR_CHOICE:
select_directory(menu_items, current_menu, trig_state);
select_directory(rmenu_items, current_menu, trig_state);
fb = &tmpBrowser;
break;
case INGAME_MENU:
if(g_console.ingame_menu_enable)
ingame_menu(menu_items, current_menu, trig_state);
ingame_menu(rmenu_items, current_menu, trig_state);
break;
case INGAME_MENU_RESIZE:
ingame_menu_resize(menu_items, current_menu, trig_state);
ingame_menu_resize(rmenu_items, current_menu, trig_state);
break;
case INGAME_MENU_SCREENSHOT:
ingame_menu_screenshot(menu_items, current_menu, trig_state);
ingame_menu_screenshot(rmenu_items, current_menu, trig_state);
break;
}
RARCH_LOG("reaches here #1.1\n");
float x_position = POSITION_X;
float starting_y_position = POSITION_Y_START;
float y_position_increment = POSITION_Y_INCREMENT;
@ -2501,8 +2496,6 @@ void menu_loop(void)
old_state = input_state_first_frame;
RARCH_LOG("reaches here #1.2\n");
if(IS_TIMER_EXPIRED(device_ptr))
{
// if we want to force goto the emulation loop, skip this
@ -2543,13 +2536,10 @@ void menu_loop(void)
}
#endif
RARCH_LOG("reaches here #1.3\n");
gfx_ctx_swap_buffers();
#ifdef HAVE_SYSUTILS
cellSysutilCheckCallback();
#endif
RARCH_LOG("reaches here #1.4\n");
#ifndef _XBOX1
if(current_menu->enum_id == INGAME_MENU_RESIZE && (old_state & (1 << RETRO_DEVICE_ID_JOYPAD_Y)) || current_menu->enum_id == INGAME_MENU_SCREENSHOT)
@ -2557,10 +2547,6 @@ void menu_loop(void)
else
gfx_ctx_set_blend(false);
#endif
RARCH_LOG("reaches here #1.5\n");
RARCH_LOG("reaches here #2\n");
}while(g_console.menu_enable);
#ifdef __CELLOS_LV2__

View File

@ -14,8 +14,8 @@
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MENU_H_
#define MENU_H_
#ifndef _RMENU_H_
#define _RMENU_H_
#if defined(__CELLOS_LV2__)
#define DEVICE_CAST gl_t*
@ -196,10 +196,8 @@ enum
#define MAX_NO_OF_PATH_SETTINGS SETTING_PATH_DEFAULT_ALL+1
#define MAX_NO_OF_CONTROLS_SETTINGS SETTING_CONTROLS_DEFAULT_ALL+1
#ifndef _XBOX
void menu_init (void);
void menu_loop (void);
void menu_free (void);
#endif
#endif /* MENU_H_ */

View File

@ -14,7 +14,7 @@
* If not, see <http://www.gnu.org/licenses/>.
*/
item menu_items[MAX_NO_OF_CONTROLS_SETTINGS] =
item rmenu_items[MAX_NO_OF_CONTROLS_SETTINGS] =
{
#ifdef __CELLOS_LV2__
{

View File

@ -58,7 +58,7 @@
#include "../../general.h"
#include "../../file.h"
#include "menu.h"
#include "../../console/rmenu/rmenu.h"
#define EMULATOR_CONTENT_DIR "SSNE10000"

File diff suppressed because it is too large Load Diff

View File

@ -20,11 +20,12 @@
#include <stdint.h>
#include <string>
#include "../../xdk/menu_shared.h"
#ifdef _XBOX360
#if defined(_XBOX360)
#include <xfilecache.h>
#include "../../360/frontend-xdk/menu.h"
#include "../../xdk/menu_shared.h"
#elif defined(_XBOX1)
#include "../../console/rmenu/rmenu.h"
#endif
#include <xbdm.h>