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;
}