mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-13 22:08:34 +00:00
(PS3) CGP files can now be saved
This commit is contained in:
parent
de9db9bcea
commit
051c82daed
@ -33,7 +33,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
},
|
||||
{
|
||||
SETTING_SHADER_PRESETS,
|
||||
"Shader Preset",
|
||||
"Shader Preset (CGP)",
|
||||
"",
|
||||
0.0f,
|
||||
0.0f,
|
||||
@ -226,12 +226,12 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
},
|
||||
{
|
||||
SETTING_SAVE_SHADER_PRESET,
|
||||
"SAVE SETTINGS AS SHADER PRESET",
|
||||
"SAVE SETTINGS AS CGP PRESET ",
|
||||
"",
|
||||
0.0f,
|
||||
0.0f,
|
||||
YELLOW,
|
||||
"INFO - Save the current video settings to a shader preset file.",
|
||||
"INFO - Save the current video settings to a [CG Preset] (CGP) file.",
|
||||
GREEN,
|
||||
0.91f,
|
||||
0.09f,
|
||||
@ -246,7 +246,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
0.0f,
|
||||
0.0f,
|
||||
YELLOW,
|
||||
"INFO - Automatically load the shader preset on startup.",
|
||||
"INFO - Automatically load the currently selected [CG Preset] file on startup.",
|
||||
GREEN,
|
||||
0.91f,
|
||||
0.09f,
|
||||
|
31
ps3/menu.c
31
ps3/menu.c
@ -554,6 +554,10 @@ static void set_setting_label(menu * menu_obj, uint64_t currentsetting)
|
||||
}
|
||||
break;
|
||||
case SETTING_SAVE_SHADER_PRESET:
|
||||
if(menu_obj->selected == currentsetting)
|
||||
menu_obj->items[currentsetting].text_color = GREEN;
|
||||
else
|
||||
menu_obj->items[currentsetting].text_color = ORANGE;
|
||||
break;
|
||||
case SETTING_APPLY_SHADER_PRESET_ON_STARTUP:
|
||||
break;
|
||||
@ -818,7 +822,7 @@ static void select_file(uint32_t menu_id)
|
||||
break;
|
||||
case PRESET_CHOICE:
|
||||
strncpy(dir_path, PRESETS_DIR_PATH, sizeof(dir_path));
|
||||
strncpy(extensions, "cgp", sizeof(extensions));
|
||||
strncpy(extensions, "cgp|CGP", sizeof(extensions));
|
||||
strncpy(title, "SHADER PRESETS SELECTION", sizeof(title));
|
||||
strncpy(object, "Shader", sizeof(object));
|
||||
strncpy(object, "Shader preset", sizeof(object));
|
||||
@ -1110,17 +1114,12 @@ static void ssnes_filename_input_and_save (unsigned filename_type)
|
||||
switch(filename_type)
|
||||
{
|
||||
case CONFIG_FILE:
|
||||
{
|
||||
}
|
||||
break;
|
||||
case SHADER_PRESET_FILE:
|
||||
{
|
||||
}
|
||||
snprintf(filepath, sizeof(filepath), "%s/%s.cgp", PRESETS_DIR_PATH, filename_tmp);
|
||||
break;
|
||||
case INPUT_PRESET_FILE:
|
||||
{
|
||||
snprintf(filepath, sizeof(filepath), "%s/%s.cfg", INPUT_PRESETS_DIR_PATH, filename_tmp);
|
||||
}
|
||||
snprintf(filepath, sizeof(filepath), "%s/%s.cfg", INPUT_PRESETS_DIR_PATH, filename_tmp);
|
||||
break;
|
||||
}
|
||||
filename_entered = true;
|
||||
@ -1148,13 +1147,21 @@ static void ssnes_filename_input_and_save (unsigned filename_type)
|
||||
else
|
||||
snprintf(filetitle_tmp, sizeof(filetitle_tmp), "%s", "Custom");
|
||||
|
||||
SSNES_LOG("path to save to: %s\n", filepath);
|
||||
|
||||
switch(filename_type)
|
||||
{
|
||||
case CONFIG_FILE:
|
||||
break;
|
||||
case SHADER_PRESET_FILE:
|
||||
{
|
||||
struct gl_cg_cgp_info current_settings;
|
||||
current_settings.shader[0] = g_settings.video.cg_shader_path;
|
||||
current_settings.shader[1] = g_settings.video.second_pass_shader;
|
||||
current_settings.filter_linear[0] = g_settings.video.smooth;
|
||||
current_settings.filter_linear[1] = g_settings.video.second_pass_smooth;
|
||||
current_settings.render_to_texture = true;
|
||||
current_settings.fbo_scale = g_settings.video.fbo_scale_x; //fbo_scale_x and y are the same anyway
|
||||
gl_cg_save_cgp(filepath, ¤t_settings);
|
||||
}
|
||||
break;
|
||||
case INPUT_PRESET_FILE:
|
||||
config_save_keybinds(filepath);
|
||||
@ -1487,6 +1494,10 @@ static void producesettingentry(menu * menu_obj, uint64_t switchvalue)
|
||||
}
|
||||
break;
|
||||
case SETTING_SAVE_SHADER_PRESET:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) | CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
|
||||
{
|
||||
ssnes_filename_input_and_save(SHADER_PRESET_FILE);
|
||||
}
|
||||
break;
|
||||
case SETTING_APPLY_SHADER_PRESET_ON_STARTUP:
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user