mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
Add settings.
This commit is contained in:
parent
84b2b9c7a5
commit
41b2af66d5
@ -113,6 +113,12 @@ static const unsigned font_size = 48;
|
||||
static const float message_pos_offset_x = 0.05;
|
||||
static const float message_pos_offset_y = 0.05;
|
||||
|
||||
// Render-to-texture before rendering to screen (multi-pass shaders)
|
||||
static const bool render_to_texture = false;
|
||||
static const float fbo_scale_x = 2.0;
|
||||
static const float fbo_scale_y = 2.0;
|
||||
static const bool second_pass_smooth = true;
|
||||
|
||||
#define SNES_ASPECT_RATIO (4.0/3)
|
||||
|
||||
////////////////
|
||||
|
@ -72,6 +72,12 @@ struct settings
|
||||
unsigned filter;
|
||||
enum ssnes_shader_type shader_type;
|
||||
|
||||
bool render_to_texture;
|
||||
double fbo_scale_x;
|
||||
double fbo_scale_y;
|
||||
char second_pass_shader[256];
|
||||
bool second_pass_smooth;
|
||||
|
||||
char font_path[256];
|
||||
unsigned font_size;
|
||||
float msg_pos_x;
|
||||
|
12
settings.c
12
settings.c
@ -115,6 +115,13 @@ static void set_defaults(void)
|
||||
g_settings.video.msg_pos_y = message_pos_offset_y;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_XML)
|
||||
g_settings.video.render_to_texture = render_to_texture;
|
||||
g_settings.video.fbo_scale_x = fbo_scale_x;
|
||||
g_settings.video.fbo_scale_y = fbo_scale_y;
|
||||
g_settings.video.second_pass_smooth = second_pass_smooth;
|
||||
#endif
|
||||
|
||||
g_settings.audio.enable = audio_enable;
|
||||
g_settings.audio.out_rate = out_rate;
|
||||
g_settings.audio.in_rate = in_rate;
|
||||
@ -280,6 +287,11 @@ static void parse_config_file(void)
|
||||
|
||||
CONFIG_GET_STRING(video.cg_shader_path, "video_cg_shader");
|
||||
CONFIG_GET_STRING(video.bsnes_shader_path, "video_bsnes_shader");
|
||||
CONFIG_GET_STRING(video.second_pass_shader, "video_second_pass_shader");
|
||||
CONFIG_GET_BOOL(video.render_to_texture, "video_render_to_texture");
|
||||
CONFIG_GET_DOUBLE(video.fbo_scale_x, "video_fbo_scale_x");
|
||||
CONFIG_GET_DOUBLE(video.fbo_scale_x, "video_fbo_scale_y");
|
||||
CONFIG_GET_BOOL(video.second_pass_smooth, "video_second_pass_smooth");
|
||||
|
||||
#ifdef HAVE_FREETYPE
|
||||
CONFIG_GET_STRING(video.font_path, "video_font_path");
|
||||
|
14
ssnes.cfg
14
ssnes.cfg
@ -38,6 +38,20 @@
|
||||
# Which shader type to use. Valid values are "cg", "bsnes", "none" and "auto"
|
||||
# video_shader_type = auto
|
||||
|
||||
# Render to texture first. Useful when doing multi-pass shaders or control the output of shaders better.
|
||||
# video_render_to_texture = false
|
||||
|
||||
# Defines the video scale of render-to-texture.
|
||||
# The output FBO size is scaled by these amounts against the input size (typically 256 * 224 for SNES).
|
||||
# video_fbo_scale_x = 2.0
|
||||
# video_fbo_scale_y = 2.0
|
||||
|
||||
# Define shader to use for second pass (needs render-to-texture).
|
||||
# video_second_pass_shader = "/path/to/second/shader.{cg,shader}"
|
||||
|
||||
# Defines if bilinear filtering is used during second pass (needs render-to-texture).
|
||||
# video_second_pass_smooth = true
|
||||
|
||||
# CPU-based filter. Valid ones are: hq2x, hq4x, grayscale, bleed, ntsc.
|
||||
# video_filter = ntsc
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user