From 037bda0cbe507a9480f57be2db47b4b767e28e83 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Sun, 14 Apr 2013 12:45:58 +0200 Subject: [PATCH] Faster turbo mode for android. Causes flashing in unbuffered but that's a minor issue. --- Core/HLE/sceDisplay.cpp | 23 +++++++++++++++-------- UI/MenuScreens.cpp | 5 ----- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/Core/HLE/sceDisplay.cpp b/Core/HLE/sceDisplay.cpp index a3e1a5514..04810df81 100644 --- a/Core/HLE/sceDisplay.cpp +++ b/Core/HLE/sceDisplay.cpp @@ -282,6 +282,21 @@ void DoFrameTiming(bool &throttle, bool &skipFrame) { // we have nothing to do here. bool doFrameSkip = g_Config.iFrameSkip == 1; + // On non windows, which is always vsync locked, we need to force frameskip when + // unthrottled. +#ifndef _WIN32 + if (!throttle) { + doFrameSkip = true; + skipFrame = true; + if (numSkippedFrames >= 6) { + INFO_LOG(HLE, "UNSKIP!"); + skipFrame = false; + } + INFO_LOG(HLE, "UNTHROTTLE!"); + return; + } +#endif + if (!throttle && !doFrameSkip) return; @@ -297,14 +312,6 @@ void DoFrameTiming(bool &throttle, bool &skipFrame) { // INFO_LOG(HLE,"FRAMESKIP %i", numSkippedFrames); } - // On non windows, which is always vsync locked, we need to force frameskip when - // unthrottled. -#ifndef _WIN32 - if (!throttle) { - doFrameSkip = true; - skipFrame = true; - } -#endif if (curFrameTime < nextFrameTime && throttle) { diff --git a/UI/MenuScreens.cpp b/UI/MenuScreens.cpp index 0910c905a..365a456b8 100644 --- a/UI/MenuScreens.cpp +++ b/UI/MenuScreens.cpp @@ -569,7 +569,6 @@ void FileListAdapter::drawItem(int item, int x, int y, int w, int h, bool select ui_draw2d.DrawImage2GridH(selected ? I_BUTTON_SELECTED: I_BUTTON, x, y, x + w); ui_draw2d.DrawTextShadow(UBUNTU24, (*items_)[item].name.c_str(), x + UI_SPACE + iconSpace, y + 25, 0xFFFFFFFF, ALIGN_LEFT | ALIGN_VCENTER); -#if 1 // This might create a texture so we must flush first. UIFlush(); GameInfo *ginfo = 0; @@ -592,10 +591,6 @@ void FileListAdapter::drawItem(int item, int x, int y, int w, int h, bool select if (icon != -1) ui_draw2d.DrawImage(icon, x + UI_SPACE, y + 25, 1.0f, 0xFFFFFFFF, ALIGN_VCENTER | ALIGN_LEFT); } -#else - if (icon != -1) - ui_draw2d.DrawImage(icon, x + UI_SPACE, y + 25, 1.0f, 0xFFFFFFFF, ALIGN_VCENTER | ALIGN_LEFT); -#endif } FileSelectScreen::FileSelectScreen(const FileSelectScreenOptions &options) : options_(options) {