当前位置: 首页>>代码示例>>C++>>正文


C++ IN_DeactivateMouse函数代码示例

本文整理汇总了C++中IN_DeactivateMouse函数的典型用法代码示例。如果您正苦于以下问题:C++ IN_DeactivateMouse函数的具体用法?C++ IN_DeactivateMouse怎么用?C++ IN_DeactivateMouse使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了IN_DeactivateMouse函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: IN_Frame

/*
==================
IN_Frame

Called every frame, even if not generating commands
==================
*/
void IN_Frame (void)
{
	if (!mouseinitialized)
		return;

	if (!in_mouse || !in_appactive)
	{
		IN_DeactivateMouse ();
		return;
	}

	if ( !cl.refresh_prepped
		|| cls.key_dest == key_console
		|| cls.key_dest == key_menu)
	{
		// temporarily deactivate if in fullscreen
		if (Cvar_VariableValue ("vid_fullscreen") == 0)
		{
			IN_DeactivateMouse ();
			return;
		}
	}

	IN_ActivateMouse ();
}
开发者ID:Izhido,项目名称:qrevpak,代码行数:32,代码来源:in_win.c

示例2: IN_Frame

void IN_Frame() {
    bool loading;

    if (in_xbox360ControllerAvailable->integer) {
        IN_Xbox360ControllerMove();
    } else {
        IN_JoyMove();
    }

    // If not DISCONNECTED (main menu) or ACTIVE (in game), we're loading
    loading = (cls.state != CA_DISCONNECTED && cls.state != CA_ACTIVE);

    if (cls.keyCatchers & KEYCATCH_CONSOLE) {
        // Console is down in windowed mode
        IN_DeactivateMouse(false);
    } else if (loading) {
        // Loading in windowed mode
        IN_DeactivateMouse(true);
    } else if (!(SDL_GetWindowFlags(window) & SDL_WINDOW_INPUT_FOCUS)) {
        // Window doesn't have focus
        IN_DeactivateMouse(false);
    } else if (com_minimized->integer) {
        // Minimized
        IN_DeactivateMouse(true);
    } else {
        IN_ActivateMouse();
    }

    IN_ProcessEvents(dropInput);
}
开发者ID:Kangz,项目名称:Unvanquished,代码行数:30,代码来源:sdl_input.cpp

示例3: IN_Frame

/*
===============
IN_Frame
===============
*/
void IN_Frame( void )
{
	qboolean loading;

	IN_JoyMove( );
	IN_ProcessEvents( );

	// If not DISCONNECTED (main menu) or ACTIVE (in game), we're loading
	loading = ( clc.state != CA_DISCONNECTED && clc.state != CA_ACTIVE );

	if( !Cvar_VariableIntegerValue("r_fullscreen") && ( Key_GetCatcher( ) & KEYCATCH_CONSOLE ) )
	{
		// Console is down in windowed mode
		IN_DeactivateMouse( );
	}
	else if( !Cvar_VariableIntegerValue("r_fullscreen") && loading )
	{
		// Loading in windowed mode
		IN_DeactivateMouse( );
	}
	else if( !( SDL_GetAppState() & SDL_APPINPUTFOCUS ) )
	{
		// Window not got focus
		IN_DeactivateMouse( );
	}
	else
		IN_ActivateMouse( );

	/* in case we had to delay actual restart of video system... */
	if ( (vidRestartTime != 0) && (vidRestartTime < Sys_Milliseconds()) )
	{
		vidRestartTime = 0;
		Cbuf_AddText( "vid_restart\n" );
	}
}
开发者ID:0culus,项目名称:ioq3,代码行数:40,代码来源:sdl_input.c

示例4: IN_Frame

/*
==================
IN_Frame

Called every frame, even if not generating commands
==================
*/
void IN_Frame (void)
{
	if (!mouseinitialized)
		return;

	if (!in_mouse || !in_appactive)
	{
		IN_DeactivateMouse ();
		return;
	}

	if ( !cl.refresh_prepped
#ifdef __WXWINDOWS__
        || cls.window_hidden
#endif /// __WXWINDOWS__
#ifdef IML_Q2_EXTENSIONS
		// 1 February 2004 - IML - emk - Interactive mouse support.
		|| cls.interactivemouse
#endif IML_Q2_EXTENSIONS
		|| cls.key_dest == key_console
		|| cls.key_dest == key_menu)
	{
		// temporarily deactivate if in fullscreen
		if (Cvar_VariableValue ("vid_fullscreen") == 0)
		{
			IN_DeactivateMouse ();
			return;
		}
	}

	IN_ActivateMouse ();
}
开发者ID:lambda,项目名称:wxQuake2,代码行数:39,代码来源:in_win.c

