ref: 4c28d8a8a37edea1893896f3d601771c1615c1c5
parent: 7cc9883010e9610e3e73160365ba0b4df1d6ea46
author: Simon Howard <[email protected]>
date: Sat May 6 15:22:31 EDT 2006
Respect the use_mouse value in configuration files. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 477
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: i_video.c 476 2006-05-06 19:14:08Z fraggle $
+// $Id: i_video.c 477 2006-05-06 19:22:31Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -175,7 +175,7 @@
//-----------------------------------------------------------------------------
static const char
-rcsid[] = "$Id: i_video.c 476 2006-05-06 19:14:08Z fraggle $";
+rcsid[] = "$Id: i_video.c 477 2006-05-06 19:22:31Z fraggle $";
#include <SDL.h>
#include <ctype.h>
@@ -225,6 +225,7 @@
// disable mouse?
static boolean nomouse = false;
+extern int usemouse;
// if true, screens[0] is screen->pixel
@@ -521,7 +522,7 @@
break;
*/
case SDL_MOUSEBUTTONDOWN:
- if (!nomouse)
+ if (usemouse && !nomouse)
{
event.type = ev_mouse;
event.data1 = MouseButtonState();
@@ -530,7 +531,7 @@
}
break;
case SDL_MOUSEBUTTONUP:
- if (!nomouse)
+ if (usemouse && !nomouse)
{
event.type = ev_mouse;
event.data1 = MouseButtonState();
@@ -584,7 +585,7 @@
{
I_GetEvent();
- if (!nomouse)
+ if (usemouse && !nomouse)
{
I_ReadMouse();
}