added support for "Enable HUD recording" option to SDL version

This commit is contained in:
ansstuff 2011-09-26 12:00:48 +00:00
parent 92ff246e15
commit 42edaa4b33
5 changed files with 30 additions and 7 deletions

View File

@ -193,6 +193,7 @@ InitConfig()
// pause movie playback at frame x
config->addOption("pauseframe", "SDL.PauseFrame", 0);
config->addOption("recordhud", "SDL.RecordHUD", 1);
config->addOption("moviemsg", "SDL.MovieMsg", 1);
// overwrite the config file?

View File

@ -783,6 +783,20 @@ PtoV(uint16 x,
y += s_srendline;
return (x | (y << 16));
}
bool enableHUDrecording = false;
bool FCEUI_AviEnableHUDrecording()
{
if (enableHUDrecording)
return true;
return false;
}
void FCEUI_SetAviEnableHUDrecording(bool enable)
{
enableHUDrecording = enable;
}
bool disableMovieMessages = false;
bool FCEUI_AviDisableMovieMessages()
{
@ -791,7 +805,6 @@ bool FCEUI_AviDisableMovieMessages()
return false;
}
void FCEUI_SetAviDisableMovieMessages(bool disable)
{
disableMovieMessages = disable;

View File

@ -4,6 +4,8 @@ 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();
void FCEUI_SetAviDisableMovieMessages(bool disable);

View File

@ -605,6 +605,14 @@ int main(int argc, char *argv[])
return 0;
}
// check to see if recording HUD to AVI is enabled
int rh;
g_config->getOption("SDL.RecordHUD", &rh);
if( rh == 0)
FCEUI_SetAviEnableHUDrecording(true);
else
FCEUI_SetAviEnableHUDrecording(false);
// check to see if movie messages are disabled
int mm;
g_config->getOption("SDL.MovieMsg", &mm);

View File

@ -215,10 +215,9 @@ void FCEU_PutImage(void)
ReallySnap();
dosnapsave=0;
}
#ifdef WIN32
if (!FCEUI_AviEnableHUDrecording())
#endif
snapAVI();
if (!FCEUI_AviEnableHUDrecording()) snapAVI();
if(GameInfo->type==GIT_VSUNI)
FCEU_VSUniDraw(XBuf);
@ -411,7 +410,7 @@ void FCEU_PutImage(void)
}
}
}
#ifdef WIN32
if (FCEUI_AviEnableHUDrecording())
{
if (FCEUI_AviDisableMovieMessages())
@ -424,7 +423,7 @@ void FCEU_PutImage(void)
snapAVI();
}
} else DrawMessage(false);
#endif
}
void snapAVI()
{