Exemplo n.º 1
0
int MediaInit()
{
		dprintf(_T("s1\n"));
	if (ScrnInit()) {					// Init the Scrn Window
		FBAPopupAddText(PUF_TEXT_DEFAULT, MAKEINTRESOURCE(IDS_ERR_UI_WINDOW));
		FBAPopupDisplay(PUF_TYPE_ERROR);
		return 1;
	}
		dprintf(_T("s2\n"));
	if (!bInputOkay) {
		InputInit();					// Init Input
	}
		dprintf(_T("s3\n"));
	nAppVirtualFps = nBurnFPS;
		dprintf(_T("s4\n"));
	if (!bAudOkay) {
		AudSoundInit();					// Init Sound (not critical if it fails)
	}
		dprintf(_T("s5\n"));
	nBurnSoundRate = 0;					// Assume no sound
	pBurnSoundOut = NULL;
	if (bAudOkay) {
		nBurnSoundRate = nAudSampleRate[nAudSelect];
		nBurnSoundLen = nAudSegLen;
	}
		dprintf(_T("s6\n"));
	if (!bVidOkay) {
			dprintf(_T("s7\n"));
		// Reinit the video plugin
		VidInit();
		if (!bVidOkay && nVidFullscreen) {

			dprintf(_T("s8\n"));
			nVidFullscreen = 0;
			dprintf(_T("s9\n"));
			MediaExit();
			return (MediaInit());
		}
		if (!nVidFullscreen) {
			ScrnSize();
		}
		dprintf(_T("s10\n"));
		if (!bVidOkay) {
			// Make sure the error will be visible
			SplashDestroy(1);
			dprintf(_T("s11\n"));
			FBAPopupAddText(PUF_TEXT_DEFAULT, MAKEINTRESOURCE(IDS_ERR_UI_MODULE), VidGetModuleName());
			FBAPopupDisplay(PUF_TYPE_ERROR);
		}
		dprintf(_T("s12\n"));
		if (bVidOkay && ((bRunPause && bAltPause) || !bDrvOkay)) {
			VidRedraw();
		}
	}
	dprintf(_T("s13\n"));
	return 0;
}
Exemplo n.º 2
0
int MediaInit()
{
/*
	if (ScrnInit()) {					// Init the Scrn Window
		FBAPopupAddText(PUF_TEXT_DEFAULT, MAKEINTRESOURCE(IDS_ERR_UI_WINDOW));
		FBAPopupDisplay(PUF_TYPE_ERROR);
		return 1;
	}
*/
	// Screen Size will go here via
	/*
		if (bDrvOkay) {
		if ((BurnDrvGetFlags() & BDF_ORIENTATION_VERTICAL) && (nVidRotationAdjust & 1)) {
			BurnDrvGetVisibleSize(&nBmapHeight, &nBmapWidth);
			BurnDrvGetAspect(&nGameAspectY, &nGameAspectX);
		} else {
			BurnDrvGetVisibleSize(&nBmapWidth, &nBmapHeight);
			BurnDrvGetAspect(&nGameAspectX, &nGameAspectY);
		}

		if (nBmapWidth <= 0 || nBmapHeight <= 0) {
			return 1;
		}
	}
	*/

	if (!bInputOkay) {	
		InputInit();					// Init Input
	}

//	nAppVirtualFps = nBurnFPS;

	if (!bAudOkay) {
		AudSoundInit();					// Init Sound (not critical if it fails)
	}

	nBurnSoundRate = 0;					// Assume no sound
	pBurnSoundOut = NULL;
	if (bAudOkay) {
		nBurnSoundRate = nAudSampleRate[nAudSelect];
		nBurnSoundLen = nAudSegLen;
	}

	if (!bVidOkay) {

		// Reinit the video plugin
		VidInit();
		if (!bVidOkay && nVidFullscreen) {

			nVidFullscreen = 0;

			MediaExit();
			return (MediaInit());
		}
		if (!nVidFullscreen) {
//			ScrnSize(); // dont' change any screens on the wii
		}

		if (!bVidOkay && (bDrvOkay || bVidUsePlaceholder)) {
			// Make sure the error will be visible
//			SplashDestroy(1);

	//		FBAPopupAddText(PUF_TEXT_DEFAULT, MAKEINTRESOURCE(IDS_ERR_UI_MODULE), VidGetModuleName());
	//		FBAPopupDisplay(PUF_TYPE_ERROR);
		}

		if (bVidOkay && ((bRunPause && bAltPause) || !bDrvOkay)) {
			VidRedraw();
		}
	}

	return 0;
}