示例5: IN_Frame

void IN_Frame (void) {
	qboolean loading;

	IN_JoyMove( );

	// If not DISCONNECTED (main menu) or ACTIVE (in game), we're loading
	loading = (qboolean)( cls.state != CA_DISCONNECTED && cls.state != CA_ACTIVE );

	if( !cls.glconfig.isFullscreen && ( Key_GetCatcher( ) & KEYCATCH_CONSOLE ) )
	{
		// Console is down in windowed mode
		IN_DeactivateMouse( );
	}
	else if( !cls.glconfig.isFullscreen && loading )
	{
		// Loading in windowed mode
		IN_DeactivateMouse( );
	}
	else if( !( SDL_GetWindowFlags( SDL_window ) & SDL_WINDOW_INPUT_FOCUS ) )
	{
		// Window not got focus
		IN_DeactivateMouse( );
	}
	else
		IN_ActivateMouse( );

	IN_ProcessEvents( );
}
开发者ID:metivett,项目名称:OpenJK,代码行数:28,代码来源:sdl_input.cpp

示例6: IN_Frame

/*
==================
IN_Frame

Called every frame, even if not generating commands
==================
*/
void IN_Frame (void)
{
	CheckActive(cl_hwnd);

	if (!mouseinitialized)
		return;

	if (!in_mouse || !in_appactive)
	{
		IN_DeactivateMouse();
		return;
	}

	g_windowed = Cvar_VariableValue("vid_fullscreen") == 0.0f;

	if (!cl.refresh_prepped
		|| cls.key_dest == key_console
		)//|| cls.key_dest == key_menu) // jitmenu
	{
		// temporarily deactivate if in fullscreen
		if (g_windowed && !M_MenuActive()) // jitmenu / jitmouse
		{
			IN_DeactivateMouse();
			return;
		}
	}

	IN_ActivateMouse(!(M_MenuActive() && g_windowed)); // jitmenu - don't clip the cursor when we're on the menu in windowed mode.
}
开发者ID:jitspoe,项目名称:starviewer,代码行数:36,代码来源:in_win.c

示例7: IN_Frame

/*
===============
IN_Frame
===============
*/
void IN_Frame(void)
{
	qboolean        loading;

	IN_JoyMove();
	IN_ProcessEvents();

	// If not DISCONNECTED (main menu) or ACTIVE (in game), we're loading
	loading = (cls.state != CA_DISCONNECTED && cls.state != CA_ACTIVE);

	if(!cls.glconfig.isFullscreen && (Key_GetCatcher() & KEYCATCH_CONSOLE))
	{
		// Console is down in windowed mode
		IN_DeactivateMouse();
	}
	else if(!cls.glconfig.isFullscreen && loading)
	{
		// Loading in windowed mode
		IN_DeactivateMouse();
	}
	else if(!( SDL_GetWindowFlags(SDL_window) & SDL_WINDOW_INPUT_FOCUS))
	{
		// Window not got focus
		IN_DeactivateMouse();
	}
	else
		IN_ActivateMouse();

	// In case we had to delay actual restart of video system
	if( ( vidRestartTime != 0 ) && ( vidRestartTime < Sys_Milliseconds( ) ) )
	{
		vidRestartTime = 0;
		Cbuf_AddText( "vid_restart\n" );
	}
}
开发者ID:otty,项目名称:cake3,代码行数:40,代码来源:sdl_input.c

示例8: IN_Frame

/*
==================
IN_Frame

Called every frame, even if not generating commands
==================
*/
void IN_Frame(void)
{
	// post joystick events
	IN_JoyMove();

	if(!s_wmv.mouseInitialized)
	{
		return;
	}

	if(cls.keyCatchers & KEYCATCH_CONSOLE)
	{
		// temporarily deactivate if not in the game and
		// running on the desktop
		// voodoo always counts as full screen
		if(Cvar_VariableValue("r_fullscreen") == 0 && strcmp(Cvar_VariableString("r_glDriver"), _3DFX_DRIVER_NAME))
		{
			IN_DeactivateMouse();
			return;
		}
	}

	if(!in_appactive)
	{
		IN_DeactivateMouse();
		return;
	}

	IN_ActivateMouse();

	// post events to the system que
	IN_MouseMove();

}
开发者ID:ethr,项目名称:ETXrealPro,代码行数:41,代码来源:win_input.c

