mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-15 23:06:40 +00:00
Merge branch 'master' of github.com:Themaister/SSNES
This commit is contained in:
commit
6f368200b9
@ -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
|
||||
|
||||
|
@ -125,7 +125,8 @@ static void set_default_settings(void)
|
||||
strlcpy(g_console.default_savestate_dir, usrDirPath, sizeof(g_console.default_savestate_dir));
|
||||
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));
|
||||
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;
|
||||
@ -167,7 +168,9 @@ static void init_settings(void)
|
||||
CONFIG_GET_INT_CONSOLE(aspect_ratio_index, "aspect_ratio_index");
|
||||
CONFIG_GET_INT_CONSOLE(current_resolution_id, "current_resolution_id");
|
||||
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");
|
||||
@ -208,7 +211,9 @@ static void save_settings(void)
|
||||
config_set_int(conf, "aspect_ratio_index", g_console.aspect_ratio_index);
|
||||
config_set_int(conf, "current_resolution_id", g_console.current_resolution_id);
|
||||
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 |"
|
||||
|
56
ps3/menu.c
56
ps3/menu.c
@ -359,8 +359,18 @@ 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)
|
||||
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), g_console.aspect_ratio_name);
|
||||
break;
|
||||
case SETTING_HW_TEXTURE_FILTER:
|
||||
if(g_settings.video.smooth)
|
||||
@ -975,6 +985,8 @@ static void producesettingentry(menu * menu_obj, uint64_t switchvalue)
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
gl_cg_load_shader(1, DEFAULT_SHADER_FILE);
|
||||
strlcpy(g_settings.video.cg_shader_path, DEFAULT_SHADER_FILE, sizeof(g_settings.video.cg_shader_path));
|
||||
menu_reinit_settings();
|
||||
}
|
||||
break;
|
||||
case SETTING_SHADER_2:
|
||||
@ -989,11 +1001,55 @@ static void producesettingentry(menu * menu_obj, uint64_t switchvalue)
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
gl_cg_load_shader(2, DEFAULT_SHADER_FILE);
|
||||
strlcpy(g_settings.video.second_pass_shader, DEFAULT_SHADER_FILE, sizeof(g_settings.video.second_pass_shader));
|
||||
menu_reinit_settings();
|
||||
}
|
||||
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))
|
||||
{
|
||||
if(g_console.aspect_ratio_index > 0)
|
||||
{
|
||||
g_console.aspect_ratio_index--;
|
||||
ps3graphics_set_aspect_ratio(g_console.aspect_ratio_index);
|
||||
set_text_message("", 7);
|
||||
}
|
||||
}
|
||||
if(CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state))
|
||||
{
|
||||
if(g_console.aspect_ratio_index < LAST_ASPECT_RATIO)
|
||||
{
|
||||
g_console.aspect_ratio_index++;
|
||||
ps3graphics_set_aspect_ratio(g_console.aspect_ratio_index);
|
||||
set_text_message("", 7);
|
||||
}
|
||||
}
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
g_console.aspect_ratio_index = ASPECT_RATIO_4_3;
|
||||
ps3graphics_set_aspect_ratio(g_console.aspect_ratio_index);
|
||||
set_text_message("", 7);
|
||||
}
|
||||
break;
|
||||
case SETTING_HW_TEXTURE_FILTER:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
|
||||
|
@ -487,7 +487,7 @@ void gl_frame_menu (void)
|
||||
gl->win_height, gl->win_width, gl->win_height, g_frame_count,
|
||||
NULL, NULL, NULL, 0);
|
||||
|
||||
set_viewport(gl, gl->win_width, gl->win_height, false);
|
||||
set_viewport(gl, gl->win_width, gl->win_height, true);
|
||||
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
glBindTexture(GL_TEXTURE_2D, gl->menu_texture_id);
|
||||
@ -1316,6 +1316,7 @@ void ps3graphics_set_aspect_ratio(uint32_t aspectratio_index)
|
||||
break;
|
||||
}
|
||||
g_settings.video.force_aspect = false;
|
||||
gl->keep_aspect = true;
|
||||
set_viewport(gl, gl->win_width, gl->win_height, false);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user