Changed the frame display to the number of polls. Changed frame counter to VI counter. Changed g_FrameCounter to u32. Patch by bzb95.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7367 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
skidau 2011-03-17 10:41:56 +00:00
parent 78d9f927e1
commit 88c8b891f7
5 changed files with 22 additions and 8 deletions

View file

@ -297,7 +297,7 @@ void Stop() // - Hammertime!
SConfig::GetInstance().m_SYSCONF->Reload();
INFO_LOG(CONSOLE, "Stop [Main Thread]\t\t---- Shutdown complete ----");
Frame::g_InputCounter = 0;
g_bStopping = false;
}
@ -551,7 +551,7 @@ void VideoThrottle()
#else // Summary information
std::string SFPS;
if (Frame::g_recordfd)
SFPS = StringFromFormat("Frame: %d | FPS: %u - VPS: %u - SPEED: %u%%", Frame::g_frameCounter, FPS, VPS, Speed);
SFPS = StringFromFormat("VI: %u - Frame: %u - FPS: %u - VPS: %u - SPEED: %u%%", Frame::g_frameCounter, Frame::g_InputCounter, FPS, VPS, Speed);
else
SFPS = StringFromFormat("FPS: %u - VPS: %u - SPEED: %u%%", FPS, VPS, Speed);
#endif

View file

@ -96,7 +96,7 @@ void RerecordingStart();
void RerecordingStop();
void WindBack(int Counter);
extern int g_FrameCounter;
extern int g_FrameCounter,g_InputCounter;
extern bool g_FrameStep;
#endif

View file

@ -32,7 +32,7 @@
#include "../CoreTiming.h"
#include "SystemTimers.h"
#include "ProcessorInterface.h"
#include "../Core.h"
// --- standard gamecube controller ---
CSIDevice_GCController::CSIDevice_GCController(int _iDeviceNumber)
@ -140,11 +140,19 @@ bool CSIDevice_GCController::GetData(u32& _Hi, u32& _Low)
Frame::SetPolledDevice();
if(Frame::IsPlayingInput())
{
Frame::PlayController(&PadStatus, ISIDevice::m_iDeviceNumber);
if(!Core::g_CoreStartupParameter.bWii)
Frame::InputUpdate();
}
else
{
if(Frame::IsRecordingInput())
{
Frame::RecordInput(&PadStatus, ISIDevice::m_iDeviceNumber);
if(!Core::g_CoreStartupParameter.bWii)
Frame::InputUpdate();
}
}
// Thankfully changing mode does not change the high bits ;)

View file

@ -52,7 +52,7 @@ int g_numPads = 0;
ControllerState g_padState;
File::IOFile g_recordfd;
u64 g_frameCounter = 0, g_lagCounter = 0, g_totalFrameCount = 0;
u32 g_frameCounter = 0, g_lagCounter = 0, g_totalFrameCount = 0, g_InputCounter = 0;
bool g_bRecordingFromSaveState = false;
bool g_bPolled = false;
@ -93,6 +93,11 @@ void FrameUpdate()
g_bPolled = false;
}
void InputUpdate()
{
g_InputCounter++;
}
void SetFrameSkipping(unsigned int framesToSkip)
{
std::lock_guard<std::mutex> lk(cs_frameSkip);
@ -337,7 +342,7 @@ void RecordWiimote(int wiimote, u8 *data, s8 size)
{
if(!IsRecordingInput() || !IsUsingWiimote(wiimote))
return;
g_InputCounter++;
g_recordfd.WriteArray(&size, 1);
g_recordfd.WriteArray(data, 1);
}
@ -539,7 +544,7 @@ bool PlayWiimote(int wiimote, u8 *data, s8 &size)
s8 count = 0;
if(!IsPlayingInput() || !IsUsingWiimote(wiimote))
return false;
g_InputCounter++;
g_recordfd.ReadArray(&count, 1);
size = (count > size) ? size : count;

View file

@ -63,7 +63,7 @@ extern char g_playingFile[256];
extern File::IOFile g_recordfd;
extern std::string g_recordFile;
extern u64 g_frameCounter, g_lagCounter;
extern u32 g_frameCounter, g_lagCounter, g_InputCounter;
extern int g_numRerecords;
@ -94,6 +94,7 @@ struct DTMHeader {
#pragma pack(pop)
void FrameUpdate();
void InputUpdate();
void SetPolledDevice();