Fixed some issues with movie recording in sdl; however it's still sketchy
This commit is contained in:
parent
9c784d3496
commit
a482fdce5d
|
@ -217,9 +217,10 @@ KeyboardCommands()
|
|||
|
||||
g_config->getOption("SDL.Hotkeys.SaveState", &key);
|
||||
if(_keyonly(key)) {
|
||||
if(is_shift) {
|
||||
FCEUI_printf("Recording movie to %s\n", curMovieFilename);
|
||||
FCEUI_SaveMovie(curMovieFilename, MOVIE_FLAG_NONE);
|
||||
if(is_shift) {
|
||||
const char* fname = FCEU_MakeFName(FCEUMKF_MOVIE, 0, 0).c_str();
|
||||
FCEUI_printf("Recording movie to %s\n", fname);
|
||||
FCEUI_SaveMovie(fname, MOVIE_FLAG_NONE);
|
||||
} else {
|
||||
FCEUI_SaveState(NULL);
|
||||
}
|
||||
|
@ -228,9 +229,11 @@ KeyboardCommands()
|
|||
g_config->getOption("SDL.Hotkeys.LoadState", &key);
|
||||
// f7 to load state, Shift-f7 to load movie
|
||||
if(_keyonly(key)) {
|
||||
if(is_shift) {
|
||||
FCEUI_printf("Playing back movie located at %s\n", curMovieFilename);
|
||||
FCEUI_LoadMovie(curMovieFilename , false, false, false);
|
||||
if(is_shift) {
|
||||
const char* fname = FCEU_MakeFName(FCEUMKF_MOVIE, 0, 0).c_str();
|
||||
std::cout << fname;
|
||||
FCEUI_printf("Playing back movie located at %s\n", fname);
|
||||
FCEUI_LoadMovie(fname , false, false, false);
|
||||
} else {
|
||||
FCEUI_LoadState(NULL);
|
||||
}
|
||||
|
@ -335,7 +338,7 @@ do { \
|
|||
FCEUI_DispMessage("Barcode: %s", bbuf); \
|
||||
} else { \
|
||||
FCEUI_SelectState(x,1); \
|
||||
} \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
DIPSless:
|
||||
|
|
|
@ -675,7 +675,7 @@ void MovieData::dumpSavestateTo(std::vector<char>* buf, int compressionLevel)
|
|||
}
|
||||
|
||||
//begin playing an existing movie
|
||||
void FCEUI_LoadMovie(char *fname, bool _read_only, bool tasedit, int _pauseframe)
|
||||
void FCEUI_LoadMovie(const char *fname, bool _read_only, bool tasedit, int _pauseframe)
|
||||
{
|
||||
if(!tasedit && !FCEU_IsValidUI(FCEUI_PLAYMOVIE))
|
||||
return;
|
||||
|
@ -752,7 +752,7 @@ static void openRecordingMovie(const char* fname)
|
|||
|
||||
//begin recording a new movie
|
||||
//TODO - BUG - the record-from-another-savestate doesnt work.
|
||||
void FCEUI_SaveMovie(char *fname, EMOVIE_FLAG flags)
|
||||
void FCEUI_SaveMovie(const char *fname, EMOVIE_FLAG flags)
|
||||
{
|
||||
if(!FCEU_IsValidUI(FCEUI_RECORDMOVIE))
|
||||
return;
|
||||
|
|
|
@ -228,8 +228,8 @@ extern int currFrameCounter;
|
|||
extern char curMovieFilename[512];
|
||||
//---------
|
||||
|
||||
void FCEUI_SaveMovie(char *fname, EMOVIE_FLAG flags);
|
||||
void FCEUI_LoadMovie(char *fname, bool read_only, bool tasedit, int _stopframe);
|
||||
void FCEUI_SaveMovie(const char *fname, EMOVIE_FLAG flags);
|
||||
void FCEUI_LoadMovie(const char *fname, bool read_only, bool tasedit, int _stopframe);
|
||||
void FCEUI_MoviePlayFromBeginning(void);
|
||||
void FCEUI_StopMovie(void);
|
||||
bool FCEUI_MovieGetInfo(const std::string& fname, MOVIE_INFO* /* [in, out] */ info, bool skipFrameCount = false);
|
||||
|
|
Loading…
Reference in New Issue