Minor code cleanup for readability.
This commit is contained in:
parent
d01c019f11
commit
a5cd18fe30
|
@ -182,20 +182,29 @@ FCEUD_GetTimeFreq(void)
|
||||||
static int
|
static int
|
||||||
DriverInitialize(FCEUGI *gi)
|
DriverInitialize(FCEUGI *gi)
|
||||||
{
|
{
|
||||||
if(InitVideo(gi) < 0) return 0;
|
if (InitVideo(gi) < 0)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
inited|=4;
|
inited|=4;
|
||||||
|
|
||||||
if(InitSound())
|
if (InitSound())
|
||||||
|
{
|
||||||
inited|=1;
|
inited|=1;
|
||||||
|
}
|
||||||
|
|
||||||
if(InitJoysticks())
|
if (InitJoysticks())
|
||||||
|
{
|
||||||
inited|=2;
|
inited|=2;
|
||||||
|
}
|
||||||
|
|
||||||
int fourscore=0;
|
int fourscore=0;
|
||||||
g_config->getOption("SDL.FourScore", &fourscore);
|
g_config->getOption("SDL.FourScore", &fourscore);
|
||||||
eoptions &= ~EO_FOURSCORE;
|
eoptions &= ~EO_FOURSCORE;
|
||||||
if(fourscore)
|
if (fourscore)
|
||||||
|
{
|
||||||
eoptions |= EO_FOURSCORE;
|
eoptions |= EO_FOURSCORE;
|
||||||
|
}
|
||||||
|
|
||||||
InitInputInterface();
|
InitInputInterface();
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -425,12 +434,12 @@ CloseGame(void)
|
||||||
debugSymbolTable.clear();
|
debugSymbolTable.clear();
|
||||||
CDLoggerROMClosed();
|
CDLoggerROMClosed();
|
||||||
|
|
||||||
int state_to_save;
|
int state_to_save;
|
||||||
g_config->getOption("SDL.AutoSaveState", &state_to_save);
|
g_config->getOption("SDL.AutoSaveState", &state_to_save);
|
||||||
if (state_to_save < 10 && state_to_save >= 0){
|
if (state_to_save < 10 && state_to_save >= 0){
|
||||||
FCEUI_SelectState(state_to_save, 0);
|
FCEUI_SelectState(state_to_save, 0);
|
||||||
FCEUI_SaveState(NULL, false);
|
FCEUI_SaveState(NULL, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
int autoInputPreset;
|
int autoInputPreset;
|
||||||
g_config->getOption( "SDL.AutoInputPreset", &autoInputPreset );
|
g_config->getOption( "SDL.AutoInputPreset", &autoInputPreset );
|
||||||
|
|
|
@ -105,8 +105,9 @@ KillVideo()
|
||||||
|
|
||||||
// return failure if the video system was not initialized
|
// return failure if the video system was not initialized
|
||||||
if (s_inited == 0)
|
if (s_inited == 0)
|
||||||
|
{
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
// SDL Video system is not used.
|
// SDL Video system is not used.
|
||||||
// shut down the SDL video sub-system
|
// shut down the SDL video sub-system
|
||||||
|
|
Loading…
Reference in New Issue