示例9: IN_Frame

/*
===============
IN_Frame
===============
*/
void IN_Frame( void )
{
	qboolean loading;

	IN_JoyMove( );
	IN_ProcessEvents( );

	// If not DISCONNECTED (main menu) or ACTIVE (in game), we're loading
	loading = !!( cls.state != CA_DISCONNECTED && cls.state != CA_ACTIVE );

	if( !r_fullscreen->integer && ( Key_GetCatcher( ) & KEYCATCH_CONSOLE ) )
	{
		// Console is down in windowed mode
		IN_DeactivateMouse( );
	}
	else if( !r_fullscreen->integer && loading )
	{
		// Loading in windowed mode
		IN_DeactivateMouse( );
	}
	else if( !( SDL_GetAppState() & SDL_APPINPUTFOCUS ) )
	{
		// Window not got focus
		IN_DeactivateMouse( );
	}
	else
		IN_ActivateMouse( );
}
开发者ID:AbandonedCart,项目名称:XperiaPlayNative,代码行数:33,代码来源:sdl_input.c

示例10: IN_Frame

void
IN_Frame(void)
{
	qbool loading;

	IN_JoyMove( );
	IN_ProcessEvents( );

	/* If not DISCONNECTED (main menu) or ACTIVE (in game), we're loading */
	loading = !!(clc.state != CA_DISCONNECTED && clc.state != CA_ACTIVE);

	if(!cvargeti("r_fullscreen") && (Key_GetCatcher( ) & KEYCATCH_CONSOLE)){
		/* Console is down in windowed mode */
		IN_DeactivateMouse( );
	}else if(!cvargeti("r_fullscreen") && loading){
		/* Loading in windowed mode */
		IN_DeactivateMouse( );
	}else if(!(SDL_GetAppState() & SDL_APPINPUTFOCUS)){
		/* Window not got focus */
		IN_DeactivateMouse( );
	}else
		IN_ActivateMouse( );

	/* in case we had to delay actual restart of video system... */
	if((vidRestartTime != 0) && (vidRestartTime < sysmillisecs())){
		vidRestartTime = 0;
		cbufaddstr("vid_restart");
	}
}
开发者ID:icanhas,项目名称:yantar,代码行数:29,代码来源:input.c

示例11: IN_Shutdown

/*
===========
IN_Shutdown
===========
*/
void IN_Shutdown(void)
{
	IN_DeactivateMouse();

	IN_ShutdownMIDI();
	Cmd_RemoveCommand("midiinfo");

	if(directInput)
	{

		// release our mouse
		if(g_pMouse)
		{
			IDirectInputDevice_SetCooperativeLevel(g_pMouse, g_wv.hWnd, DISCL_NONEXCLUSIVE | DISCL_BACKGROUND);
			IDirectInputDevice_Release(g_pMouse);
		}

		if(g_pdi)
		{
			IDirectInput_Release(g_pdi);
		}

		g_pMouse = NULL;
		g_pdi = NULL;

		// reset our values
		directInput_acquired = qfalse;
		directInput = qfalse;
	}
}
开发者ID:ethr,项目名称:ETXrealPro,代码行数:35,代码来源:win_input.c

示例12: GLimp_Shutdown

/*
** GLimp_Shutdown
**
** This routine does all OS specific shutdown procedures for the OpenGL
** subsystem.  Under OpenGL this means NULLing out the current DC and
** HGLRC, deleting the rendering context, and releasing the DC acquired
** for the window.  The state structure is also nulled out.
**
*/
void GLimp_Shutdown( void )
{
	if (!ctx || !dpy)
		return;
	IN_DeactivateMouse();
	XAutoRepeatOn(dpy);
	if (dpy) {
		if (ctx)
			qglXDestroyContext(dpy, ctx);
		if (win)
			XDestroyWindow(dpy, win);
		if (vidmode_active)
			XF86VidModeSwitchToMode(dpy, scrnum, vidmodes[0]);
		XCloseDisplay(dpy);
	}
	vidmode_active = qfalse;
	dpy = NULL;
	win = 0;
	ctx = NULL;

	memset( &glConfig, 0, sizeof( glConfig ) );
	memset( &glState, 0, sizeof( glState ) );

	QGL_Shutdown();
}
开发者ID:3ddy,项目名称:Jedi-Academy,代码行数:34,代码来源:linux_glimp.c

