mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 15:49:50 -06:00
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:
@ -297,7 +297,7 @@ void Stop() // - Hammertime!
|
|||||||
SConfig::GetInstance().m_SYSCONF->Reload();
|
SConfig::GetInstance().m_SYSCONF->Reload();
|
||||||
|
|
||||||
INFO_LOG(CONSOLE, "Stop [Main Thread]\t\t---- Shutdown complete ----");
|
INFO_LOG(CONSOLE, "Stop [Main Thread]\t\t---- Shutdown complete ----");
|
||||||
|
Frame::g_InputCounter = 0;
|
||||||
g_bStopping = false;
|
g_bStopping = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -551,7 +551,7 @@ void VideoThrottle()
|
|||||||
#else // Summary information
|
#else // Summary information
|
||||||
std::string SFPS;
|
std::string SFPS;
|
||||||
if (Frame::g_recordfd)
|
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
|
else
|
||||||
SFPS = StringFromFormat("FPS: %u - VPS: %u - SPEED: %u%%", FPS, VPS, Speed);
|
SFPS = StringFromFormat("FPS: %u - VPS: %u - SPEED: %u%%", FPS, VPS, Speed);
|
||||||
#endif
|
#endif
|
||||||
|
@ -96,7 +96,7 @@ void RerecordingStart();
|
|||||||
void RerecordingStop();
|
void RerecordingStop();
|
||||||
void WindBack(int Counter);
|
void WindBack(int Counter);
|
||||||
|
|
||||||
extern int g_FrameCounter;
|
extern int g_FrameCounter,g_InputCounter;
|
||||||
extern bool g_FrameStep;
|
extern bool g_FrameStep;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
#include "../CoreTiming.h"
|
#include "../CoreTiming.h"
|
||||||
#include "SystemTimers.h"
|
#include "SystemTimers.h"
|
||||||
#include "ProcessorInterface.h"
|
#include "ProcessorInterface.h"
|
||||||
|
#include "../Core.h"
|
||||||
|
|
||||||
// --- standard gamecube controller ---
|
// --- standard gamecube controller ---
|
||||||
CSIDevice_GCController::CSIDevice_GCController(int _iDeviceNumber)
|
CSIDevice_GCController::CSIDevice_GCController(int _iDeviceNumber)
|
||||||
@ -140,11 +140,19 @@ bool CSIDevice_GCController::GetData(u32& _Hi, u32& _Low)
|
|||||||
Frame::SetPolledDevice();
|
Frame::SetPolledDevice();
|
||||||
|
|
||||||
if(Frame::IsPlayingInput())
|
if(Frame::IsPlayingInput())
|
||||||
|
{
|
||||||
Frame::PlayController(&PadStatus, ISIDevice::m_iDeviceNumber);
|
Frame::PlayController(&PadStatus, ISIDevice::m_iDeviceNumber);
|
||||||
|
if(!Core::g_CoreStartupParameter.bWii)
|
||||||
|
Frame::InputUpdate();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(Frame::IsRecordingInput())
|
if(Frame::IsRecordingInput())
|
||||||
|
{
|
||||||
Frame::RecordInput(&PadStatus, ISIDevice::m_iDeviceNumber);
|
Frame::RecordInput(&PadStatus, ISIDevice::m_iDeviceNumber);
|
||||||
|
if(!Core::g_CoreStartupParameter.bWii)
|
||||||
|
Frame::InputUpdate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Thankfully changing mode does not change the high bits ;)
|
// Thankfully changing mode does not change the high bits ;)
|
||||||
|
@ -52,7 +52,7 @@ int g_numPads = 0;
|
|||||||
ControllerState g_padState;
|
ControllerState g_padState;
|
||||||
File::IOFile g_recordfd;
|
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_bRecordingFromSaveState = false;
|
||||||
bool g_bPolled = false;
|
bool g_bPolled = false;
|
||||||
|
|
||||||
@ -93,6 +93,11 @@ void FrameUpdate()
|
|||||||
g_bPolled = false;
|
g_bPolled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void InputUpdate()
|
||||||
|
{
|
||||||
|
g_InputCounter++;
|
||||||
|
}
|
||||||
|
|
||||||
void SetFrameSkipping(unsigned int framesToSkip)
|
void SetFrameSkipping(unsigned int framesToSkip)
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lk(cs_frameSkip);
|
std::lock_guard<std::mutex> lk(cs_frameSkip);
|
||||||
@ -337,7 +342,7 @@ void RecordWiimote(int wiimote, u8 *data, s8 size)
|
|||||||
{
|
{
|
||||||
if(!IsRecordingInput() || !IsUsingWiimote(wiimote))
|
if(!IsRecordingInput() || !IsUsingWiimote(wiimote))
|
||||||
return;
|
return;
|
||||||
|
g_InputCounter++;
|
||||||
g_recordfd.WriteArray(&size, 1);
|
g_recordfd.WriteArray(&size, 1);
|
||||||
g_recordfd.WriteArray(data, 1);
|
g_recordfd.WriteArray(data, 1);
|
||||||
}
|
}
|
||||||
@ -539,7 +544,7 @@ bool PlayWiimote(int wiimote, u8 *data, s8 &size)
|
|||||||
s8 count = 0;
|
s8 count = 0;
|
||||||
if(!IsPlayingInput() || !IsUsingWiimote(wiimote))
|
if(!IsPlayingInput() || !IsUsingWiimote(wiimote))
|
||||||
return false;
|
return false;
|
||||||
|
g_InputCounter++;
|
||||||
g_recordfd.ReadArray(&count, 1);
|
g_recordfd.ReadArray(&count, 1);
|
||||||
size = (count > size) ? size : count;
|
size = (count > size) ? size : count;
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ extern char g_playingFile[256];
|
|||||||
extern File::IOFile g_recordfd;
|
extern File::IOFile g_recordfd;
|
||||||
extern std::string g_recordFile;
|
extern std::string g_recordFile;
|
||||||
|
|
||||||
extern u64 g_frameCounter, g_lagCounter;
|
extern u32 g_frameCounter, g_lagCounter, g_InputCounter;
|
||||||
|
|
||||||
extern int g_numRerecords;
|
extern int g_numRerecords;
|
||||||
|
|
||||||
@ -94,6 +94,7 @@ struct DTMHeader {
|
|||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
void FrameUpdate();
|
void FrameUpdate();
|
||||||
|
void InputUpdate();
|
||||||
|
|
||||||
void SetPolledDevice();
|
void SetPolledDevice();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user