mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 13:20:30 +00:00
Merge branch 'master' into ratecontrol
This commit is contained in:
commit
da7cf7e01d
19
360/main.c
19
360/main.c
@ -27,6 +27,7 @@
|
||||
#include "../console/main_wrap.h"
|
||||
#include "../conf/config_file.h"
|
||||
#include "../conf/config_file_macros.h"
|
||||
#include "../file.h"
|
||||
#include "../general.h"
|
||||
#include "shared.h"
|
||||
|
||||
@ -190,21 +191,9 @@ static void set_default_settings (void)
|
||||
g_extern.verbose = true;
|
||||
}
|
||||
|
||||
static bool file_exists(const char * filename)
|
||||
{
|
||||
unsigned long file_attr;
|
||||
|
||||
file_attr = GetFileAttributes(filename);
|
||||
|
||||
if (0xFFFFFFFF == file_attr)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void init_settings (void)
|
||||
{
|
||||
if(!file_exists(SYS_CONFIG_FILE))
|
||||
if(!filepath_exists(SYS_CONFIG_FILE))
|
||||
{
|
||||
SSNES_ERR("Config file \"%s\" desn't exist. Creating...\n", "game:\\ssnes.cfg");
|
||||
FILE * f;
|
||||
@ -230,7 +219,7 @@ static void init_settings (void)
|
||||
|
||||
static void save_settings (void)
|
||||
{
|
||||
if(!file_exists(SYS_CONFIG_FILE))
|
||||
if(!filepath_exists(SYS_CONFIG_FILE))
|
||||
{
|
||||
FILE * f;
|
||||
f = fopen(SYS_CONFIG_FILE, "w");
|
||||
@ -374,7 +363,7 @@ begin_loop:
|
||||
goto begin_loop;
|
||||
|
||||
begin_shutdown:
|
||||
if(file_exists(SYS_CONFIG_FILE))
|
||||
if(filepath_exists(SYS_CONFIG_FILE))
|
||||
save_settings();
|
||||
xdk360_video_deinit();
|
||||
}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 419 KiB |
Binary file not shown.
Before Width: | Height: | Size: 20 KiB |
@ -11,20 +11,6 @@
|
||||
<Position>347.429474,184.843964,0.000000</Position>
|
||||
<ClassOverride>SSNESQuickMenu</ClassOverride>
|
||||
</Properties>
|
||||
<XuiButton>
|
||||
<Properties>
|
||||
<Id>XuiBtnLoadState</Id>
|
||||
<Width>488.312012</Width>
|
||||
<Height>38.000000</Height>
|
||||
<Position>38.127724,64.215515,0.000000</Position>
|
||||
<Pivot>245.362122,102.247192,0.000000</Pivot>
|
||||
<NavLeft>XuiBackButton</NavLeft>
|
||||
<NavRight>XuiBackButton</NavRight>
|
||||
<NavUp>XuiBtnReturnToGame</NavUp>
|
||||
<NavDown>XuiBtnSaveState</NavDown>
|
||||
<Text>Load State #0</Text>
|
||||
</Properties>
|
||||
</XuiButton>
|
||||
<XuiText>
|
||||
<Properties>
|
||||
<Id>XuiTxtTitle</Id>
|
||||
@ -38,84 +24,56 @@
|
||||
<TextStyle>21</TextStyle>
|
||||
</Properties>
|
||||
</XuiText>
|
||||
<XuiButton>
|
||||
<Properties>
|
||||
<Id>XuiBtnFrameAdvance</Id>
|
||||
<Width>488.312012</Width>
|
||||
<Height>38.000000</Height>
|
||||
<Position>38.127960,201.615982,0.000000</Position>
|
||||
<NavLeft>XuiBackButton</NavLeft>
|
||||
<NavRight>XuiBackButton</NavRight>
|
||||
<NavUp>XuiBtnFilteringShader</NavUp>
|
||||
<NavDown>XuiBtnReturnToGame</NavDown>
|
||||
<Text>Frame Advance</Text>
|
||||
</Properties>
|
||||
</XuiButton>
|
||||
<XuiButton>
|
||||
<Properties>
|
||||
<Id>XuiBtnReturnToGame</Id>
|
||||
<Width>488.312012</Width>
|
||||
<Height>38.000000</Height>
|
||||
<Position>38.327736,246.007980,0.000000</Position>
|
||||
<Pivot>245.162109,-84.153275,0.000000</Pivot>
|
||||
<NavLeft>XuiBackButton</NavLeft>
|
||||
<NavRight>XuiBackButton</NavRight>
|
||||
<NavUp>XuiBtnFrameAdvance</NavUp>
|
||||
<NavDown>XuiBtnLoadState</NavDown>
|
||||
<Text>Return to Game</Text>
|
||||
</Properties>
|
||||
</XuiButton>
|
||||
<XuiButton>
|
||||
<Properties>
|
||||
<Id>XuiBtnSaveState</Id>
|
||||
<Width>488.312012</Width>
|
||||
<Height>38.000000</Height>
|
||||
<Position>38.130001,111.655991,0.000000</Position>
|
||||
<NavLeft>XuiBackButton</NavLeft>
|
||||
<NavRight>XuiBackButton</NavRight>
|
||||
<NavUp>XuiBtnLoadState</NavUp>
|
||||
<NavDown>XuiBtnFilteringShader</NavDown>
|
||||
<Text>Save State #0</Text>
|
||||
</Properties>
|
||||
</XuiButton>
|
||||
<XuiButton>
|
||||
<Properties>
|
||||
<Id>XuiBtnFilteringShader</Id>
|
||||
<Width>488.312012</Width>
|
||||
<Height>38.000000</Height>
|
||||
<Position>38.130001,156.655991,0.000000</Position>
|
||||
<NavLeft>XuiBackButton</NavLeft>
|
||||
<NavRight>XuiBackButton</NavRight>
|
||||
<NavUp>XuiBtnSaveState</NavUp>
|
||||
<NavDown>XuiBtnFrameAdvance</NavDown>
|
||||
</Properties>
|
||||
</XuiButton>
|
||||
<XuiText>
|
||||
<Properties>
|
||||
<Id>XuiTxtTitle1</Id>
|
||||
<Width>45.024040</Width>
|
||||
<Height>40.000000</Height>
|
||||
<Position>493.581604,21.159988,0.000000</Position>
|
||||
<Text>1/2</Text>
|
||||
<TextColor>0xff0f0f0f</TextColor>
|
||||
<DropShadowColor>0x800f0f0f</DropShadowColor>
|
||||
<Font>Arial Unicode MS</Font>
|
||||
<TextStyle>21</TextStyle>
|
||||
</Properties>
|
||||
</XuiText>
|
||||
<XuiBackButton>
|
||||
<Properties>
|
||||
<Id>XuiBackButton</Id>
|
||||
<Width>208.632019</Width>
|
||||
<Height>36.000000</Height>
|
||||
<Position>356.670013,309.000000,0.000000</Position>
|
||||
<NavLeft>XuiBtnLoadState</NavLeft>
|
||||
<NavRight>XuiBtnLoadState</NavRight>
|
||||
<NavUp>XuiBtnReturnToGame</NavUp>
|
||||
<NavDown>XuiBtnLoadState</NavDown>
|
||||
<NavLeft>XuiQuickMenuList</NavLeft>
|
||||
<NavRight>XuiQuickMenuList</NavRight>
|
||||
<NavUp>XuiQuickMenuList</NavUp>
|
||||
<NavDown>XuiQuickMenuList</NavDown>
|
||||
<Text>Go back to menu</Text>
|
||||
<PressKey>22593</PressKey>
|
||||
</Properties>
|
||||
</XuiBackButton>
|
||||
<XuiCommonList>
|
||||
<Properties>
|
||||
<Id>XuiQuickMenuList</Id>
|
||||
<Width>492.000000</Width>
|
||||
<Height>232.720001</Height>
|
||||
<Position>44.880005,64.959991,0.000000</Position>
|
||||
<NavLeft>XuiBackButton</NavLeft>
|
||||
<NavRight>XuiBackButton</NavRight>
|
||||
<NavUp>XuiBackButton</NavUp>
|
||||
<NavDown>XuiBackButton</NavDown>
|
||||
<ItemsText>Load State
|
||||
Save State
|
||||
Hardware filtering:
|
||||
Aspect Ratio:
|
||||
Overscan:
|
||||
Orientation:
|
||||
Resize Mode
|
||||
Frame Advance
|
||||
Screenshot Mode
|
||||
Reset
|
||||
Return to Game
|
||||
Return to Dashboard
|
||||
</ItemsText>
|
||||
</Properties>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
</XuiCommonList>
|
||||
</XuiScene>
|
||||
</XuiCanvas>
|
||||
|
110
360/menu.cpp
110
360/menu.cpp
@ -39,6 +39,13 @@ static void return_to_game (void)
|
||||
g_console.mode_switch = MODE_EMULATION;
|
||||
}
|
||||
|
||||
static void return_to_dashboard (void)
|
||||
{
|
||||
g_console.menu_enable = false;
|
||||
g_console.mode_switch = MODE_EXIT;
|
||||
g_console.initialize_ssnes_enable = false;
|
||||
}
|
||||
|
||||
/* Register custom classes */
|
||||
HRESULT CSSNES::RegisterXuiClasses (void)
|
||||
{
|
||||
@ -92,17 +99,17 @@ HRESULT CSSNESFileBrowser::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static void set_filter_element(int index, CXuiControl * obj)
|
||||
static const wchar_t * set_filter_element(int index)
|
||||
{
|
||||
switch(index)
|
||||
{
|
||||
case FALSE:
|
||||
obj->SetText(L"Hardware filtering: Point filtering");
|
||||
break;
|
||||
return L"Hardware filtering: Point filtering";
|
||||
case TRUE:
|
||||
obj->SetText(L"Hardware filtering: Linear interpolation");
|
||||
break;
|
||||
return L"Hardware filtering: Linear interpolation";
|
||||
}
|
||||
|
||||
return L"";
|
||||
}
|
||||
|
||||
HRESULT CSSNESSettings::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
|
||||
@ -112,45 +119,86 @@ HRESULT CSSNESSettings::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
|
||||
GetChildById(L"XuiBackButton1", &m_back);
|
||||
GetChildById(L"XuiBtnHWFilter", &m_hw_filter);
|
||||
|
||||
set_filter_element(g_settings.video.smooth, &m_hw_filter);
|
||||
m_hw_filter.SetText(set_filter_element(g_settings.video.smooth));
|
||||
m_rewind_cb.SetCheck(g_settings.rewind_enable);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSSNESQuickMenu::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
|
||||
{
|
||||
GetChildById(L"XuiBtnLoadState", &m_loadstate);
|
||||
GetChildById(L"XuiBtnSaveState", &m_savestate);
|
||||
GetChildById(L"XuiBtnFilteringShader", &m_hw_filter);
|
||||
GetChildById(L"XuiBtnFrameAdvance", &m_frame_advance);
|
||||
GetChildById(L"XuiBtnReturnToGame", &m_return_to_game);
|
||||
GetChildById(L"XuiQuickMenuList", &m_quickmenulist);
|
||||
GetChildById(L"XuiBackButton", &m_back);
|
||||
|
||||
set_filter_element(g_settings.video.smooth, &m_hw_filter);
|
||||
m_quickmenulist.SetText(MENU_ITEM_HARDWARE_FILTERING, set_filter_element(g_settings.video.smooth));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSSNESQuickMenu::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled )
|
||||
{
|
||||
if ( hObjPressed == m_hw_filter)
|
||||
g_settings.video.smooth = !g_settings.video.smooth;
|
||||
else if ( hObjPressed == m_loadstate && g_console.emulator_initialized)
|
||||
int current_index;
|
||||
|
||||
if ( hObjPressed == m_quickmenulist)
|
||||
{
|
||||
ssnes_load_state();
|
||||
return_to_game();
|
||||
current_index = m_quickmenulist.GetCurSel();
|
||||
|
||||
switch(current_index)
|
||||
{
|
||||
case MENU_ITEM_LOAD_STATE:
|
||||
if (g_console.emulator_initialized)
|
||||
{
|
||||
ssnes_load_state();
|
||||
return_to_game();
|
||||
}
|
||||
break;
|
||||
case MENU_ITEM_SAVE_STATE:
|
||||
if (g_console.emulator_initialized)
|
||||
{
|
||||
ssnes_save_state();
|
||||
return_to_game();
|
||||
}
|
||||
break;
|
||||
case MENU_ITEM_HARDWARE_FILTERING:
|
||||
g_settings.video.smooth = !g_settings.video.smooth;
|
||||
m_quickmenulist.SetText(MENU_ITEM_HARDWARE_FILTERING, set_filter_element(g_settings.video.smooth));
|
||||
break;
|
||||
case MENU_ITEM_KEEP_ASPECT_RATIO:
|
||||
break;
|
||||
case MENU_ITEM_OVERSCAN_AMOUNT:
|
||||
break;
|
||||
case MENU_ITEM_ORIENTATION:
|
||||
break;
|
||||
case MENU_ITEM_RESIZE_MODE:
|
||||
break;
|
||||
case MENU_ITEM_FRAME_ADVANCE:
|
||||
if (g_console.emulator_initialized)
|
||||
{
|
||||
g_console.frame_advance_enable = true;
|
||||
g_console.menu_enable = false;
|
||||
g_console.mode_switch = MODE_EMULATION;
|
||||
}
|
||||
break;
|
||||
case MENU_ITEM_SCREENSHOT_MODE:
|
||||
break;
|
||||
case MENU_ITEM_RESET:
|
||||
if (g_console.emulator_initialized)
|
||||
{
|
||||
return_to_game();
|
||||
ssnes_game_reset();
|
||||
}
|
||||
break;
|
||||
case MENU_ITEM_RETURN_TO_GAME:
|
||||
if (g_console.emulator_initialized)
|
||||
return_to_game();
|
||||
break;
|
||||
case MENU_ITEM_RETURN_TO_DASHBOARD:
|
||||
return_to_dashboard();
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if ( hObjPressed == m_frame_advance && g_console.emulator_initialized)
|
||||
{
|
||||
g_console.frame_advance_enable = true;
|
||||
g_console.menu_enable = false;
|
||||
g_console.mode_switch = MODE_EMULATION;
|
||||
}
|
||||
else if ( hObjPressed == m_return_to_game && g_console.emulator_initialized)
|
||||
return_to_game();
|
||||
else if ( hObjPressed == m_back )
|
||||
|
||||
if ( hObjPressed == m_back )
|
||||
NavigateBack(app.hMainScene);
|
||||
|
||||
set_filter_element(g_settings.video.smooth, &m_hw_filter);
|
||||
bHandled = TRUE;
|
||||
return S_OK;
|
||||
}
|
||||
@ -223,11 +271,11 @@ HRESULT CSSNESSettings::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled )
|
||||
else if ( hObjPressed == m_hw_filter)
|
||||
{
|
||||
g_settings.video.smooth = !g_settings.video.smooth;
|
||||
m_hw_filter.SetText(set_filter_element(g_settings.video.smooth));
|
||||
}
|
||||
else if ( hObjPressed == m_back )
|
||||
NavigateBack(app.hMainScene);
|
||||
|
||||
set_filter_element(g_settings.video.smooth, &m_hw_filter);
|
||||
bHandled = TRUE;
|
||||
return S_OK;
|
||||
}
|
||||
@ -266,11 +314,7 @@ HRESULT CSSNESMain::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled )
|
||||
NavigateForward(app.hSSNESSettings);
|
||||
}
|
||||
else if ( hObjPressed == m_quit )
|
||||
{
|
||||
g_console.menu_enable = false;
|
||||
g_console.mode_switch = MODE_EXIT;
|
||||
g_console.initialize_ssnes_enable = false;
|
||||
}
|
||||
return_to_dashboard();
|
||||
|
||||
bHandled = TRUE;
|
||||
return S_OK;
|
||||
|
@ -79,11 +79,7 @@ public:
|
||||
class CSSNESQuickMenu: public CXuiSceneImpl
|
||||
{
|
||||
protected:
|
||||
CXuiControl m_loadstate;
|
||||
CXuiControl m_savestate;
|
||||
CXuiControl m_hw_filter;
|
||||
CXuiControl m_frame_advance;
|
||||
CXuiControl m_return_to_game;
|
||||
CXuiList m_quickmenulist;
|
||||
CXuiControl m_back;
|
||||
public:
|
||||
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
||||
|
@ -28,6 +28,7 @@ enum
|
||||
enum {
|
||||
MENU_ITEM_LOAD_STATE = 0,
|
||||
MENU_ITEM_SAVE_STATE,
|
||||
MENU_ITEM_HARDWARE_FILTERING,
|
||||
MENU_ITEM_KEEP_ASPECT_RATIO,
|
||||
MENU_ITEM_OVERSCAN_AMOUNT,
|
||||
MENU_ITEM_ORIENTATION,
|
||||
@ -36,7 +37,6 @@ enum {
|
||||
MENU_ITEM_SCREENSHOT_MODE,
|
||||
MENU_ITEM_RESET,
|
||||
MENU_ITEM_RETURN_TO_GAME,
|
||||
MENU_ITEM_RETURN_TO_MENU,
|
||||
MENU_ITEM_RETURN_TO_DASHBOARD
|
||||
};
|
||||
|
||||
|
@ -218,7 +218,6 @@ enum ssnes_game_type
|
||||
SSNES_CART_SUFAMI
|
||||
};
|
||||
|
||||
|
||||
// All run-time- / command line flag-related globals go here.
|
||||
struct global
|
||||
{
|
||||
@ -422,6 +421,8 @@ void ssnes_render_cached_frame(void);
|
||||
|
||||
void ssnes_load_state(void);
|
||||
void ssnes_save_state(void);
|
||||
void ssnes_state_slot_increase(void);
|
||||
void ssnes_state_slot_decrease(void);
|
||||
/////////
|
||||
|
||||
// Public data structures
|
||||
|
19
ps3/main.c
19
ps3/main.c
@ -74,15 +74,6 @@ void set_text_message(const char * message, uint32_t speed)
|
||||
SET_TIMER_EXPIRATION(speed);
|
||||
}
|
||||
|
||||
static bool file_exists(const char * filename)
|
||||
{
|
||||
CellFsStat sb;
|
||||
if(cellFsStat(filename,&sb) == CELL_FS_SUCCEEDED)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
static void set_default_settings(void)
|
||||
{
|
||||
// g_settings
|
||||
@ -97,7 +88,7 @@ static void set_default_settings(void)
|
||||
g_settings.video.smooth = true;
|
||||
g_settings.video.vsync = true;
|
||||
strlcpy(g_settings.cheat_database, usrDirPath, sizeof(g_settings.cheat_database));
|
||||
g_settings.video.msg_pos_x = 0.09f;
|
||||
g_settings.video.msg_pos_x = 0.05f;
|
||||
g_settings.video.msg_pos_y = 0.90f;
|
||||
g_settings.video.aspect_ratio = -1.0f;
|
||||
|
||||
@ -174,7 +165,7 @@ static void set_default_settings(void)
|
||||
|
||||
static void init_settings(void)
|
||||
{
|
||||
if(!file_exists(SYS_CONFIG_FILE))
|
||||
if(!path_file_exists(SYS_CONFIG_FILE))
|
||||
{
|
||||
SSNES_ERR("Config file \"%s\" doesn't exist. Creating...\n", SYS_CONFIG_FILE);
|
||||
FILE * f;
|
||||
@ -219,7 +210,7 @@ static void init_settings(void)
|
||||
|
||||
static void save_settings(void)
|
||||
{
|
||||
if(!file_exists(SYS_CONFIG_FILE))
|
||||
if(!path_file_exists(SYS_CONFIG_FILE))
|
||||
{
|
||||
FILE * f;
|
||||
f = fopen(SYS_CONFIG_FILE, "w");
|
||||
@ -341,7 +332,7 @@ static void get_environment_settings(void)
|
||||
/* now we fill in all the variables */
|
||||
snprintf(DEFAULT_PRESET_FILE, sizeof(DEFAULT_PRESET_FILE), "%s/presets/stock.conf", usrDirPath);
|
||||
snprintf(DEFAULT_BORDER_FILE, sizeof(DEFAULT_BORDER_FILE), "%s/borders/Centered-1080p/mega-man-2.png", usrDirPath);
|
||||
snprintf(DEFAULT_MENU_BORDER_FILE, sizeof(DEFAULT_MENU_BORDER_FILE), "%s/borders/Menu/main-menu.jpg", usrDirPath);
|
||||
snprintf(DEFAULT_MENU_BORDER_FILE, sizeof(DEFAULT_MENU_BORDER_FILE), "%s/borders/Menu/main-menu.png", usrDirPath);
|
||||
snprintf(GAME_AWARE_SHADER_DIR_PATH, sizeof(GAME_AWARE_SHADER_DIR_PATH), "%s/gameaware", usrDirPath);
|
||||
snprintf(PRESETS_DIR_PATH, sizeof(PRESETS_DIR_PATH), "%s/presets", usrDirPath);
|
||||
snprintf(INPUT_PRESETS_DIR_PATH, sizeof(INPUT_PRESETS_DIR_PATH), "%s/input-presets", usrDirPath);
|
||||
@ -436,7 +427,7 @@ begin_loop:
|
||||
goto begin_loop;
|
||||
|
||||
begin_shutdown:
|
||||
if(file_exists(SYS_CONFIG_FILE))
|
||||
if(path_file_exists(SYS_CONFIG_FILE))
|
||||
save_settings();
|
||||
ps3_input_deinit();
|
||||
ps3_video_deinit();
|
||||
|
80
ps3/menu.c
80
ps3/menu.c
@ -291,7 +291,7 @@ static void browser_render(filebrowser_t * b)
|
||||
page_base = page_number * NUM_ENTRY_PER_PAGE;
|
||||
|
||||
currentX = 0.09f;
|
||||
currentY = 0.09f;
|
||||
currentY = 0.10f;
|
||||
ySpacing = 0.035f;
|
||||
|
||||
for ( i = page_base; i < file_count && i < page_base + NUM_ENTRY_PER_PAGE; ++i)
|
||||
@ -640,14 +640,14 @@ static void menu_init_settings_pages(menu * menu_obj)
|
||||
|
||||
page = 0;
|
||||
j = 0;
|
||||
increment = 0.13f;
|
||||
increment = 0.16f;
|
||||
|
||||
for(i = menu_obj->first_setting; i < menu_obj->max_settings; i++)
|
||||
{
|
||||
if(!(j < (NUM_ENTRY_PER_PAGE)))
|
||||
{
|
||||
j = 0;
|
||||
increment = 0.13f;
|
||||
increment = 0.16f;
|
||||
page++;
|
||||
}
|
||||
|
||||
@ -1598,7 +1598,7 @@ static void select_rom(void)
|
||||
cellDbgFontPrintf(0.09f, 0.83f, 0.91f, LIGHTBLUE, "INFO - Press X to load the game. ");
|
||||
|
||||
cellDbgFontPuts (0.09f, 0.05f, Emulator_GetFontSize(), RED, "FILE BROWSER");
|
||||
cellDbgFontPrintf (0.3f, 0.05f, 0.82f, WHITE, "Libsnes library: %s", snes_library_id());
|
||||
cellDbgFontPrintf (0.3f, 0.05f, 0.82f, WHITE, "Libsnes core: %s", snes_library_id());
|
||||
cellDbgFontPrintf (0.7f, 0.05f, 0.82f, WHITE, "%s v%s", EMULATOR_NAME, EMULATOR_VERSION);
|
||||
cellDbgFontPrintf (0.09f, 0.09f, Emulator_GetFontSize(), YELLOW,
|
||||
"PATH: %s", FILEBROWSER_GET_CURRENT_DIRECTORY_NAME(browser));
|
||||
@ -1610,7 +1610,7 @@ static void select_rom(void)
|
||||
old_state = state;
|
||||
}
|
||||
|
||||
#define MENU_ITEM_SELECTED(index) ((g_console.ingame_menu_item == index) ? RED : GREEN)
|
||||
#define MENU_ITEM_SELECTED(index) (menuitem_colors[index])
|
||||
|
||||
static void return_to_game (void)
|
||||
{
|
||||
@ -1623,6 +1623,12 @@ static void return_to_game (void)
|
||||
static void ingame_menu(uint32_t menu_id)
|
||||
{
|
||||
char comment[256], msg_temp[256];
|
||||
static uint32_t menuitem_colors[MENU_ITEM_LAST];
|
||||
|
||||
for(int i = 0; i < MENU_ITEM_LAST; i++)
|
||||
menuitem_colors[i] = GREEN;
|
||||
|
||||
menuitem_colors[g_console.ingame_menu_item] = RED;
|
||||
|
||||
uint64_t state = cell_pad_input_poll_device(0);
|
||||
static uint64_t old_state = 0;
|
||||
@ -1784,13 +1790,13 @@ static void ingame_menu(uint32_t menu_id)
|
||||
g_console.menu_enable = false;
|
||||
g_console.mode_switch = MODE_EMULATION;
|
||||
}
|
||||
strcpy(comment, "Press 'CROSS', 'L2' or 'R2' button to step one frame.\nNOTE: Pressing the button rapidly will advance the frame more slowly\nand prevent buttons from being input.");
|
||||
strcpy(comment, "Press 'CROSS', 'L2' or 'R2' button to step one frame. Pressing the button\nrapidly will advance the frame more slowly.");
|
||||
break;
|
||||
case MENU_ITEM_RESIZE_MODE:
|
||||
if(CTRL_CROSS(state))
|
||||
{
|
||||
}
|
||||
strcpy(comment, "Allows you to resize the screen by moving around the two analog sticks.\nPress TRIANGLE to reset to default values, and CIRCLE to go back to the\nin-game menu.");
|
||||
strcpy(comment, "Allows you to resize the screen by moving around the two analog sticks.\nPress TRIANGLE to reset to default values, and CIRCLE to go back.");
|
||||
break;
|
||||
case MENU_ITEM_SCREENSHOT_MODE:
|
||||
if(CTRL_CROSS(state))
|
||||
@ -1867,16 +1873,16 @@ static void ingame_menu(uint32_t menu_id)
|
||||
if(g_console.ingame_menu_item > 0)
|
||||
{
|
||||
g_console.ingame_menu_item--;
|
||||
set_text_message("", 7);
|
||||
set_text_message("", 14);
|
||||
}
|
||||
}
|
||||
|
||||
if(CTRL_DOWN(state) || CTRL_LSTICK_DOWN(state))
|
||||
{
|
||||
if(g_console.ingame_menu_item < MENU_ITEM_LAST)
|
||||
if(g_console.ingame_menu_item < (MENU_ITEM_LAST-1))
|
||||
{
|
||||
g_console.ingame_menu_item++;
|
||||
set_text_message("", 7);
|
||||
set_text_message("", 14);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1902,64 +1908,52 @@ static void ingame_menu(uint32_t menu_id)
|
||||
break;
|
||||
}
|
||||
|
||||
cellDbgFontPrintf (x_position, 0.10f, 1.4f+0.01f, BLUE, "Quick Menu");
|
||||
cellDbgFontPrintf(x_position, 0.10f, 1.4f, WHITE, "Quick Menu");
|
||||
cellDbgFontPrintf(x_position, 0.14f, 1.4f, WHITE, "Quick Menu");
|
||||
|
||||
cellDbgFontPrintf (x_position, ypos, font_size+0.01f, BLUE, "Load State #%d", g_extern.state_slot);
|
||||
cellDbgFontPrintf(x_position, ypos, font_size, MENU_ITEM_SELECTED(MENU_ITEM_LOAD_STATE), "Load State #%d", g_extern.state_slot);
|
||||
|
||||
cellDbgFontPrintf (x_position, ypos+(ypos_increment*MENU_ITEM_SAVE_STATE), font_size+0.01f, BLUE, "Save State #%d", g_extern.state_slot);
|
||||
cellDbgFontPrintf(x_position, ypos+(ypos_increment*MENU_ITEM_SAVE_STATE), font_size, MENU_ITEM_SELECTED(MENU_ITEM_SAVE_STATE), "Save State #%d", g_extern.state_slot);
|
||||
cellDbgFontDraw();
|
||||
|
||||
cellDbgFontPrintf (x_position, (ypos+(ypos_increment*MENU_ITEM_KEEP_ASPECT_RATIO)), font_size+0.01f, BLUE, "Aspect Ratio: %s", g_console.aspect_ratio_name);
|
||||
cellDbgFontPrintf(x_position, (ypos+(ypos_increment*MENU_ITEM_KEEP_ASPECT_RATIO)), font_size, MENU_ITEM_SELECTED(MENU_ITEM_KEEP_ASPECT_RATIO), "Aspect Ratio: %s", g_console.aspect_ratio_name);
|
||||
|
||||
cellDbgFontPrintf(x_position, (ypos+(ypos_increment*MENU_ITEM_OVERSCAN_AMOUNT)), font_size+0.01f, BLUE, "Overscan: %f", g_console.overscan_amount);
|
||||
cellDbgFontPrintf(x_position, (ypos+(ypos_increment*MENU_ITEM_OVERSCAN_AMOUNT)), font_size, MENU_ITEM_SELECTED(MENU_ITEM_OVERSCAN_AMOUNT), "Overscan: %f", g_console.overscan_amount);
|
||||
|
||||
cellDbgFontPrintf (x_position, (ypos+(ypos_increment*MENU_ITEM_ORIENTATION)), font_size+0.01f, BLUE, "Orientation: %s", msg_temp);
|
||||
cellDbgFontPrintf (x_position, (ypos+(ypos_increment*MENU_ITEM_ORIENTATION)), font_size, MENU_ITEM_SELECTED(MENU_ITEM_ORIENTATION), "Orientation: %s", msg_temp);
|
||||
cellDbgFontDraw();
|
||||
|
||||
cellDbgFontPrintf (x_position, (ypos+(ypos_increment*MENU_ITEM_RESIZE_MODE)), font_size+0.01f, BLUE, "Resize Mode");
|
||||
cellDbgFontPrintf(x_position, (ypos+(ypos_increment*MENU_ITEM_RESIZE_MODE)), font_size, MENU_ITEM_SELECTED(MENU_ITEM_RESIZE_MODE), "Resize Mode");
|
||||
|
||||
cellDbgFontPuts (x_position, (ypos+(ypos_increment*MENU_ITEM_FRAME_ADVANCE)), font_size+0.01f, BLUE, "Frame Advance");
|
||||
cellDbgFontPuts(x_position, (ypos+(ypos_increment*MENU_ITEM_FRAME_ADVANCE)), font_size, MENU_ITEM_SELECTED(MENU_ITEM_FRAME_ADVANCE), "Frame Advance");
|
||||
|
||||
cellDbgFontPuts (x_position, (ypos+(ypos_increment*MENU_ITEM_SCREENSHOT_MODE)), font_size+0.01f, BLUE, "Screenshot Mode");
|
||||
cellDbgFontPuts(x_position, (ypos+(ypos_increment*MENU_ITEM_SCREENSHOT_MODE)), font_size, MENU_ITEM_SELECTED(MENU_ITEM_SCREENSHOT_MODE), "Screenshot Mode");
|
||||
|
||||
cellDbgFontDraw();
|
||||
|
||||
cellDbgFontPuts (x_position, (ypos+(ypos_increment*MENU_ITEM_RESET)), font_size+0.01f, BLUE, "Reset");
|
||||
cellDbgFontPuts(x_position, (ypos+(ypos_increment*MENU_ITEM_RESET)), font_size, MENU_ITEM_SELECTED(MENU_ITEM_RESET), "Reset");
|
||||
|
||||
cellDbgFontPuts (x_position, (ypos+(ypos_increment*MENU_ITEM_RETURN_TO_GAME)), font_size+0.01f, BLUE, "Return to Game");
|
||||
cellDbgFontPuts(x_position, (ypos+(ypos_increment*MENU_ITEM_RETURN_TO_GAME)), font_size, MENU_ITEM_SELECTED(MENU_ITEM_RETURN_TO_GAME), "Return to Game");
|
||||
|
||||
cellDbgFontPuts (x_position, (ypos+(ypos_increment*MENU_ITEM_RETURN_TO_MENU)), font_size+0.01f, BLUE, "Return to Menu");
|
||||
cellDbgFontPuts(x_position, (ypos+(ypos_increment*MENU_ITEM_RETURN_TO_MENU)), font_size, MENU_ITEM_SELECTED(MENU_ITEM_RETURN_TO_MENU), "Return to Menu");
|
||||
cellDbgFontDraw();
|
||||
#ifdef MULTIMAN_SUPPORT
|
||||
cellDbgFontPuts (x_position, (ypos+(ypos_increment*MENU_ITEM_RETURN_TO_MULTIMAN)), font_size+0.01f, BLUE, "Return to multiMAN");
|
||||
cellDbgFontPuts(x_position, (ypos+(ypos_increment*MENU_ITEM_RETURN_TO_MULTIMAN)), font_size, MENU_ITEM_SELECTED(MENU_ITEM_RETURN_TO_MULTIMAN), "Return to multiMAN");
|
||||
#endif
|
||||
|
||||
cellDbgFontPuts(x_position, (ypos+(ypos_increment*MENU_ITEM_RETURN_TO_XMB)), font_size, MENU_ITEM_SELECTED(MENU_ITEM_RETURN_TO_XMB), "Return to XMB");
|
||||
cellDbgFontDraw();
|
||||
|
||||
cellDbgFontPuts (x_position, (ypos+(ypos_increment*MENU_ITEM_RETURN_TO_XMB)), font_size+0.01f, BLUE, "Return to XMB");
|
||||
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 (0.09f, 0.05f, Emulator_GetFontSize(), RED, "QUICK MENU");
|
||||
cellDbgFontPrintf (0.3f, 0.05f, 0.82f, WHITE, "Libsnes core: %s", snes_library_id());
|
||||
cellDbgFontPrintf (0.7f, 0.05f, 0.82f, WHITE, "%s v%s", EMULATOR_NAME, EMULATOR_VERSION);
|
||||
cellDbgFontDraw();
|
||||
if(IS_TIMER_NOT_EXPIRED())
|
||||
{
|
||||
cellDbgFontPrintf (0.09f, 0.90f, 1.51f, BLUE, special_action_msg);
|
||||
cellDbgFontPrintf (0.09f, 0.90f, 1.50f, WHITE, special_action_msg);
|
||||
cellDbgFontPrintf (0.05f, 0.90f, 1.10f, WHITE, special_action_msg);
|
||||
cellDbgFontDraw();
|
||||
}
|
||||
else
|
||||
{
|
||||
cellDbgFontPrintf (0.09f, 0.90f, 0.98f+0.01f, BLUE, comment);
|
||||
cellDbgFontPrintf (0.09f, 0.90f, 0.98f, LIGHTBLUE, comment);
|
||||
}
|
||||
cellDbgFontPrintf(0.09f, 0.83f, 0.91f, LIGHTBLUE, comment);
|
||||
cellDbgFontDraw();
|
||||
}
|
||||
|
||||
void menu_init (void)
|
||||
@ -1978,22 +1972,25 @@ void menu_loop(void)
|
||||
|
||||
menu_reinit_settings();
|
||||
|
||||
if(g_console.emulator_initialized)
|
||||
video_gl.set_swap_block_state(NULL, true);
|
||||
|
||||
if(g_console.ingame_menu_enable)
|
||||
{
|
||||
menuStackindex++;
|
||||
menuStack[menuStackindex] = menu_filebrowser;
|
||||
menuStack[menuStackindex].enum_id = INGAME_MENU;
|
||||
video_gl.set_swap_block_state(NULL, true);
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
if(g_console.ingame_menu_enable)
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glEnable(GL_BLEND);
|
||||
if(g_console.emulator_initialized)
|
||||
ssnes_render_cached_frame();
|
||||
else
|
||||
gl_frame_menu();
|
||||
|
||||
gl_frame_menu();
|
||||
|
||||
switch(menuStack[menuStackindex].enum_id)
|
||||
{
|
||||
@ -2034,13 +2031,14 @@ void menu_loop(void)
|
||||
}
|
||||
|
||||
video_gl.swap(NULL);
|
||||
glDisable(GL_BLEND);
|
||||
}while (g_console.menu_enable);
|
||||
|
||||
if(g_console.ingame_menu_enable)
|
||||
{
|
||||
menuStackindex--; // pop ingame menu from stack
|
||||
|
||||
if(g_console.emulator_initialized)
|
||||
video_gl.set_swap_block_state(NULL, false);
|
||||
}
|
||||
|
||||
g_console.ingame_menu_enable = false;
|
||||
}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 379 KiB |
BIN
ps3/pkg/USRDIR/borders/Menu/main-menu.png
Normal file
BIN
ps3/pkg/USRDIR/borders/Menu/main-menu.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 151 KiB |
@ -723,8 +723,8 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei
|
||||
|
||||
if (msg)
|
||||
{
|
||||
cellDbgFontPrintf(g_settings.video.msg_pos_x, g_settings.video.msg_pos_y, 1.51f, BLUE, msg);
|
||||
cellDbgFontPrintf(g_settings.video.msg_pos_x, g_settings.video.msg_pos_y, 1.50f, WHITE, msg);
|
||||
cellDbgFontPrintf(g_settings.video.msg_pos_x, g_settings.video.msg_pos_y, 1.11f, BLUE, msg);
|
||||
cellDbgFontPrintf(g_settings.video.msg_pos_x, g_settings.video.msg_pos_y, 1.10f, WHITE, msg);
|
||||
cellDbgFontDraw();
|
||||
}
|
||||
|
||||
|
53
ssnes.c
53
ssnes.c
@ -1600,34 +1600,53 @@ static bool check_fullscreen(void)
|
||||
return toggle;
|
||||
}
|
||||
|
||||
void ssnes_state_slot_increase(void)
|
||||
{
|
||||
g_extern.state_slot++;
|
||||
|
||||
if (g_extern.msg_queue)
|
||||
msg_queue_clear(g_extern.msg_queue);
|
||||
char msg[256];
|
||||
|
||||
snprintf(msg, sizeof(msg), "Save state/movie slot: %u", g_extern.state_slot);
|
||||
|
||||
if (g_extern.msg_queue)
|
||||
msg_queue_push(g_extern.msg_queue, msg, 1, 180);
|
||||
|
||||
SSNES_LOG("%s\n", msg);
|
||||
}
|
||||
|
||||
void ssnes_state_slot_decrease(void)
|
||||
{
|
||||
if (g_extern.state_slot > 0)
|
||||
g_extern.state_slot--;
|
||||
|
||||
if (g_extern.msg_queue)
|
||||
msg_queue_clear(g_extern.msg_queue);
|
||||
|
||||
char msg[256];
|
||||
|
||||
snprintf(msg, sizeof(msg), "Save state/movie slot: %u", g_extern.state_slot);
|
||||
|
||||
if (g_extern.msg_queue)
|
||||
msg_queue_push(g_extern.msg_queue, msg, 1, 180);
|
||||
|
||||
SSNES_LOG("%s\n", msg);
|
||||
}
|
||||
|
||||
static void check_stateslots(void)
|
||||
{
|
||||
// Save state slots
|
||||
static bool old_should_slot_increase = false;
|
||||
bool should_slot_increase = driver.input->key_pressed(driver.input_data, SSNES_STATE_SLOT_PLUS);
|
||||
if (should_slot_increase && !old_should_slot_increase)
|
||||
{
|
||||
g_extern.state_slot++;
|
||||
msg_queue_clear(g_extern.msg_queue);
|
||||
char msg[256];
|
||||
snprintf(msg, sizeof(msg), "Save state/movie slot: %u", g_extern.state_slot);
|
||||
msg_queue_push(g_extern.msg_queue, msg, 1, 180);
|
||||
SSNES_LOG("%s\n", msg);
|
||||
}
|
||||
ssnes_state_slot_increase();
|
||||
old_should_slot_increase = should_slot_increase;
|
||||
|
||||
static bool old_should_slot_decrease = false;
|
||||
bool should_slot_decrease = driver.input->key_pressed(driver.input_data, SSNES_STATE_SLOT_MINUS);
|
||||
if (should_slot_decrease && !old_should_slot_decrease)
|
||||
{
|
||||
if (g_extern.state_slot > 0)
|
||||
g_extern.state_slot--;
|
||||
msg_queue_clear(g_extern.msg_queue);
|
||||
char msg[256];
|
||||
snprintf(msg, sizeof(msg), "Save state/movie slot: %u", g_extern.state_slot);
|
||||
msg_queue_push(g_extern.msg_queue, msg, 1, 180);
|
||||
SSNES_LOG("%s\n", msg);
|
||||
}
|
||||
ssnes_state_slot_decrease();
|
||||
old_should_slot_decrease = should_slot_decrease;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user