コード例 #1
0
ファイル: demo.cpp プロジェクト: thug1src/thug
void prepare_to_exit()
{
	printf ("******  Exiting THPS Demo *****\n");

	//Nx::CEngine::sSuspendEngine();		// turn off Nx engine interrupts
	NxPs2::SuspendEngine();				// 
	
	Sfx::CSfxManager* sfx_manager =  Sfx::CSfxManager::Instance();
	sfx_manager->PauseSounds( );
	if (!Config::CD())
	{
		printf ("Re-initializing the CD/DVD drive\n");
		// if we did not come from a CD, then we need to initilaize the CD here
		// so we can test exiting back to the bootstrap program
	    sceCdInit(SCECdINIT);
	    sceCdMmode(SCECdDVD);
	    sceCdDiskReady(0);
	}
	else
	{
		printf ("Stopping streaming etc, on CD/DVD drive\n");
		Pcm::StopStreams(  );
		Pcm::StopMusic(  );
		sceCdStStop();				// also stop streaming....	   Yes!!
		sceCdStop();				// stop Cd
		sceCdSync(0);				// wait for commands to execute
		sceCdDiskReady(0);		   	// wait for Cd to be ready again
	}	

	scePadEnd();				// Another Sony reccomendation (from James Wang, newgroup post, 6/11/2002)

}
コード例 #2
0
//-------------------------------------------------------------------------
void cdvdSt_stop(void *buf)
{
	*(int *)buf = sceCdStStop();
}