Skip to content

Commit

Permalink
clean up movie some code; no longer write savestate with play-from-po…
Browse files Browse the repository at this point in the history
…weron movies; change main logging format to text (the header still needs to be changed)
  • Loading branch information
zeromus committed May 22, 2008
1 parent 9477c03 commit 047808b
Show file tree
Hide file tree
Showing 8 changed files with 1,004 additions and 919 deletions.
8 changes: 5 additions & 3 deletions src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,17 @@ FCEU MM - CaH4e3\n\
FCEU TAS - blip & nitsuja\n\
FCEU TAS+ - Luke Gustafson\n\
FCEUX\n\
- CaH4e3, Luke Gustafson\n\
- Matthew Gambrell, Sebastian Porst\n\
- rheiny, zeromus\n\
- CaH4e3, Luke Gustafson, Sebastian Porst\n\
- adelikat, _mz\n\
\n\
"__TIME__" "__DATE__"\n";

if(aboutString) return aboutString;

const char *compilerString = FCEUD_GetCompilerString();

//allocate the string and concatenate the template with the compiler string
if(aboutString) free(aboutString);
aboutString = (char*)malloc(strlen(aboutTemplate) + strlen(compilerString) + 1);
sprintf(aboutString,"%s%s",aboutTemplate,compilerString);
return aboutString;
Expand Down
6 changes: 4 additions & 2 deletions src/driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,11 @@ void FCEUI_LoadState(char *fname);
void FCEUD_SaveStateAs(void);
void FCEUD_LoadStateFrom(void);

#define MOVIE_FLAG_FROM_RESET (1<<1)
//movie was recorded from poweron. the alternative is from a savestate
#define MOVIE_FLAG_FROM_POWERON (1<<3)

#define MOVIE_FLAG_PAL (1<<2)
#define MOVIE_FLAG_FROM_POWERON (1<<3) // value is temporary onle, gets converted to reset

#define MOVIE_MAX_METADATA 512

typedef struct
Expand Down
9 changes: 4 additions & 5 deletions src/drivers/win/replay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ void UpdateReplayDialog(HWND hwndDlg)
EnableWindow(GetDlgItem(hwndDlg,IDC_CHECK_READONLY),(info.read_only)? FALSE : TRUE); // disable read-only checkbox if the file access is read-only
SendDlgItemMessage(hwndDlg,IDC_CHECK_READONLY,BM_SETCHECK,info.read_only ? BST_CHECKED : (ReplayDialogReadOnlyStatus ? BST_CHECKED : BST_UNCHECKED), 0);

SetWindowText(GetDlgItem(hwndDlg,IDC_LABEL_RECORDEDFROM),(info.flags & MOVIE_FLAG_FROM_RESET) ? "Reset or Power-On" : "Savestate");
SetWindowText(GetDlgItem(hwndDlg,IDC_LABEL_RECORDEDFROM),(info.flags & MOVIE_FLAG_FROM_POWERON) ? "Power-On" : "Savestate");
if(info.movie_version > 1)
{
char emuStr[128];
Expand Down Expand Up @@ -863,10 +863,9 @@ void FCEUD_MovieRecordTo()
free(p.szSavestateFilename);
}

FCEUI_SaveMovie(
p.szFilename,
(p.recordFrom == 0) ? MOVIE_FLAG_FROM_POWERON : ((p.recordFrom == 1) ? MOVIE_FLAG_FROM_RESET : 0),
meta);
uint8 flags = 0;
if(p.recordFrom == 0) flags = MOVIE_FLAG_FROM_POWERON;
FCEUI_SaveMovie(p.szFilename, flags, meta);
}

if(p.szFilename)
Expand Down
2 changes: 1 addition & 1 deletion src/fceu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski

if(EmulationPaused&2)
EmulationPaused &= ~1; // clear paused flag temporarily (frame advance)
else if(EmulationPaused&1 || FCEU_BotMode())
else if((EmulationPaused&1) || FCEU_BotMode())
{
memcpy(XBuf, XBackBuf, 256*256);
FCEU_PutImage();
Expand Down
Loading

0 comments on commit 047808b

Please sign in to comment.