Another bug fix for gamepad config loading at startup, the first fix was in the wrong place. Removed static video variable from header.

This commit is contained in:
Matthew Budd 2020-05-16 11:13:24 -04:00
parent 00e316b521
commit 26f36da7e7
5 changed files with 7 additions and 7 deletions

View File

@ -269,9 +269,10 @@ InitConfig()
config->addOption("4buttonexit", "SDL.ABStartSelectExit", 0);
// GamePad 0 - 3
for(unsigned int i = 0; i < GAMEPAD_NUM_DEVICES; i++) {
for(unsigned int i = 0; i < GAMEPAD_NUM_DEVICES; i++)
{
char buf[64];
snprintf(buf, 20, "SDL.Input.GamePad.%d.", i);
snprintf(buf, sizeof(buf)-1, "SDL.Input.GamePad.%d.", i);
prefix = buf;
config->addOption(prefix + "DeviceType", DefaultGamePadDevice[i]);
@ -284,7 +285,7 @@ InitConfig()
// PowerPad 0 - 1
for(unsigned int i = 0; i < POWERPAD_NUM_DEVICES; i++) {
char buf[64];
snprintf(buf, 20, "SDL.Input.PowerPad.%d.", i);
snprintf(buf, sizeof(buf)-1, "SDL.Input.PowerPad.%d.", i);
prefix = buf;
config->addOption(prefix + "DeviceType", DefaultPowerPadDevice[i]);

View File

@ -126,7 +126,7 @@ int configGamepadButton (GtkButton * button, gpointer p)
ButtonConfigBegin ();
snprintf (buf, sizeof (buf), "SDL.Input.GamePad.%d", padNo);
snprintf (buf, sizeof(buf)-1, "SDL.Input.GamePad.%d.", padNo);
prefix = buf;
DWaitButton (NULL, &GamePadConfig[padNo][x], configNo);

View File

@ -2145,7 +2145,7 @@ UpdateInput (Config * config)
for (unsigned int i = 0; i < GAMEPAD_NUM_DEVICES; i++)
{
char buf[64];
snprintf (buf, 32, "SDL.Input.GamePad.%d", i);
snprintf (buf, sizeof(buf)-1, "SDL.Input.GamePad.%d.", i);
prefix = buf;
config->getOption (prefix + "DeviceType", &device);

View File

@ -55,7 +55,7 @@
extern Config *g_config;
// STATIC GLOBALS
extern SDL_Surface *s_screen;
static SDL_Surface *s_screen = NULL;
static SDL_Surface *s_BlitBuf; // Buffer when using hardware-accelerated blits.
static SDL_Surface *s_IconSurface = NULL;

View File

@ -9,7 +9,6 @@
uint32 PtoV(uint16 x, uint16 y);
bool FCEUD_ShouldDrawInputAids();
bool FCEUI_AviDisableMovieMessages();
static SDL_Surface *s_screen;
bool FCEUI_AviEnableHUDrecording();
void FCEUI_SetAviEnableHUDrecording(bool enable);
bool FCEUI_AviDisableMovieMessages();