mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 15:55:31 +01:00
Fix the framerate counter of the software graphic backend.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7363 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
9198e83ae1
commit
aabb542d47
@ -85,7 +85,7 @@ namespace EfbCopy
|
|||||||
if (bpmem.triggerEFBCopy.copy_to_xfb)
|
if (bpmem.triggerEFBCopy.copy_to_xfb)
|
||||||
{
|
{
|
||||||
CopyToXfb();
|
CopyToXfb();
|
||||||
Core::Callback_VideoCopiedToXFB(false);
|
Core::Callback_VideoCopiedToXFB(true);
|
||||||
|
|
||||||
swstats.frameCount++;
|
swstats.frameCount++;
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,8 @@
|
|||||||
namespace SW
|
namespace SW
|
||||||
{
|
{
|
||||||
|
|
||||||
static bool fifoStateRun = false;
|
static volatile bool fifoStateRun = false;
|
||||||
|
static volatile bool emuRunningState = false;
|
||||||
|
|
||||||
|
|
||||||
std::string VideoSoftware::GetName()
|
std::string VideoSoftware::GetName()
|
||||||
@ -94,11 +95,12 @@ void VideoSoftware::DoState(PointerWrap&)
|
|||||||
|
|
||||||
void VideoSoftware::RunLoop(bool enable)
|
void VideoSoftware::RunLoop(bool enable)
|
||||||
{
|
{
|
||||||
//EmulatorState(true);
|
emuRunningState = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoSoftware::EmuStateChange(EMUSTATE_CHANGE newState)
|
void VideoSoftware::EmuStateChange(EMUSTATE_CHANGE newState)
|
||||||
{
|
{
|
||||||
|
emuRunningState = (newState == EMUSTATE_CHANGE_PLAY) ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoSoftware::Shutdown()
|
void VideoSoftware::Shutdown()
|
||||||
@ -167,13 +169,26 @@ void VideoSoftware::Video_EnterLoop()
|
|||||||
{
|
{
|
||||||
fifoStateRun = true;
|
fifoStateRun = true;
|
||||||
|
|
||||||
while (fifoStateRun)
|
while (fifoStateRun)
|
||||||
{
|
{
|
||||||
g_video_backend->PeekMessages();
|
g_video_backend->PeekMessages();
|
||||||
if (!SWCommandProcessor::RunBuffer()) {
|
|
||||||
Common::YieldCPU();
|
if (!SWCommandProcessor::RunBuffer())
|
||||||
|
{
|
||||||
|
Common::YieldCPU();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
if (!emuRunningState)
|
||||||
|
{
|
||||||
|
while (!emuRunningState)
|
||||||
|
{
|
||||||
|
g_video_backend->PeekMessages();
|
||||||
|
Common::SleepCurrentThread(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoSoftware::Video_ExitLoop()
|
void VideoSoftware::Video_ExitLoop()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user