diff options
author | Nebuleon <nebuleon@alakazam> | 2013-10-20 03:57:54 +0000 |
---|---|---|
committer | Nebuleon <nebuleon@alakazam> | 2013-10-20 03:57:54 +0000 |
commit | c8a6cefc73f2e65e2a100785749b9578355e3c8c (patch) | |
tree | aa87814e6c5af52a792d4f8d1e31d91521074dc2 /source/opendingux/port.c | |
parent | 7b55a50eea79105f508ada053d0470f8c97b6f60 (diff) | |
download | ReGBA-c8a6cefc73f2e65e2a100785749b9578355e3c8c.zip ReGBA-c8a6cefc73f2e65e2a100785749b9578355e3c8c.tar.gz ReGBA-c8a6cefc73f2e65e2a100785749b9578355e3c8c.tar.bz2 |
OpenDingux: Improve fast-forwarding. Better detection of the need to increase frame skipping when there is insufficient buffered audio, and to raise the frame rate again once a fair amount of time has passed without audio underruns. This may help the Dingoo A320.
Diffstat (limited to 'source/opendingux/port.c')
-rw-r--r-- | source/opendingux/port.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/source/opendingux/port.c b/source/opendingux/port.c index 6fd4229..70e9844 100644 --- a/source/opendingux/port.c +++ b/source/opendingux/port.c @@ -133,10 +133,20 @@ void ReGBA_LoadRTCTime(struct ReGBA_RTC* RTCData) bool ReGBA_IsRenderingNextFrame() { - if (UserFrameskip == 0) /* automatic */ - return FastForwardControl < 60 && AudioFrameskipControl == 0; - - return FastForwardControl < 60 && UserFrameskipControl == 0; /* manual, draw this frame */ + if (FastForwardFrameskip != 0) /* fast-forwarding */ + { + if (UserFrameskip != 0) /* fast-forwarding on user frameskip */ + return FastForwardFrameskipControl == 0 && UserFrameskipControl == 0; + else /* fast-forwarding on automatic frameskip */ + return FastForwardFrameskipControl == 0 && AudioFrameskipControl == 0; + } + else + { + if (UserFrameskip != 0) /* user frameskip */ + return UserFrameskipControl == 0; + else /* automatic frameskip */ + return AudioFrameskipControl == 0; + } } const char* GetFileName(const char* Path) |