Example #1
0
int DrvExit()
{
	if (bDrvOkay) {
        ConfigGameSave(bSaveInputs);
        GameInpExit();
		BurnDrvExit();				// Exit the driver
	}

	BurnExtLoadRom = NULL;
	bDrvOkay = 0;					// Stop using the BurnDrv functions
	bRunPause = 0;					// Don't pause when exitted
	nBurnDrvActive = ~0U;			// no driver selected
	return 0;
}
Example #2
0
int DrvExit()
{
	if (bDrvOkay) {
		StopReplay();

		VidExit();

		InvalidateRect(hScrnWnd, NULL, 1);
		UpdateWindow(hScrnWnd);			// Blank screen window

		DestroyWindow(hInpdDlg);		// Make sure the Input Dialog is exited
		DestroyWindow(hInpDIPSWDlg);	// Make sure the DipSwitch Dialog is exited
		DestroyWindow(hInpCheatDlg);	// Make sure the Cheat Dialog is exited

		if (nBurnDrvActive < nBurnDrvCount) {
			MemCardEject();				// Eject memory card if present

			if (bSaveRAM) {
				StatedAuto(1);			// Save NV (or full) RAM
				bSaveRAM = false;
			}

			ConfigGameSave(bSaveInputs);

			GameInpExit();				// Exit game input
			
			BurnDrvExit();				// Exit the driver
		}
	}

	BurnExtLoadRom = NULL;

	bDrvOkay = 0;					// Stop using the BurnDrv functions

	bRunPause = 0;					// Don't pause when exitted

	if (bAudOkay) {
		// Write silence into the sound buffer on exit, and for drivers which don't use pBurnSoundOut
		memset(nAudNextSound, 0, nAudSegLen << 2);
	}
	
	CDEmuExit();

	BurnExtCartridgeSetupCallback = NULL;

	nBurnDrvActive = ~0U;			// no driver selected

	return 0;
}
Example #3
0
int BurnerDrvExit()
{
	if (bDrvOkay) {
		//StopReplay();

		VidExit();

 
		//dialogClear();
#ifndef NO_CHEATSEARCH
		cheatSearchDestroy();
#endif
		//jukeDestroy();

		if (nBurnDrvSelect < nBurnDrvCount) {
			//MemCardEject();				// Eject memory card if present

			if (bSaveRAM) {
				StatedAuto(1);			// Save NV (or full) RAM
				bSaveRAM = false;
			}

			ConfigGameSave(true);		// save game config

			GameInpExit();				// Exit game input
			BurnDrvExit();				// Exit the driver
		}
	}

	BurnExtLoadRom = NULL;

	bDrvOkay = 0;					// Stop using the BurnDrv functions

	bRunPause = 0;					// Don't pause when exitted

	if (bAudOkay) {
		// Write silence into the sound buffer on exit, and for drivers which don't use pBurnSoundOut
		AudWriteSilence(0);
	}

	nBurnDrvSelect = ~0U;			// no driver selected
	nBurnLayer = 0xFF;				// show all layers

	return 0;
}
Example #4
0
void gui_Run()
{
	struct timeval s, e;
	extern struct timeval start;

	gettimeofday(&s, NULL);

	VideoClear();
	SDL_EnableKeyRepeat(/*SDL_DEFAULT_REPEAT_DELAY*/ 150, /*SDL_DEFAULT_REPEAT_INTERVAL*/30);
	gui_MainMenu.itemCur = 0;
	gui_MenuRun(&gui_MainMenu);
	SDL_EnableKeyRepeat(0, 0);
	ConfigGameSave();
	VideoClear();

	gettimeofday(&e, NULL);
	start.tv_sec += e.tv_sec - s.tv_sec;
	start.tv_usec += e.tv_usec - s.tv_usec;
}
Example #5
0
int DrvExit()
{
	if (bDrvOkay) {
//		StopReplay();
//		VidExit();

		if (nBurnDrvSelect[0] < nBurnDrvCount) {
			//MemCardEject();				// Eject memory card if present

			if (bSaveRAM) {
				//StatedAuto(1);			// Save NV (or full) RAM
				bSaveRAM = false;
			}

			ConfigGameSave();

//			GameInpExit();				// Exit game input
			BurnDrvExit();				// Exit the driver
		}
	}

	BurnExtLoadRom = NULL;

	bDrvOkay = 0;					// Stop using the BurnDrv functions

	//bRunPause = 0;					// Don't pause when exitted

//	if (bAudOkay) {
//		// Write silence into the sound buffer on exit, and for drivers which don't use pBurnSoundOut
//		memset(nAudNextSound, 0, nAudSegLen << 2);
//	}
	SndExit();

	nBurnDrvSelect[0] = ~0U;			// no driver selected

	return 0;
}