added support for "Enable HUD recording" option to SDL version
This commit is contained in:
parent
92ff246e15
commit
42edaa4b33
|
@ -193,6 +193,7 @@ InitConfig()
|
||||||
|
|
||||||
// pause movie playback at frame x
|
// pause movie playback at frame x
|
||||||
config->addOption("pauseframe", "SDL.PauseFrame", 0);
|
config->addOption("pauseframe", "SDL.PauseFrame", 0);
|
||||||
|
config->addOption("recordhud", "SDL.RecordHUD", 1);
|
||||||
config->addOption("moviemsg", "SDL.MovieMsg", 1);
|
config->addOption("moviemsg", "SDL.MovieMsg", 1);
|
||||||
|
|
||||||
// overwrite the config file?
|
// overwrite the config file?
|
||||||
|
|
|
@ -783,6 +783,20 @@ PtoV(uint16 x,
|
||||||
y += s_srendline;
|
y += s_srendline;
|
||||||
return (x | (y << 16));
|
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 disableMovieMessages = false;
|
||||||
bool FCEUI_AviDisableMovieMessages()
|
bool FCEUI_AviDisableMovieMessages()
|
||||||
{
|
{
|
||||||
|
@ -791,7 +805,6 @@ bool FCEUI_AviDisableMovieMessages()
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FCEUI_SetAviDisableMovieMessages(bool disable)
|
void FCEUI_SetAviDisableMovieMessages(bool disable)
|
||||||
{
|
{
|
||||||
disableMovieMessages = disable;
|
disableMovieMessages = disable;
|
||||||
|
|
|
@ -4,6 +4,8 @@ uint32 PtoV(uint16 x, uint16 y);
|
||||||
bool FCEUD_ShouldDrawInputAids();
|
bool FCEUD_ShouldDrawInputAids();
|
||||||
bool FCEUI_AviDisableMovieMessages();
|
bool FCEUI_AviDisableMovieMessages();
|
||||||
static SDL_Surface *s_screen;
|
static SDL_Surface *s_screen;
|
||||||
|
bool FCEUI_AviEnableHUDrecording();
|
||||||
|
void FCEUI_SetAviEnableHUDrecording(bool enable);
|
||||||
bool FCEUI_AviDisableMovieMessages();
|
bool FCEUI_AviDisableMovieMessages();
|
||||||
void FCEUI_SetAviDisableMovieMessages(bool disable);
|
void FCEUI_SetAviDisableMovieMessages(bool disable);
|
||||||
|
|
||||||
|
|
|
@ -605,6 +605,14 @@ int main(int argc, char *argv[])
|
||||||
return 0;
|
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
|
// check to see if movie messages are disabled
|
||||||
int mm;
|
int mm;
|
||||||
g_config->getOption("SDL.MovieMsg", &mm);
|
g_config->getOption("SDL.MovieMsg", &mm);
|
||||||
|
|
|
@ -215,10 +215,9 @@ void FCEU_PutImage(void)
|
||||||
ReallySnap();
|
ReallySnap();
|
||||||
dosnapsave=0;
|
dosnapsave=0;
|
||||||
}
|
}
|
||||||
#ifdef WIN32
|
|
||||||
if (!FCEUI_AviEnableHUDrecording())
|
if (!FCEUI_AviEnableHUDrecording()) snapAVI();
|
||||||
#endif
|
|
||||||
snapAVI();
|
|
||||||
if(GameInfo->type==GIT_VSUNI)
|
if(GameInfo->type==GIT_VSUNI)
|
||||||
FCEU_VSUniDraw(XBuf);
|
FCEU_VSUniDraw(XBuf);
|
||||||
|
|
||||||
|
@ -411,7 +410,7 @@ void FCEU_PutImage(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef WIN32
|
|
||||||
if (FCEUI_AviEnableHUDrecording())
|
if (FCEUI_AviEnableHUDrecording())
|
||||||
{
|
{
|
||||||
if (FCEUI_AviDisableMovieMessages())
|
if (FCEUI_AviDisableMovieMessages())
|
||||||
|
@ -424,7 +423,7 @@ void FCEU_PutImage(void)
|
||||||
snapAVI();
|
snapAVI();
|
||||||
}
|
}
|
||||||
} else DrawMessage(false);
|
} else DrawMessage(false);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
void snapAVI()
|
void snapAVI()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue