mirror of https://github.com/snes9xgit/snes9x.git
GTK+: Get rid of # in joystick binding name.
Rename a couple bindings.
This commit is contained in:
parent
0c3bc1d350
commit
43c61d1c77
|
@ -216,7 +216,7 @@ Binding::Binding (const char *raw_string)
|
||||||
char posneg;
|
char posneg;
|
||||||
const char *substr = &raw_string[8];
|
const char *substr = &raw_string[8];
|
||||||
|
|
||||||
if (sscanf (substr, "%u Axis #%u %c %u", &device, &axis, &posneg, &percent) == 4)
|
if (sscanf (substr, "%u Axis %u %c %u", &device, &axis, &posneg, &percent) == 4)
|
||||||
{
|
{
|
||||||
value = Binding(device - 1, JOY_AXIS (axis, posneg == '+' ? AXIS_POS : AXIS_NEG), percent).value;
|
value = Binding(device - 1, JOY_AXIS (axis, posneg == '+' ? AXIS_POS : AXIS_NEG), percent).value;
|
||||||
}
|
}
|
||||||
|
@ -271,7 +271,7 @@ Binding::to_string (char *str)
|
||||||
{
|
{
|
||||||
if ((get_key ()) >= 512)
|
if ((get_key ()) >= 512)
|
||||||
sprintf (buf,
|
sprintf (buf,
|
||||||
_("Axis #%u %s %u%%"),
|
_("Axis %u %s %u%%"),
|
||||||
get_axis (),
|
get_axis (),
|
||||||
is_positive () ? "+" : "-",
|
is_positive () ? "+" : "-",
|
||||||
get_threshold ());
|
get_threshold ());
|
||||||
|
|
|
@ -256,10 +256,6 @@ int Snes9xConfig::save_config_file ()
|
||||||
char buffer[PATH_MAX];
|
char buffer[PATH_MAX];
|
||||||
ConfigFile cf;
|
ConfigFile cf;
|
||||||
|
|
||||||
cf.SetNiceAlignment (true);
|
|
||||||
cf.SetShowComments (true);
|
|
||||||
cf.SetAlphaSort (true);
|
|
||||||
|
|
||||||
#undef z
|
#undef z
|
||||||
#define z "Display::"
|
#define z "Display::"
|
||||||
outbool (cf, z"FullscreenOnOpen", full_screen_on_open,"Set the screen resolution after opening a ROM");
|
outbool (cf, z"FullscreenOnOpen", full_screen_on_open,"Set the screen resolution after opening a ROM");
|
||||||
|
@ -290,7 +286,7 @@ int Snes9xConfig::save_config_file ()
|
||||||
cf.SetString (z"Bleed", std::to_string (ntsc_setup.bleed));
|
cf.SetString (z"Bleed", std::to_string (ntsc_setup.bleed));
|
||||||
cf.SetString (z"Fringing", std::to_string (ntsc_setup.fringing));
|
cf.SetString (z"Fringing", std::to_string (ntsc_setup.fringing));
|
||||||
cf.SetString (z"Resolution", std::to_string (ntsc_setup.resolution));
|
cf.SetString (z"Resolution", std::to_string (ntsc_setup.resolution));
|
||||||
cf.SetInt (z"MergeFields", ntsc_setup.merge_fields);
|
outbool (cf, z"MergeFields", ntsc_setup.merge_fields);
|
||||||
cf.SetInt (z"ScanlineIntensity", ntsc_scanline_intensity);
|
cf.SetInt (z"ScanlineIntensity", ntsc_scanline_intensity);
|
||||||
|
|
||||||
#ifdef USE_OPENGL
|
#ifdef USE_OPENGL
|
||||||
|
@ -383,7 +379,7 @@ int Snes9xConfig::save_config_file ()
|
||||||
#ifdef USE_JOYSTICK
|
#ifdef USE_JOYSTICK
|
||||||
#undef z
|
#undef z
|
||||||
#define z "Input::"
|
#define z "Input::"
|
||||||
cf.SetInt (z"joystick_threshold", joystick_threshold);
|
cf.SetInt (z"JoystickThreshold", joystick_threshold);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef z
|
#undef z
|
||||||
|
@ -408,6 +404,8 @@ int Snes9xConfig::save_config_file ()
|
||||||
}
|
}
|
||||||
|
|
||||||
filename = get_config_file_name ();
|
filename = get_config_file_name ();
|
||||||
|
cf.SetNiceAlignment (true);
|
||||||
|
cf.SetShowComments (true);
|
||||||
cf.SaveTo (filename);
|
cf.SaveTo (filename);
|
||||||
free (filename);
|
free (filename);
|
||||||
|
|
||||||
|
@ -491,7 +489,7 @@ int Snes9xConfig::load_config_file ()
|
||||||
infloat (z"Bleed", ntsc_setup.bleed);
|
infloat (z"Bleed", ntsc_setup.bleed);
|
||||||
infloat (z"Fringing", ntsc_setup.fringing);
|
infloat (z"Fringing", ntsc_setup.fringing);
|
||||||
infloat (z"Resolution", ntsc_setup.resolution);
|
infloat (z"Resolution", ntsc_setup.resolution);
|
||||||
inint (z"MergeFields", ntsc_setup.merge_fields);
|
inbool (z"MergeFields", ntsc_setup.merge_fields);
|
||||||
inint (z"ScanlineIntensity", ntsc_scanline_intensity);
|
inint (z"ScanlineIntensity", ntsc_scanline_intensity);
|
||||||
|
|
||||||
#ifdef USE_OPENGL
|
#ifdef USE_OPENGL
|
||||||
|
@ -584,7 +582,7 @@ int Snes9xConfig::load_config_file ()
|
||||||
#ifdef USE_JOYSTICK
|
#ifdef USE_JOYSTICK
|
||||||
#undef z
|
#undef z
|
||||||
#define z "Input::"
|
#define z "Input::"
|
||||||
inint (z"joystick_threshold", joystick_threshold);
|
inint (z"JoystickThreshold", joystick_threshold);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (int i = 0; i < NUM_JOYPADS; i++)
|
for (int i = 0; i < NUM_JOYPADS; i++)
|
||||||
|
|
Loading…
Reference in New Issue