mirror of https://github.com/snes9xgit/snes9x.git
GTK+: Remove vertex_shader and rename fragment_shader.
This commit is contained in:
parent
c1cbe9c65f
commit
a718990735
|
@ -147,8 +147,7 @@ int Snes9xConfig::load_defaults ()
|
||||||
pbo_format = 0;
|
pbo_format = 0;
|
||||||
npot_textures = FALSE;
|
npot_textures = FALSE;
|
||||||
use_shaders = 0;
|
use_shaders = 0;
|
||||||
fragment_shader[0] = '\0';
|
shader_filename[0] = '\0';
|
||||||
vertex_shader[0] = '\0';
|
|
||||||
sync_every_frame = FALSE;
|
sync_every_frame = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -268,7 +267,7 @@ int Snes9xConfig::save_config_file ()
|
||||||
cf.SetInt (z"PixelBufferObjectBitDepth", pbo_format);
|
cf.SetInt (z"PixelBufferObjectBitDepth", pbo_format);
|
||||||
outbool (cf, z"UseNonPowerOfTwoTextures", npot_textures);
|
outbool (cf, z"UseNonPowerOfTwoTextures", npot_textures);
|
||||||
outbool (cf, z"EnableCustomShaders", use_shaders);
|
outbool (cf, z"EnableCustomShaders", use_shaders);
|
||||||
cf.SetString (z"ShaderFile", fragment_shader);
|
cf.SetString (z"ShaderFile", shader_filename);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef z
|
#undef z
|
||||||
|
@ -497,7 +496,7 @@ int Snes9xConfig::load_config_file ()
|
||||||
inint (z"PixelBufferObjectBitDepth", pbo_format);
|
inint (z"PixelBufferObjectBitDepth", pbo_format);
|
||||||
inbool (z"UseNonPowerOfTwoTextures", npot_textures);
|
inbool (z"UseNonPowerOfTwoTextures", npot_textures);
|
||||||
inbool (z"EnableCustomShaders", use_shaders);
|
inbool (z"EnableCustomShaders", use_shaders);
|
||||||
instr (z"ShaderFile", fragment_shader);
|
instr (z"ShaderFile", shader_filename);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef z
|
#undef z
|
||||||
|
|
|
@ -148,8 +148,7 @@ class Snes9xConfig
|
||||||
int pbo_format;
|
int pbo_format;
|
||||||
unsigned char npot_textures;
|
unsigned char npot_textures;
|
||||||
unsigned char use_shaders;
|
unsigned char use_shaders;
|
||||||
char fragment_shader[PATH_MAX];
|
char shader_filename[PATH_MAX];
|
||||||
char vertex_shader[PATH_MAX];
|
|
||||||
unsigned char sync_every_frame;
|
unsigned char sync_every_frame;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -405,7 +405,7 @@ int S9xOpenGLDisplayDriver::opengl_defaults ()
|
||||||
|
|
||||||
if (config->use_shaders)
|
if (config->use_shaders)
|
||||||
{
|
{
|
||||||
if (legacy || !load_shaders (config->fragment_shader))
|
if (legacy || !load_shaders (config->shader_filename))
|
||||||
{
|
{
|
||||||
config->use_shaders = false;
|
config->use_shaders = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -711,7 +711,7 @@ Snes9xPreferences::move_settings_to_dialog ()
|
||||||
set_combo ("pixel_format", config->pbo_format == 16 ? 0 : 1);
|
set_combo ("pixel_format", config->pbo_format == 16 ? 0 : 1);
|
||||||
set_check ("npot_textures", config->npot_textures);
|
set_check ("npot_textures", config->npot_textures);
|
||||||
set_check ("use_shaders", config->use_shaders);
|
set_check ("use_shaders", config->use_shaders);
|
||||||
set_entry_text ("fragment_shader", config->fragment_shader);
|
set_entry_text ("fragment_shader", config->shader_filename);
|
||||||
#endif
|
#endif
|
||||||
set_spin ("joystick_threshold", config->joystick_threshold);
|
set_spin ("joystick_threshold", config->joystick_threshold);
|
||||||
|
|
||||||
|
@ -864,7 +864,7 @@ Snes9xPreferences::get_settings_from_dialog ()
|
||||||
config->use_shaders = get_check ("use_shaders");
|
config->use_shaders = get_check ("use_shaders");
|
||||||
config->sync_every_frame = get_check ("sync_every_frame");
|
config->sync_every_frame = get_check ("sync_every_frame");
|
||||||
|
|
||||||
sstrncpy (config->fragment_shader, get_entry_text ("fragment_shader"), PATH_MAX);
|
sstrncpy (config->shader_filename, get_entry_text ("fragment_shader"), PATH_MAX);
|
||||||
|
|
||||||
config->pbo_format = pbo_format;
|
config->pbo_format = pbo_format;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -64,7 +64,7 @@ static void dialog_response (GtkDialog *pdialog, gint response_id, gpointer user
|
||||||
{
|
{
|
||||||
std::string config_file = get_config_dir() + "/snes9x.glslp";
|
std::string config_file = get_config_dir() + "/snes9x.glslp";
|
||||||
S9xDisplayGetDriver ()->save (config_file.c_str ());
|
S9xDisplayGetDriver ()->save (config_file.c_str ());
|
||||||
realpath (config_file.c_str (), gui_config->fragment_shader);
|
realpath (config_file.c_str (), gui_config->shader_filename);
|
||||||
|
|
||||||
if (dialog)
|
if (dialog)
|
||||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||||
|
|
Loading…
Reference in New Issue