fix compile errors in movie.cpp

This commit is contained in:
zeromus 2009-05-02 17:57:06 +00:00
parent 4798e034f8
commit 0cc0e4739b
4 changed files with 19 additions and 12 deletions

View File

@ -845,7 +845,10 @@ int NDS_LoadROM( const char *filename, int bmtype, u32 bmsize,
return ret;
}
void MovieSRAM(int bmtype, u32 bmsize) {
void MovieSRAM()
{
int bmtype = MMU.bupmem.type;
u32 bmsize = MMU.bupmem.size;
char buf[MAX_PATH];
@ -859,7 +862,6 @@ void MovieSRAM(int bmtype, u32 bmsize) {
mc_realloc(&MMU.bupmem, bmtype, bmsize);
mc_load_file(&MMU.bupmem, buf);
}
void NDS_FreeROM(void)

View File

@ -385,6 +385,7 @@ public:
virtual BOOL WIFI_Host_InitSystem() { return FALSE; }
virtual void WIFI_Host_ShutdownSystem() {}
virtual BOOL AVI_IsRecording() { return FALSE; }
virtual void USR_InfoMessage(const char *message) { printf(message); }
};
extern Driver* driver;
@ -392,7 +393,7 @@ extern std::string InputDisplayString;
extern int LagFrameFlag;
extern int lastLag, TotalLagFrames;
void MovieSRAM(int bmtype, u32 bmsize);
void MovieSRAM();
void ClearAutoHold(void);

View File

@ -22,7 +22,6 @@
#include <assert.h>
#include <limits.h>
#include <fstream>
#include "main.h"
#include "utils/guid.h"
#include "utils/xstring.h"
#include "movie.h"
@ -355,7 +354,7 @@ static void closeRecordingMovie()
/// Stop movie playback.
static void StopPlayback()
{
SetMessageToDisplay("Movie playback stopped.");
driver->USR_InfoMessage("Movie playback stopped.");
movieMode = MOVIEMODE_INACTIVE;
}
@ -363,7 +362,7 @@ static void StopPlayback()
/// Stop movie recording
static void StopRecording()
{
SetMessageToDisplay("Movie recording stopped.");
driver->USR_InfoMessage("Movie recording stopped.");
movieMode = MOVIEMODE_INACTIVE;
closeRecordingMovie();
@ -436,14 +435,14 @@ void FCEUI_LoadMovie(const char *fname, bool _read_only, bool tasedit, int _paus
movieMode = MOVIEMODE_PLAY;
currRerecordCount = currMovieData.rerecordCount;
InitMovieTime();
MovieSRAM(backupmemorytype, backupmemorysize);
MovieSRAM();
freshMovie = true;
ClearAutoHold();
if(movie_readonly)
SetMessageToDisplay("Replay started Read-Only.");
driver->USR_InfoMessage("Replay started Read-Only.");
else
SetMessageToDisplay("Replay started Read+Write.");
driver->USR_InfoMessage("Replay started Read+Write.");
}
static void openRecordingMovie(const char* fname)
@ -492,9 +491,9 @@ static void openRecordingMovie(const char* fname)
movie_readonly = false;
currRerecordCount = 0;
InitMovieTime();
MovieSRAM(backupmemorytype, backupmemorysize);
MovieSRAM();
SetMessageToDisplay("Movie recording started.");
driver->USR_InfoMessage("Movie recording started.");
}
void NDS_setTouchFromMovie(void) {

View File

@ -1527,6 +1527,11 @@ class WinDriver : public Driver
{
return ::AVI_IsRecording();
}
virtual void USR_InfoMessage(const char *message)
{
SetMessageToDisplay(message);
}
};
int WINAPI WinMain (HINSTANCE hThisInstance,