示例13: GLimp_Shutdown

/*
** GLimp_Shutdown
**
** This routine does all OS specific shutdown procedures for the OpenGL
** subsystem.  Under OpenGL this means NULLing out the current DC and
** HGLRC, deleting the rendering context, and releasing the DC acquired
** for the window.  The state structure is also nulled out.
**
*/
void GLimp_Shutdown( void )
{
	if (!ctx || !dpy)
		return;
	IN_DeactivateMouse();
	// bk001206 - replaced with H2/Fakk2 solution
	// XAutoRepeatOn(dpy);
	// autorepeaton = qfalse; // bk001130 - from cvs1.17 (mkv)
	if (dpy) {
		if (ctx)
			qglXDestroyContext(dpy, ctx);
		if (win)
			XDestroyWindow(dpy, win);
		if (vidmode_active)
			XF86VidModeSwitchToMode(dpy, scrnum, vidmodes[0]);
		XCloseDisplay(dpy);
	}
	vidmode_active = qfalse;
	dpy = NULL;
	win = 0;
	ctx = NULL;

	memset( &glConfig, 0, sizeof( glConfig ) );
	memset( &glState, 0, sizeof( glState ) );

	QGL_Shutdown();
}
开发者ID:5Quintessential,项目名称:jedioutcast,代码行数:36,代码来源:linux_glimp.c

示例14: IN_Frame

void IN_Frame (void) {

  // bk001130 - from cvs 1.17 (mkv)
  IN_JoyMove(); // FIXME: disable if on desktop?
  
  if ( cls.keyCatchers & KEYCATCH_CONSOLE ) {
    // temporarily deactivate if not in the game and
    // running on the desktop
    // voodoo always counts as full screen
    if (Cvar_VariableValue ("r_fullscreen") == 0
	&& strcmp( Cvar_VariableString("r_glDriver"), _3DFX_DRIVER_NAME ) )	{
      IN_DeactivateMouse ();
      return;
    }
    // bk001206 - not used, now done the H2/Fakk2 way
    //if (dpy && !autorepeaton) {
    //  XAutoRepeatOn(dpy);
    //  autorepeaton = qtrue;
    //}
  } 
  //else if (dpy && autorepeaton) {
  //XAutoRepeatOff(dpy);
  //autorepeaton = qfalse;
  //}
 
  IN_ActivateMouse();
}
开发者ID:5Quintessential,项目名称:jedioutcast,代码行数:27,代码来源:linux_glimp.c

示例15: SetBufferSize

static void SetBufferSize(void) 
{
	static DIPROPDWORD dipdw = {
		{ sizeof(dipdw), sizeof(dipdw.diph), 0, DIPH_DEVICE },
		0
	};
	HRESULT hr;
	unsigned int bufsize;

	if (in_di_bufsize.integer)
	{  // we don't wont dynamic buffer change
		Com_Printf_State(PRINT_OK, "DirectInput overflow, increasing skipped because of %s.\n", in_di_bufsize.name);
		return;
	}

	bufsize = max(dipdw.dwData, DI_BufSize()); // well, DI_BufSize() return 16, since in_di_bufsize is zero
	dipdw.dwData = bufsize + max(1, bufsize / 2);

	Com_Printf_State(PRINT_INFO, "DirectInput overflow, increasing buffer size to %u.\n", dipdw.dwData);

	IN_DeactivateMouse();

	hr = IDirectInputDevice_SetProperty(g_pMouse, DIPROP_BUFFERSIZE, &dipdw.diph);

	IN_ActivateMouse();

	if(FAILED(hr)) 
	{
		Com_Printf_State (PRINT_FAIL, "Unable to increase DirectInput buffer size.\n");
	}
}
开发者ID:jite,项目名称:jquake,代码行数:31,代码来源:in_win.c


注:本文中的IN_DeactivateMouse函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。