Fix for tatsunoko vs capcom and those wii games getting corrupted memory error

+ a couple of (serious...) fixes for some of my mistakes, and some warning fixes

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3411 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
sl1nk3.s committed 2009-06-12 15:47:41 +00:00
1 parent a1fd2defc4
commit d99deae17d
8 files changed
+22 -23

No files matched your search

+6 -6
View File
@@ -672,16 +672,16 @@ void Callback_VideoCopiedToXFB()
frames++;
if (targetfps>0)
if (targetfps > 0)
{
new_frametime=Timer.GetTimeDifference()-old_frametime;
new_frametime = Timer.GetTimeDifference() - old_frametime;
old_frametime=Timer.GetTimeDifference();
old_frametime = Timer.GetTimeDifference();
wait_frametime=((1000/targetfps)-new_frametime);
if (targetfps<35)
wait_frametime = (1000/targetfps) - (u16)new_frametime;
if (targetfps < 35)
wait_frametime--;
if (wait_frametime>0)
if (wait_frametime > 0)
Common::SleepCurrentThread(wait_frametime*2);
}
@@ -94,8 +94,8 @@ CWII_IPC_HLE_Device_FileIO::Open(u32 _CommandAddress, u32 _Mode)
m_Filename = std::string(HLE_IPC_BuildFilename(GetDeviceName().c_str(), 64));
// Reading requires the file to exist
if(_Mode == 0x01 && !File::Exists(m_Filename.c_str())) {
// Reading requires the file to exist, but writing doesn't (what a smart thought)
if(_Mode != 0x02 && && !File::Exists(m_Filename.c_str())) {
ERROR_LOG(WII_IPC_FILEIO, " FileIO failed open for reading: %s - File doesn't exist", m_Filename.c_str());
ReturnValue = FS_FILE_NOT_EXIST;
} else {