Пример #1
0
int FBALocaliseLoad()
{
	localiseMakeOfn();
	ofn.lpstrTitle = FBALoadStringEx(IDS_LOCAL_SELECT);

	int bOldPause = bRunPause;
	bRunPause = 1;
	int ret = GetOpenFileName(&ofn);
	bRunPause = bOldPause;

	if (ret == 0) {
		return 1;
	}

	return FBALocaliseInit(szChoice);
}
Пример #2
0
int FBALocaliseLoadTemplate()
{
	_stprintf(szChoice, _T("template"));
	MakeOfn();
	ofn.lpstrTitle = _T("Select localisation template");
	ofn.Flags |= OFN_OVERWRITEPROMPT;

	int bOldPause = bRunPause;
	bRunPause = 1;
	int nRet = GetOpenFileName(&ofn);
	bRunPause = bOldPause;

	if (nRet == 0) {
		return 1;
	}

	return FBALocaliseInit(szChoice);
}
Пример #3
0
static int AppInit()
{

#if defined (_MSC_VER) && defined (_DEBUG)
	_CrtSetDbgFlag(_CRTDBG_CHECK_ALWAYS_DF);			// Check for memory corruption
	_CrtSetDbgFlag(_CRTDBG_DELAY_FREE_MEM_DF);			//
	_CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);				//
#endif

	OpenDebugLog();

	// Create a handle to the main thread of execution
	DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &hMainThread, 0, false, DUPLICATE_SAME_ACCESS);

	// Load config for the application
	ConfigAppLoad();

	FBALocaliseInit(szLocalisationTemplate);

	kailleraInit();

#if 1 || !defined (FBA_DEBUG)
	// print a warning if we're running for the 1st time
	if (nIniVersion < nBurnVer) {
		ScrnInit();
		//SplashDestroy(1);
		FirstUsageCreate();

		ConfigAppSave();								// Create initial config file
	}
#endif

	// Set the thread priority for the main thread
	SetThreadPriority(GetCurrentThread(), nAppThreadPriority);

	bCheatsAllowed = true;

#ifdef USE_SDL
	SDL_Init(0);
#endif

	// Init the Burn library
	BurnLibInit();

	ComputeGammaLUT();

	if (VidSelect(nVidSelect)) {
		nVidSelect = 0;
		VidSelect(nVidSelect);
	}

	hAccel = LoadAccelerators(hAppInst, MAKEINTRESOURCE(IDR_ACCELERATOR));

	// Build the ROM information
	CreateROMInfo();
	
	// Write a clrmame dat file if we are verifying roms
#if defined (ROM_VERIFY)
	create_datfile(_T("fba.dat"), 0);
#endif

	bNumlockStatus = SetNumLock(false);

	return 0;
}