mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Frameskipping! Complete with GUI! Even my most naive approach resulted in great speeds, even with graphic-intensive games such as Pikmin.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3949 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -24,6 +24,7 @@
|
||||
|
||||
#include "Fifo.h"
|
||||
|
||||
volatile bool g_bSkipCurrentFrame = false;
|
||||
|
||||
extern u8* g_pVideoData;
|
||||
|
||||
@ -77,6 +78,10 @@ u8* FAKE_GetFifoEndPtr()
|
||||
return &videoBuffer[size];
|
||||
}
|
||||
|
||||
void Fifo_SetRendering(bool bEnabled) {
|
||||
g_bSkipCurrentFrame = !bEnabled;
|
||||
}
|
||||
|
||||
// Executed from another thread, no the graphics thread!
|
||||
// Basically, all it does is set a flag so that the loop will eventually exit, then
|
||||
// waits for the event to be set, which happens when the loop does exit.
|
||||
|
@ -25,6 +25,8 @@
|
||||
|
||||
#define FIFO_SIZE (1024*1024)
|
||||
|
||||
extern volatile bool g_bSkipCurrentFrame;
|
||||
|
||||
void Fifo_Init();
|
||||
void Fifo_Shutdown();
|
||||
|
||||
@ -37,6 +39,8 @@ void Fifo_ExitLoopNonBlocking();
|
||||
|
||||
void Fifo_DoState(PointerWrap &f);
|
||||
|
||||
void Fifo_SetRendering(bool bEnabled);
|
||||
|
||||
// Implemented by the Video Plugin
|
||||
void VideoFifo_CheckSwapRequest();
|
||||
void VideoFifo_CheckSwapRequestAt(u32 xfbAddr, u32 fbWidth, u32 fbHeight);
|
||||
|
@ -197,6 +197,7 @@ bool FifoCommandRunnable()
|
||||
static void Decode()
|
||||
{
|
||||
int Cmd = DataReadU8();
|
||||
|
||||
switch(Cmd)
|
||||
{
|
||||
case GX_NOP:
|
||||
@ -268,6 +269,7 @@ static void Decode()
|
||||
{
|
||||
// load vertices (use computed vertex size from FifoCommandRunnable above)
|
||||
u16 numVertices = DataReadU16();
|
||||
|
||||
VertexLoaderManager::RunVertices(
|
||||
Cmd & GX_VAT_MASK, // Vertex loader index (0 - 7)
|
||||
(Cmd & GX_PRIMITIVE_MASK) >> GX_PRIMITIVE_SHIFT,
|
||||
|
@ -115,6 +115,7 @@ void RunVertices(int vtx_attr_group, int primitive, int count)
|
||||
{
|
||||
if (!count)
|
||||
return;
|
||||
|
||||
RefreshLoader(vtx_attr_group);
|
||||
g_VertexLoaders[vtx_attr_group]->RunVertices(vtx_attr_group, primitive, count);
|
||||
}
|
||||
|
Reference in New Issue
Block a user