Win32 - a avicapture commandline argument, it receives a frame number, on that frame, avicapturing will stop and fceux will close.
This commit is contained in:
parent
742322bfc1
commit
ca7f13d75e
|
@ -1,3 +1,4 @@
|
||||||
|
13-june-2010 - adelikat - Win32 - avi capture commandline argument and related parameters
|
||||||
12-june-2010 - adelikat - Save Turbo frame skip amount to config so that it can be customized by user
|
12-june-2010 - adelikat - Save Turbo frame skip amount to config so that it can be customized by user
|
||||||
12-june-2010 - adelikat - Lua - fix speed.mode() so that normal turns off turbo
|
12-june-2010 - adelikat - Lua - fix speed.mode() so that normal turns off turbo
|
||||||
12-june-2010 - CaH4e3 - Fix Young Indiana Jones Chronicals
|
12-june-2010 - CaH4e3 - Fix Young Indiana Jones Chronicals
|
||||||
|
|
|
@ -29,6 +29,7 @@ char* ConfigToLoad = 0; //Loads a specific .cfg file (loads before any other co
|
||||||
char* LuaToLoad = 0; //Loads a specific lua file
|
char* LuaToLoad = 0; //Loads a specific lua file
|
||||||
char* PaletteToLoad = 0; //Loads a specific palette file
|
char* PaletteToLoad = 0; //Loads a specific palette file
|
||||||
char* AviToLoad = 0; //Starts an avi capture at startup
|
char* AviToLoad = 0; //Starts an avi capture at startup
|
||||||
|
|
||||||
extern bool turbo;
|
extern bool turbo;
|
||||||
|
|
||||||
// TODO: Parsing arguments needs to be improved a lot. A LOT.
|
// TODO: Parsing arguments needs to be improved a lot. A LOT.
|
||||||
|
@ -61,6 +62,7 @@ char *ParseArgies(int argc, char *argv[])
|
||||||
{"-pause",0,&PauseAfterLoad,0},
|
{"-pause",0,&PauseAfterLoad,0},
|
||||||
{"-cfg",0,&ConfigToLoad,0x4001},
|
{"-cfg",0,&ConfigToLoad,0x4001},
|
||||||
{"-avi",0,&AviToLoad,0x4001},
|
{"-avi",0,&AviToLoad,0x4001},
|
||||||
|
{"-avicapture",0,&AVICapture,0},
|
||||||
{0, 0, 0, 0},
|
{0, 0, 0, 0},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,4 +7,5 @@ extern char* AviToLoad; //Contains the filename of the Avi to be captured speci
|
||||||
extern bool replayReadOnlySetting;
|
extern bool replayReadOnlySetting;
|
||||||
extern int replayStopFrameSetting;
|
extern int replayStopFrameSetting;
|
||||||
extern int PauseAfterLoad;
|
extern int PauseAfterLoad;
|
||||||
|
extern int AVICapture; //This initiates AVI capture mode with a frame number, on that frame number the AVI will stop, FCEUX will close, and a special return value will be set
|
||||||
char *ParseArgies(int argc, char *argv[]);
|
char *ParseArgies(int argc, char *argv[]);
|
||||||
|
|
|
@ -16,6 +16,7 @@ extern PALETTEENTRY *color_palette;
|
||||||
|
|
||||||
//adelikat: TODO - perhaps put this in AVIFile
|
//adelikat: TODO - perhaps put this in AVIFile
|
||||||
bool disableMovieMessages = false;
|
bool disableMovieMessages = false;
|
||||||
|
int AVICapture; //This initiates AVI capture mode with a frame number, on that frame number the AVI will stop, FCEUX will close, and a special return value will be set. The intent is for this to be used in commandline
|
||||||
|
|
||||||
static struct AVIFile
|
static struct AVIFile
|
||||||
{
|
{
|
||||||
|
|
|
@ -135,6 +135,8 @@ int soundNoisevol = 256; //Sound channel Noise - volume control
|
||||||
int soundPCMvol = 256; //Sound channel PCM - volume control
|
int soundPCMvol = 256; //Sound channel PCM - volume control
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
int KillFCEUXonFrame = 0; //TODO: clean up, this is used in fceux, move it over there?
|
||||||
|
|
||||||
double saspectw = 1, saspecth = 1;
|
double saspectw = 1, saspecth = 1;
|
||||||
double winsizemulx = 1, winsizemuly = 1;
|
double winsizemulx = 1, winsizemuly = 1;
|
||||||
int genie = 0;
|
int genie = 0;
|
||||||
|
@ -800,6 +802,15 @@ int main(int argc,char *argv[])
|
||||||
LuaToLoad = NULL;
|
LuaToLoad = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Initiates AVI capture mode, will set up proper settings, and close FCUEX once capturing is finished
|
||||||
|
if(AVICapture && AviToLoad) //Must be used in conjunction with AviToLoad
|
||||||
|
{
|
||||||
|
//We want to disable flags that will pause the emulator
|
||||||
|
PauseAfterLoad = 0;
|
||||||
|
pauseAfterPlayback = 0;
|
||||||
|
KillFCEUXonFrame = AVICapture;
|
||||||
|
}
|
||||||
|
|
||||||
if(AviToLoad)
|
if(AviToLoad)
|
||||||
{
|
{
|
||||||
FCEUI_AviBegin(AviToLoad);
|
FCEUI_AviBegin(AviToLoad);
|
||||||
|
|
|
@ -692,6 +692,9 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski
|
||||||
RamChange();
|
RamChange();
|
||||||
UpdateLogWindow();
|
UpdateLogWindow();
|
||||||
//FCEUI_AviVideoUpdate(XBuf);
|
//FCEUI_AviVideoUpdate(XBuf);
|
||||||
|
extern int KillFCEUXonFrame;
|
||||||
|
if (FCEUMOV_GetFrame() >= KillFCEUXonFrame)
|
||||||
|
DoFCEUExit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
timestampbase += timestamp;
|
timestampbase += timestamp;
|
||||||
|
|
Loading…
Reference in New Issue