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:
parent
00e316b521
commit
26f36da7e7
|
@ -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]);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue