Beispiel #1
0
void desmume_resume()
{
	SPU_Pause(0);
	execute = TRUE;
	if(!regMainLoop)
		g_idle_add_full(EMULOOP_PRIO, &EmuLoop, NULL, NULL);
	regMainLoop = TRUE;
}
Beispiel #2
0
void NDS_UnPause(bool showMsg = true) {
    if (/*romloaded &&*/ paused) {
        paused = FALSE;
        pausedByMinimize = FALSE;
        execute = TRUE;
        SPU_Pause(0);
        if (showMsg) INFO("Emulation unpaused\n");

    }
}
Beispiel #3
0
bool NDS_Pause(bool showMsg = true) {
    if(paused) return false;

    emu_halt();
    paused = TRUE;
    SPU_Pause(1);
    while (!paused) {}
    if (showMsg) INFO("Emulation paused\n");

    return true;
}
Beispiel #4
0
static void nds4droid_throttle(bool allowSleep = true, int forceFrameSkip = -1)
{
	int skipRate = (forceFrameSkip < 0) ? frameskiprate : forceFrameSkip;
	int ffSkipRate = (forceFrameSkip < 0) ? 9 : forceFrameSkip;
    
	if(lastskiprate != skipRate)
	{
		lastskiprate = skipRate;
		mainLoopData.framestoskip = 0; // otherwise switches to lower frameskip rates will lag behind
	}
    
	if(!mainLoopData.skipnextframe || forceFrameSkip == 0 || frameAdvance || (continuousframeAdvancing && !FastForward))
	{
		mainLoopData.framesskipped = 0;
        
		if (mainLoopData.framestoskip > 0)
			mainLoopData.skipnextframe = 1;
	}
	else
	{
		mainLoopData.framestoskip--;
        
		if (mainLoopData.framestoskip < 1)
			mainLoopData.skipnextframe = 0;
		else
			mainLoopData.skipnextframe = 1;
        
		mainLoopData.framesskipped++;
        
		NDS_SkipNextFrame();
	}
    
	if(FastForward)
	{
		if(mainLoopData.framesskipped < ffSkipRate)
		{
			mainLoopData.skipnextframe = 1;
			mainLoopData.framestoskip = 1;
		}
		if (mainLoopData.framestoskip < 1)
			mainLoopData.framestoskip += ffSkipRate;
	}
	else if((/*autoframeskipenab && frameskiprate ||*/ FrameLimit) && allowSleep)
	{
		SpeedThrottle();
	}
    
	if (autoframeskipenab && frameskiprate)
	{
		if(!frameAdvance && !continuousframeAdvancing)
		{
			AutoFrameSkip_NextFrame();
			if (mainLoopData.framestoskip < 1)
				mainLoopData.framestoskip += AutoFrameSkip_GetSkipAmount(0,skipRate);
		}
	}
	else
	{
		if (mainLoopData.framestoskip < 1)
			mainLoopData.framestoskip += skipRate;
	}
    
	if (frameAdvance && allowSleep)
	{
		frameAdvance = false;
		emu_halt();
		SPU_Pause(1);
	}
	if(execute && emu_paused && !frameAdvance)
	{
		// safety net against running out of control in case this ever happens.
		NDS_UnPause(); NDS_Pause();
	}
    
	//ServiceDisplayThreadInvocations();
}
Beispiel #5
0
void desmume_pause()
{
	execute = FALSE;
	SPU_Pause(1);
}
Beispiel #6
0
void desmume_resume( void)
{
	execute = TRUE;
	SPU_Pause(0);
}
Beispiel #7
0
void desmume_pause()
{
	execute = false;
	SPU_Pause(1);
}