Ejemplo n.º 1
0
int CT_Opt_Video_Key (int key, CTab_t *tab, CTabPage_t *page) {
#ifndef GLQUAKE

	// Software Rendering version menu
#ifdef _WIN32
	(*vid_menukeyfn) (key);
#endif
	// i was too lazy&scared to change vid_menukeyfn functions out there
	// so because i know what keys have some function in there, i list them here:
	return key == K_LEFTARROW || key == K_RIGHTARROW || key == K_DOWNARROW || key == K_UPARROW || key == K_ENTER || key == 'd';

#else

	// (Open)GL version menu

	if (mvs_askmode) {
		if (key == 'y' || key == K_ENTER)
			KeepNewVideoSettings();
		else if (key == 'n' || key == K_ESCAPE)
			CancelNewVideoSettings();

		return true;
	} else
		return Settings_Key(&settvideo, key);

#endif
}
Ejemplo n.º 2
0
int CT_Opt_System_Key (int key, wchar unichar, CTab_t *tab, CTabPage_t *page)
{
#ifndef GLQUAKE	// SOFT
#ifdef _WIN32
	if(mss_software_change_resolution_mode)
	{

		if(key == K_ESCAPE || key == K_MOUSE2)
		{
			mss_software_change_resolution_mode = false;
		}

		(*vid_menukeyfn) (key);
		// i was too lazy&scared to change vid_menukeyfn functions out there
		// so because i know what keys have some function in there, i list them here:
		return key == K_ESCAPE || key == K_MOUSE2 || key == K_LEFTARROW || key == K_RIGHTARROW || key == K_DOWNARROW || key == K_UPARROW || key == K_ENTER || key == 'd';
	}
	else
	{
		return Settings_Key(&settsystem, key, unichar);
	}
#else
	return Settings_Key(&settsystem, key, unichar);
#endif
#else	// GL
	if (mss_askmode)
	{

		if (key == 'y' || key == K_ENTER)
		{
			KeepNewVideoSettings();
		}
		else if(key == 'n' || key == K_ESCAPE)
		{
			CancelNewVideoSettings();
		}
		return true;
	}
	else
	{
		return Settings_Key(&settsystem, key, unichar);
	}
#endif
}
Ejemplo n.º 3
0
int CT_Opt_System_Key (int key, wchar unichar, CTab_t *tab, CTabPage_t *page)
{
	if (mss_askmode)
	{

		if (key == 'y' || key == K_ENTER)
		{
			KeepNewVideoSettings();
		}
		else if(key == 'n' || key == K_ESCAPE)
		{
			CancelNewVideoSettings();
		}
		return true;
	}
	else
	{
		return Settings_Key(&settsystem, key, unichar);
	}
}