port dsv movie fix from trunk, and also touch 100 files for no good reason

This commit is contained in:
zeromus 2010-07-29 18:53:43 +00:00
parent e46d3e9da5
commit 1e7ca654d5
5 changed files with 23 additions and 11 deletions

View File

@ -976,8 +976,15 @@ void MMU_Reset()
//HACK!!!
//until we improve all our session tracking stuff, we need to save the backup memory filename
std::string bleh = MMU_new.backupDevice.filename;
new(&MMU_new) MMU_struct_new;
MMU_new.backupDevice.load_rom(bleh.c_str());
BackupDevice tempBackupDevice;
bool bleh2 = MMU_new.backupDevice.isMovieMode;
if(bleh2) tempBackupDevice = MMU_new.backupDevice;
reconstruct(&MMU_new);
if(bleh2) {
MMU_new.backupDevice = tempBackupDevice;
MMU_new.backupDevice.reset_hardware();
}
else MMU_new.backupDevice.load_rom(bleh.c_str());
MMU_timing.arm7codeFetch.Reset();
MMU_timing.arm7dataFetch.Reset();

View File

@ -327,17 +327,21 @@ void BackupDevice::movie_mode()
reset();
}
void BackupDevice::reset()
void BackupDevice::reset_hardware()
{
write_enable = FALSE;
com = 0;
addr = addr_counter = 0;
state = DETECTING;
flushPending = false;
lazyFlushPending = false;
data.resize(0);
write_enable = FALSE;
data_autodetect.resize(0);
}
state = DETECTING;
void BackupDevice::reset()
{
reset_hardware();
data.resize(0);
data_autodetect.resize(0);
addr_size = 0;
loadfile();

View File

@ -82,6 +82,7 @@ public:
void reset();
void close_rom();
void reset_hardware();
bool save_state(EMUFILE* os);
bool load_state(EMUFILE* is);
@ -120,13 +121,13 @@ public:
public: //SHOULD BE PRIVATE!!!!!!!!
std::string filename;
bool isMovieMode;
private:
bool write_enable; //is write enabled?
u32 com; //persistent command actually handled
u32 addr_size, addr_counter;
u32 addr;
bool isMovieMode;
std::vector<u8> data;
std::vector<u8> data_autodetect;

View File

@ -437,7 +437,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP3"
AdditionalOptions="/MP"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"

View File

@ -3636,7 +3636,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
DesEnableMenuItem(mainMenu, IDM_FILE_RECORDAVI, romloaded);
DesEnableMenuItem(mainMenu, IDM_FILE_RECORDWAV, romloaded);
DesEnableMenuItem(mainMenu, IDM_EJECTCARD, romloaded && movieMode == MOVIEMODE_INACTIVE);
DesEnableMenuItem(mainMenu, IDM_RESET, romloaded && movieMode != MOVIEMODE_PLAY);
DesEnableMenuItem(mainMenu, IDM_RESET, romloaded && !(movieMode == MOVIEMODE_PLAY && movie_readonly));
DesEnableMenuItem(mainMenu, IDM_CLOSEROM, romloaded);
DesEnableMenuItem(mainMenu, IDM_SHUT_UP, romloaded);
DesEnableMenuItem(mainMenu, IDM_CHEATS_LIST, romloaded);
@ -5907,7 +5907,7 @@ static LRESULT CALLBACK SoundSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam
void ResetGame()
{
if(movieMode != MOVIEMODE_PLAY)
if(!(movieMode == MOVIEMODE_PLAY && movie_readonly))
{
NDS_Reset();
if(movieMode == MOVIEMODE_INACTIVE)