mirror of
https://github.com/libretro/RetroArch
synced 2025-02-12 09:40:06 +00:00
(PS3) Added menu font options/settings
This commit is contained in:
parent
d3d97bf11e
commit
e7d3e524bb
@ -190,6 +190,7 @@ struct console_settings
|
||||
char default_rom_startup_dir[PATH_MAX];
|
||||
char default_savestate_dir[PATH_MAX];
|
||||
char default_sram_dir[PATH_MAX];
|
||||
float menu_font_size;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -126,6 +126,7 @@ static void set_default_settings(void)
|
||||
strlcpy(g_console.default_sram_dir, usrDirPath, sizeof(g_console.default_sram_dir));
|
||||
g_console.aspect_ratio_index = 0;
|
||||
strlcpy(g_console.aspect_ratio_name, "4:3", sizeof(g_console.aspect_ratio_name));
|
||||
g_console.menu_font_size = 1.0f;
|
||||
|
||||
// g_extern
|
||||
g_extern.state_slot = 0;
|
||||
@ -169,6 +170,7 @@ static void init_settings(void)
|
||||
CONFIG_GET_INT_CONSOLE(screen_orientation, "screen_orientation");
|
||||
CONFIG_GET_STRING_CONSOLE(aspect_ratio_name, "aspect_ratio_name");
|
||||
CONFIG_GET_STRING_CONSOLE(default_rom_startup_dir, "default_rom_startup_dir");
|
||||
CONFIG_GET_FLOAT_CONSOLE(menu_font_size, "menu_font_size");
|
||||
|
||||
// g_extern
|
||||
CONFIG_GET_INT_EXTERN(state_slot, "state_slot");
|
||||
@ -211,6 +213,7 @@ static void save_settings(void)
|
||||
config_set_int(conf, "screen_orientation", g_console.screen_orientation);
|
||||
config_set_string(conf, "aspect_ratio_name", g_console.aspect_ratio_name);
|
||||
config_set_string(conf, "default_rom_startup_dir", g_console.default_rom_startup_dir);
|
||||
config_set_float(conf, "menu_font_size", g_console.menu_font_size);
|
||||
|
||||
// g_extern
|
||||
config_set_int(conf, "state_slot", g_extern.state_slot);
|
||||
|
@ -16,7 +16,7 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define FONT_SIZE 1.0f
|
||||
#define FONT_SIZE (g_console.menu_font_size)
|
||||
#define EMU_MENU_TITLE "SSNES |"
|
||||
#define VIDEO_MENU_TITLE "SSNES VIDEO |"
|
||||
#define AUDIO_MENU_TITLE "SSNES AUDIO |"
|
||||
|
23
ps3/menu.c
23
ps3/menu.c
@ -359,6 +359,11 @@ static void set_setting_label(menu * menu_obj, int currentsetting)
|
||||
case SETTING_GAME_AWARE_SHADER:
|
||||
break;
|
||||
case SETTING_FONT_SIZE:
|
||||
if(g_console.menu_font_size == 1.0f)
|
||||
menu_obj->items[currentsetting].text_color = GREEN;
|
||||
else
|
||||
menu_obj->items[currentsetting].text_color = ORANGE;
|
||||
snprintf(menu_obj->items[currentsetting].setting_text, sizeof(menu_obj->items[currentsetting].setting_text), "%f", g_console.menu_font_size);
|
||||
break;
|
||||
case SETTING_KEEP_ASPECT_RATIO:
|
||||
if(g_console.aspect_ratio_index == ASPECT_RATIO_4_3)
|
||||
@ -1001,6 +1006,24 @@ static void producesettingentry(menu * menu_obj, uint64_t switchvalue)
|
||||
}
|
||||
break;
|
||||
case SETTING_FONT_SIZE:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
if(g_console.menu_font_size > 0)
|
||||
{
|
||||
g_console.menu_font_size -= 0.01f;
|
||||
set_text_message("", 7);
|
||||
}
|
||||
}
|
||||
if(CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
if((g_console.menu_font_size < 2.0f))
|
||||
{
|
||||
g_console.menu_font_size += 0.01f;
|
||||
set_text_message("", 7);
|
||||
}
|
||||
}
|
||||
if(CTRL_START(state))
|
||||
g_console.menu_font_size = 1.0f;
|
||||
break;
|
||||
case SETTING_KEEP_ASPECT_RATIO:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state))
|
||||
|
Loading…
x
Reference in New Issue
Block a user