Merge remote-tracking branch 'remotes/upstream/master' into luafixes2
This commit is contained in:
commit
640306c797
|
@ -123,8 +123,8 @@ ConsoleVideoConfDialog_t::ConsoleVideoConfDialog_t(QWidget *parent)
|
||||||
|
|
||||||
vbox1->addLayout( hbox1 );
|
vbox1->addLayout( hbox1 );
|
||||||
|
|
||||||
// Enable OpenGL Linear Filter Checkbox
|
// Enable Linear Filter Checkbox
|
||||||
gl_LF_chkBox = new QCheckBox( tr("Enable OpenGL Linear Filter") );
|
gl_LF_chkBox = new QCheckBox( tr("Enable Linear Filter") );
|
||||||
|
|
||||||
setCheckBoxFromProperty( gl_LF_chkBox , "SDL.OpenGLip");
|
setCheckBoxFromProperty( gl_LF_chkBox , "SDL.OpenGLip");
|
||||||
|
|
||||||
|
|
|
@ -365,7 +365,12 @@ static int highPrecSleep( FCEU::timeStampRecord &ts )
|
||||||
int
|
int
|
||||||
SpeedThrottle(void)
|
SpeedThrottle(void)
|
||||||
{
|
{
|
||||||
if ( (g_fpsScale >= 32) || (NoWaiting & 0x01) || turbo )
|
bool isEmuPaused = FCEUI_EmulationPaused() ? true : false;
|
||||||
|
bool noWaitActive = (NoWaiting & 0x01) ? true : false;
|
||||||
|
bool turboActive = (turbo || noWaitActive);
|
||||||
|
|
||||||
|
// If Emulator is paused, don't waste CPU cycles spinning on nothing.
|
||||||
|
if ( !isEmuPaused && ((g_fpsScale >= 32) || turboActive) )
|
||||||
{
|
{
|
||||||
return 0; /* Done waiting */
|
return 0; /* Done waiting */
|
||||||
}
|
}
|
||||||
|
@ -397,6 +402,16 @@ SpeedThrottle(void)
|
||||||
time_left = Nexttime - cur_time;
|
time_left = Nexttime - cur_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If Emulator is paused, ensure that sleep time cannot be zero
|
||||||
|
// we don't want to waste a full CPU core on nothing.
|
||||||
|
if (isEmuPaused)
|
||||||
|
{
|
||||||
|
if (time_left.toMilliSeconds() < 1)
|
||||||
|
{
|
||||||
|
time_left.fromMilliSeconds(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (time_left.toMilliSeconds() > 50)
|
if (time_left.toMilliSeconds() > 50)
|
||||||
{
|
{
|
||||||
time_left.fromMilliSeconds(50);
|
time_left.fromMilliSeconds(50);
|
||||||
|
@ -407,7 +422,7 @@ SpeedThrottle(void)
|
||||||
{
|
{
|
||||||
InFrame = 0;
|
InFrame = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//fprintf(stderr, "attempting to sleep %Ld ms, frame complete=%s\n",
|
//fprintf(stderr, "attempting to sleep %Ld ms, frame complete=%s\n",
|
||||||
// time_left, InFrame?"no":"yes");
|
// time_left, InFrame?"no":"yes");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue