2012-10-14 09:00:49 +00:00
//Generic input code.
//mostly mouse support, but can also handle a few keyboard events.
2012-04-09 19:12:12 +00:00
2012-10-14 09:00:49 +00:00
# include "quakedef.h"
2012-04-09 19:12:12 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
extern qboolean mouse_active ;
static cvar_t m_filter = CVARF ( " m_filter " , " 0 " , CVAR_ARCHIVE ) ;
static cvar_t m_accel = CVARF ( " m_accel " , " 0 " , CVAR_ARCHIVE ) ;
2012-10-14 09:00:49 +00:00
static cvar_t m_forcewheel = CVARD ( " m_forcewheel " , " 1 " , " 0: ignore mousewheels in apis where it is abiguous. \n 1: Use mousewheel when it is treated as a third axis. Motion above a threshold is ignored, to avoid issues with an unknown threshold. \n 2: Like 1, but excess motion is retained. The threshold specifies exact z-axis distance per notice. " ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static cvar_t m_forcewheel_threshold = CVARD ( " m_forcewheel_threshold " , " 32 " , " Mousewheel graduations smaller than this will not trigger mousewheel deltas. " ) ;
static cvar_t m_strafeonright = CVARFD ( " m_strafeonright " , " 1 " , CVAR_ARCHIVE , " If 1, touching the right half of the touchscreen will strafe/move, while the left side will turn. " ) ;
2014-02-07 08:38:40 +00:00
static cvar_t m_fatpressthreshold = CVARFD ( " m_fatpressthreshold " , " 0.2 " , CVAR_ARCHIVE , " How fat your thumb has to be to register a fat press (touchscreens). " ) ;
static cvar_t m_touchmajoraxis = CVARFD ( " m_touchmajoraxis " , " 1 " , CVAR_ARCHIVE , " When using a touchscreen, use only the major axis for strafing. " ) ;
static cvar_t m_slidethreshold = CVARFD ( " m_slidethreshold " , " 10 " , CVAR_ARCHIVE , " How far your finger needs to move to be considered a slide event (touchscreens). " ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
extern cvar_t _windowed_mouse ;
2012-04-09 19:12:12 +00:00
# define EVENTQUEUELENGTH 128
struct eventlist_s
{
enum
{
IEV_KEYDOWN ,
IEV_KEYRELEASE ,
IEV_MOUSEABS ,
2014-03-30 08:55:06 +00:00
IEV_MOUSEDELTA ,
IEV_JOYAXIS
2012-04-09 19:12:12 +00:00
} type ;
int devid ;
union
{
struct
{
2012-10-14 09:00:49 +00:00
float x , y , z ;
float tsize ; //the size of the touch
2012-04-09 19:12:12 +00:00
} mouse ;
struct
{
int scancode , unicode ;
} keyboard ;
2014-03-30 08:55:06 +00:00
struct
{
int axis ;
float value ;
} joy ;
2012-04-09 19:12:12 +00:00
} ;
} eventlist [ EVENTQUEUELENGTH ] ;
volatile int events_avail ; /*volatile to make sure the cc doesn't try leaving these cached in a register*/
volatile int events_used ;
static struct eventlist_s * in_newevent ( void )
{
if ( events_avail > = events_used + EVENTQUEUELENGTH )
return NULL ;
return & eventlist [ events_avail & ( EVENTQUEUELENGTH - 1 ) ] ;
}
static void in_finishevent ( void )
{
events_avail + + ;
}
# define MAXPOINTERS 8
2012-10-14 09:00:49 +00:00
struct mouse_s
2012-04-09 19:12:12 +00:00
{
enum
{
2012-10-14 09:00:49 +00:00
M_INVALID ,
M_MOUSE , //using deltas
M_TOUCH //using absolutes
} type ;
2014-03-30 08:55:06 +00:00
int qdeviceid ; //so we can just use pointers.
2012-10-14 09:00:49 +00:00
vec2_t oldpos ;
vec2_t downpos ;
float moveddist ; //how far it has moved while held. this provides us with our emulated mouse1 when they release the press
vec2_t delta ; //how far its moved recently
vec2_t old_delta ; //how far its moved previously, for mouse smoothing
float wheeldelta ;
int down ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
} ptr [ MAXPOINTERS ] ;
2014-09-02 06:01:03 +00:00
int touchcursor ; //the cursor follows whichever finger was most recently pressed in preference to any mouse also on the same system
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
2014-03-30 08:55:06 +00:00
# define MAXJOYAXIS 6
# define MAXJOYSTICKS 4
struct joy_s
{
int qdeviceid ;
int axis [ MAXJOYAXIS ] ;
} joy [ MAXJOYSTICKS ] ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
void IN_Shutdown ( void )
{
INS_Shutdown ( ) ;
}
void IN_ReInit ( void )
{
int i ;
for ( i = 0 ; i < MAXPOINTERS ; i + + )
{
ptr [ i ] . type = M_INVALID ;
ptr [ i ] . qdeviceid = i ;
}
2014-03-30 08:55:06 +00:00
for ( i = 0 ; i < MAXJOYSTICKS ; i + + )
{
joy [ i ] . qdeviceid = i ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
INS_ReInit ( ) ;
}
2015-04-14 23:12:17 +00:00
struct remapctx
{
char * type ;
char * devicename ;
int newdevid ;
} ;
static void IN_DeviceIDs_DoRemap ( void * vctx , char * type , char * devicename , int * qdevid )
{
struct remapctx * ctx = vctx ;
if ( ! strcmp ( ctx - > type , type ) )
if ( ! strcmp ( ctx - > devicename , devicename ) )
* qdevid = ctx - > newdevid ;
}
void IN_DeviceIDs_Enumerate ( void * ctx , char * type , char * devicename , int * qdevid )
{
if ( ! qdevid )
Con_Printf ( " %s (%s): %s \n " , type , devicename , " device cannot be remapped " ) ;
else
Con_Printf ( " %s (%s): %i \n " , type , devicename , * qdevid ) ;
}
void IN_DeviceIDs_f ( void )
{
struct remapctx ctx ;
if ( Cmd_Argc ( ) > 3 )
{
ctx . type = Cmd_Argv ( 1 ) ;
ctx . devicename = Cmd_Argv ( 2 ) ;
ctx . newdevid = atoi ( Cmd_Argv ( 3 ) ) ;
INS_EnumerateDevices ( & ctx , IN_DeviceIDs_DoRemap ) ;
}
else
INS_EnumerateDevices ( NULL , IN_DeviceIDs_Enumerate ) ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
void IN_Init ( void )
{
2014-03-30 08:55:06 +00:00
events_avail = 0 ;
events_used = 0 ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
Cvar_Register ( & m_filter , " input controls " ) ;
Cvar_Register ( & m_accel , " input controls " ) ;
2012-10-14 09:00:49 +00:00
Cvar_Register ( & m_forcewheel , " Input Controls " ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
Cvar_Register ( & m_forcewheel_threshold , " Input Controls " ) ;
Cvar_Register ( & m_strafeonright , " input controls " ) ;
Cvar_Register ( & m_fatpressthreshold , " input controls " ) ;
Cvar_Register ( & m_slidethreshold , " input controls " ) ;
2014-02-07 08:38:40 +00:00
Cvar_Register ( & m_touchmajoraxis , " input controls " ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
2015-04-14 23:12:17 +00:00
Cmd_AddCommand ( " in_deviceids " , IN_DeviceIDs_f ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
INS_Init ( ) ;
}
2014-03-30 08:55:06 +00:00
//tells the keys.c code whether the cursor is currently active, causing mouse clicks instead of binds.
qboolean IN_MouseDevIsTouch ( int devid )
{
if ( devid < MAXPOINTERS )
return ptr [ devid ] . type = = M_TOUCH ;
return false ;
}
//there was no ui to click on at least...
//translates MOUSE1 press events into begin-look-or-strafe events.
//translates to MOUSE2 accordingly
//returns 0 if it ate it completely.
int IN_TranslateMButtonPress ( int devid )
{
int ret ;
if ( ! ptr [ devid ] . down )
{
//set the cursor-pressed state, so we begin to look/strafe around
ptr [ devid ] . down = 1 ;
ptr [ devid ] . moveddist = 0 ;
ptr [ devid ] . downpos [ 0 ] = ptr [ devid ] . oldpos [ 0 ] ;
ptr [ devid ] . downpos [ 1 ] = ptr [ devid ] . oldpos [ 1 ] ;
ptr [ devid ] . delta [ 0 ] = 0 ;
ptr [ devid ] . delta [ 1 ] = 0 ;
ret = 0 ; //eat it
}
else
{
//this is the key binding that the press should use
ret = ( m_strafeonright . ival & & ptr [ devid ] . downpos [ 0 ] > vid . pixelwidth / 2 ) ? K_MOUSE2 : K_MOUSE1 ;
}
return ret ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
/*a 'pointer' is either a multitouch pointer, or a separate device
note that mice use the keyboard button api , but separate devices */
void IN_Commands ( void )
{
2012-10-14 09:00:49 +00:00
struct eventlist_s * ev ;
2012-04-24 07:59:11 +00:00
2012-10-14 09:00:49 +00:00
INS_Commands ( ) ;
2012-04-09 19:12:12 +00:00
while ( events_used ! = events_avail )
{
ev = & eventlist [ events_used & ( EVENTQUEUELENGTH - 1 ) ] ;
2014-09-02 06:01:03 +00:00
2012-04-09 19:12:12 +00:00
switch ( ev - > type )
{
case IEV_KEYDOWN :
case IEV_KEYRELEASE :
2012-10-14 09:00:49 +00:00
//on touchscreens, mouse1 is used as up/down state. we have to emulate actual mouse clicks based upon distance moved, so we can get movement events.
if ( ev - > keyboard . scancode = = K_MOUSE1 & & ev - > devid < MAXPOINTERS & & ( ptr [ ev - > devid ] . type = = M_TOUCH ) )
2012-04-09 19:12:12 +00:00
{
2014-09-02 06:01:03 +00:00
if ( ev - > type = = IEV_KEYDOWN )
{
float fl ;
touchcursor = ev - > devid ;
fl = ptr [ ev - > devid ] . oldpos [ 0 ] * vid . width / vid . pixelwidth ;
mousecursor_x = bound ( 0 , fl , vid . width - 1 ) ;
fl = ptr [ ev - > devid ] . oldpos [ 1 ] * vid . height / vid . pixelheight ;
mousecursor_y = bound ( 0 , fl , vid . height - 1 ) ;
}
else if ( touchcursor = = ev - > devid )
touchcursor = 0 ; //revert it to the mouse, or whatever device was 0.
2012-04-09 19:12:12 +00:00
if ( Key_MouseShouldBeFree ( ) )
2012-10-14 09:00:49 +00:00
ptr [ ev - > devid ] . down = 0 ;
2014-08-25 07:35:41 +00:00
else if ( ptr [ ev - > devid ] . down )
2012-04-09 19:12:12 +00:00
{
if ( ev - > type = = IEV_KEYDOWN )
2014-03-30 08:55:06 +00:00
Key_Event ( ev - > devid , ev - > keyboard . scancode , ev - > keyboard . unicode , ev - > type = = IEV_KEYDOWN ) ;
2012-04-09 19:12:12 +00:00
else
{
2014-09-02 06:01:03 +00:00
if ( ptr [ ev - > devid ] . down = = 1 & & ptr [ ev - > devid ] . moveddist < m_slidethreshold . value )
2012-10-14 09:00:49 +00:00
{
2014-03-30 08:55:06 +00:00
ptr [ ev - > devid ] . down = 2 ;
Key_Event ( ev - > devid , K_MOUSE1 , 0 , true ) ;
2012-04-09 19:12:12 +00:00
}
2014-03-30 08:55:06 +00:00
Key_Event ( ev - > devid , K_MOUSE1 , 0 , false ) ;
2012-10-14 09:00:49 +00:00
ptr [ ev - > devid ] . down = 0 ;
2012-04-09 19:12:12 +00:00
}
break ;
}
}
Key_Event ( ev - > devid , ev - > keyboard . scancode , ev - > keyboard . unicode , ev - > type = = IEV_KEYDOWN ) ;
break ;
2014-03-30 08:55:06 +00:00
case IEV_JOYAXIS :
2014-09-02 06:01:03 +00:00
if ( ev - > devid < MAXJOYSTICKS & & ev - > joy . axis < MAXJOYAXIS )
{
2014-06-27 16:19:22 +00:00
# ifdef CSQC_DAT
2014-09-02 06:01:03 +00:00
if ( CSQC_JoystickAxis ( ev - > joy . axis , ev - > joy . value , ev - > devid ) )
joy [ ev - > devid ] . axis [ ev - > joy . axis ] = 0 ;
else
2014-06-27 16:19:22 +00:00
# endif
2014-09-02 06:01:03 +00:00
joy [ ev - > devid ] . axis [ ev - > joy . axis ] = ev - > joy . value ;
}
2014-03-30 08:55:06 +00:00
break ;
2012-10-14 09:00:49 +00:00
case IEV_MOUSEDELTA :
if ( ev - > devid < MAXPOINTERS )
{
if ( ptr [ ev - > devid ] . type ! = M_MOUSE )
{
ptr [ ev - > devid ] . type = M_MOUSE ;
}
ptr [ ev - > devid ] . delta [ 0 ] + = ev - > mouse . x ;
ptr [ ev - > devid ] . delta [ 1 ] + = ev - > mouse . y ;
if ( m_forcewheel . value > = 2 )
ptr [ ev - > devid ] . wheeldelta - = ev - > mouse . z ;
else if ( m_forcewheel . value )
{
int mfwt = ( int ) m_forcewheel_threshold . value ;
if ( ev - > mouse . z > mfwt )
ptr [ ev - > devid ] . wheeldelta - = mfwt ;
else if ( ev - > mouse . z < - mfwt )
ptr [ ev - > devid ] . wheeldelta + = mfwt ;
}
}
break ;
2012-04-09 19:12:12 +00:00
case IEV_MOUSEABS :
/*mouse cursors only really work with one pointer*/
2014-09-02 06:01:03 +00:00
if ( ev - > devid = = touchcursor )
2012-04-09 19:12:12 +00:00
{
2012-10-14 09:00:49 +00:00
float fl ;
fl = ev - > mouse . x * vid . width / vid . pixelwidth ;
mousecursor_x = bound ( 0 , fl , vid . width - 1 ) ;
fl = ev - > mouse . y * vid . height / vid . pixelheight ;
mousecursor_y = bound ( 0 , fl , vid . height - 1 ) ;
2012-04-09 19:12:12 +00:00
}
if ( ev - > devid < MAXPOINTERS )
{
2012-10-14 09:00:49 +00:00
if ( ptr [ ev - > devid ] . type ! = M_TOUCH )
{
//if its now become an absolute device, clear stuff so we don't get confused.
ptr [ ev - > devid ] . type = M_TOUCH ;
ptr [ ev - > devid ] . down = 0 ;
ptr [ ev - > devid ] . moveddist = 0 ;
ptr [ ev - > devid ] . oldpos [ 0 ] = ev - > mouse . x ;
ptr [ ev - > devid ] . oldpos [ 1 ] = ev - > mouse . y ;
}
if ( ptr [ ev - > devid ] . down )
{
ptr [ ev - > devid ] . delta [ 0 ] + = ev - > mouse . x - ptr [ ev - > devid ] . oldpos [ 0 ] ;
ptr [ ev - > devid ] . delta [ 1 ] + = ev - > mouse . y - ptr [ ev - > devid ] . oldpos [ 1 ] ;
ptr [ ev - > devid ] . moveddist + = fabs ( ev - > mouse . x - ptr [ ev - > devid ] . oldpos [ 0 ] ) + fabs ( ev - > mouse . y - ptr [ ev - > devid ] . oldpos [ 1 ] ) ;
}
2012-04-09 19:12:12 +00:00
ptr [ ev - > devid ] . oldpos [ 0 ] = ev - > mouse . x ;
ptr [ ev - > devid ] . oldpos [ 1 ] = ev - > mouse . y ;
2012-10-14 09:00:49 +00:00
if ( ptr [ ev - > devid ] . down > 1 & & ev - > mouse . tsize < m_fatpressthreshold . value )
{
ptr [ ev - > devid ] . down = 1 ;
2014-03-30 08:55:06 +00:00
Key_Event ( ev - > devid , K_MOUSE1 , 0 , false ) ;
2012-10-14 09:00:49 +00:00
}
if ( ptr [ ev - > devid ] . down = = 1 & & ev - > mouse . tsize > m_fatpressthreshold . value )
{
ptr [ ev - > devid ] . down = 2 ;
2014-03-30 08:55:06 +00:00
Key_Event ( ev - > devid , K_MOUSE1 , 0 , true ) ;
2012-10-14 09:00:49 +00:00
}
2012-04-09 19:12:12 +00:00
}
break ;
}
events_used + + ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
}
}
void IN_MoveMouse ( struct mouse_s * mouse , float * movements , int pnum )
2012-10-14 09:00:49 +00:00
{
int mx , my ;
double mouse_x , mouse_y , mouse_deltadist ;
int mfwt ;
qboolean strafe_x , strafe_y ;
int wpnum ;
2012-04-09 19:12:12 +00:00
2012-10-14 09:00:49 +00:00
//small performance boost
if ( mouse - > type = = M_INVALID )
return ;
2012-04-09 19:12:12 +00:00
2012-10-14 09:00:49 +00:00
/*each device will be processed when its player comes to be processed*/
wpnum = cl . splitclients ;
if ( wpnum < 1 )
wpnum = 1 ;
2015-03-03 00:14:43 +00:00
if ( cl_forceseat . ival )
wpnum = ( cl_forceseat . ival - 1 ) % wpnum ;
2012-10-14 09:00:49 +00:00
else
wpnum = mouse - > qdeviceid % wpnum ;
if ( wpnum ! = pnum )
return ;
2012-04-09 19:12:12 +00:00
2012-10-14 09:00:49 +00:00
if ( m_forcewheel . value )
2012-04-09 19:12:12 +00:00
{
2012-10-14 09:00:49 +00:00
mfwt = m_forcewheel_threshold . ival ;
if ( mfwt )
2012-04-09 19:12:12 +00:00
{
2012-10-14 09:00:49 +00:00
while ( mouse - > wheeldelta < = - mfwt )
2012-04-09 19:12:12 +00:00
{
2012-10-14 09:00:49 +00:00
Key_Event ( mouse - > qdeviceid , K_MWHEELUP , 0 , true ) ;
Key_Event ( mouse - > qdeviceid , K_MWHEELUP , 0 , false ) ;
mouse - > wheeldelta + = mfwt ;
}
while ( mouse - > wheeldelta > = mfwt )
{
Key_Event ( mouse - > qdeviceid , K_MWHEELDOWN , 0 , true ) ;
Key_Event ( mouse - > qdeviceid , K_MWHEELDOWN , 0 , false ) ;
mouse - > wheeldelta - = mfwt ;
2012-04-09 19:12:12 +00:00
}
}
2012-10-14 09:00:49 +00:00
if ( m_forcewheel . value < 2 )
mouse - > wheeldelta = 0 ;
}
2012-04-09 19:12:12 +00:00
2012-10-14 09:00:49 +00:00
mx = mouse - > delta [ 0 ] ;
mouse - > delta [ 0 ] = 0 ;
my = mouse - > delta [ 1 ] ;
mouse - > delta [ 1 ] = 0 ;
2012-04-09 19:12:12 +00:00
2012-10-14 09:00:49 +00:00
if ( in_xflip . value ) mx * = - 1 ;
2012-04-09 19:12:12 +00:00
2012-10-14 09:00:49 +00:00
mousemove_x + = mx ;
mousemove_y + = my ;
2012-04-09 19:12:12 +00:00
2012-10-14 09:00:49 +00:00
if ( Key_MouseShouldBeFree ( ) )
2012-04-09 19:12:12 +00:00
{
2014-09-02 06:01:03 +00:00
if ( ( mx | | my ) & & mouse - > type ! = M_TOUCH )
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
{
mousecursor_x + = mx ;
mousecursor_y + = my ;
2012-10-14 09:00:49 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
if ( mousecursor_y < 0 )
mousecursor_y = 0 ;
if ( mousecursor_x < 0 )
mousecursor_x = 0 ;
2012-04-09 19:12:12 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
if ( mousecursor_x > = vid . width )
mousecursor_x = vid . width - 1 ;
2012-04-09 19:12:12 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
if ( mousecursor_y > = vid . height )
mousecursor_y = vid . height - 1 ;
mx = my = 0 ;
}
2012-10-14 09:00:49 +00:00
}
else
2012-04-09 19:12:12 +00:00
{
2014-09-02 06:01:03 +00:00
if ( mouse - > type ! = M_TOUCH )
{
mousecursor_x + = mx ;
mousecursor_y + = my ;
}
2012-04-09 19:12:12 +00:00
# ifdef VM_UI
2012-10-14 09:00:49 +00:00
if ( UI_MousePosition ( mx , my ) )
{
mx = 0 ;
my = 0 ;
}
2012-04-09 19:12:12 +00:00
# endif
}
2012-10-14 09:00:49 +00:00
if ( mouse - > type = = M_TOUCH )
2012-04-09 19:12:12 +00:00
{
2013-12-02 14:30:30 +00:00
if ( m_strafeonright . ival & & mouse - > downpos [ 0 ] > vid . pixelwidth / 2 & & movements ! = NULL & & ! Key_Dest_Has ( ~ kdm_game ) )
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
{
//if they're strafing, calculate the speed to move at based upon their displacement
if ( mouse - > down )
{
2014-02-07 08:38:40 +00:00
mx = mouse - > oldpos [ 0 ] - ( vid . pixelwidth * 3 ) / 4 ;
my = mouse - > oldpos [ 1 ] - ( vid . pixelheight * 3 ) / 4 ;
//mx = (mouse->oldpos[0] - mouse->downpos[0])*0.1;
//my = (mouse->oldpos[1] - mouse->downpos[1])*0.1;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
}
else
{
mx = 0 ;
my = 0 ;
}
2014-02-07 08:38:40 +00:00
if ( m_touchmajoraxis . ival )
{
//major axis only
if ( fabs ( mx ) > fabs ( my ) )
my = 0 ;
else
mx = 0 ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
strafe_x = true ;
strafe_y = true ;
}
else
{
strafe_x = false ;
2012-10-14 09:00:49 +00:00
strafe_y = false ;
2014-02-07 08:38:40 +00:00
//boost sensitivity so that the default works okay.
mx * = 1.75 ;
my * = 1.75 ;
2012-10-14 09:00:49 +00:00
}
2012-04-09 19:12:12 +00:00
}
2012-10-14 09:00:49 +00:00
else
2012-04-09 19:12:12 +00:00
{
2012-10-14 09:00:49 +00:00
strafe_x = ( in_strafe . state [ pnum ] & 1 ) | | ( lookstrafe . value & & ( in_mlook . state [ pnum ] & 1 ) ) ;
strafe_y = ! ( ( in_mlook . state [ pnum ] & 1 ) & & ! ( in_strafe . state [ pnum ] & 1 ) ) ;
2012-04-09 19:12:12 +00:00
}
2012-10-14 09:00:49 +00:00
# ifdef PEXT_CSQC
2013-06-23 02:17:02 +00:00
if ( mouse - > type = = M_TOUCH )
2012-04-09 19:12:12 +00:00
{
2013-06-23 02:17:02 +00:00
if ( CSQC_MousePosition ( mouse - > oldpos [ 0 ] , mouse - > oldpos [ 1 ] , mouse - > qdeviceid ) )
{
mx = 0 ;
my = 0 ;
}
}
else
{
2014-03-30 08:55:06 +00:00
if ( mx | | my )
if ( CSQC_MouseMove ( mx , my , mouse - > qdeviceid ) )
2013-10-08 14:28:11 +00:00
{
mx = 0 ;
my = 0 ;
}
2014-03-30 08:55:06 +00:00
//if game is not focused, kill any mouse look
if ( Key_Dest_Has ( ~ kdm_game ) )
2013-06-23 02:17:02 +00:00
{
mx = 0 ;
my = 0 ;
}
2012-10-14 09:00:49 +00:00
}
# endif
2012-04-09 19:12:12 +00:00
2012-10-14 09:00:49 +00:00
if ( m_filter . value )
{
double fraction = bound ( 0 , m_filter . value , 2 ) * 0.5 ;
mouse_x = ( mx * ( 1 - fraction ) + mouse - > old_delta [ 0 ] * fraction ) ;
mouse_y = ( my * ( 1 - fraction ) + mouse - > old_delta [ 1 ] * fraction ) ;
}
else
{
mouse_x = mx ;
mouse_y = my ;
}
2012-04-09 19:12:12 +00:00
2012-10-14 09:00:49 +00:00
mouse - > old_delta [ 0 ] = mx ;
mouse - > old_delta [ 1 ] = my ;
if ( m_accel . value )
{
mouse_deltadist = sqrt ( mx * mx + my * my ) ;
mouse_x * = ( mouse_deltadist * m_accel . value + sensitivity . value * in_sensitivityscale ) ;
mouse_y * = ( mouse_deltadist * m_accel . value + sensitivity . value * in_sensitivityscale ) ;
}
else
{
mouse_x * = sensitivity . value * in_sensitivityscale ;
mouse_y * = sensitivity . value * in_sensitivityscale ;
2012-04-09 19:12:12 +00:00
}
2012-10-14 09:00:49 +00:00
if ( cl . playerview [ pnum ] . stats [ STAT_VIEWZOOM ] )
{
mouse_x * = cl . playerview [ pnum ] . stats [ STAT_VIEWZOOM ] / 255.0f ;
mouse_y * = cl . playerview [ pnum ] . stats [ STAT_VIEWZOOM ] / 255.0f ;
}
2012-04-09 19:12:12 +00:00
2012-10-14 09:00:49 +00:00
if ( ! movements )
{
return ;
}
2012-04-09 19:12:12 +00:00
2012-10-14 09:00:49 +00:00
// add mouse X/Y movement to cmd
if ( strafe_x )
movements [ 1 ] + = m_side . value * mouse_x ;
else
{
// if ((int)((cl.viewangles[pnum][PITCH]+89.99)/180) & 1)
// mouse_x *= -1;
cl . playerview [ pnum ] . viewanglechange [ YAW ] - = m_yaw . value * mouse_x ;
}
2012-04-09 19:12:12 +00:00
2012-10-14 09:00:49 +00:00
if ( in_mlook . state [ pnum ] & 1 )
2013-06-23 02:17:02 +00:00
V_StopPitchDrift ( & cl . playerview [ pnum ] ) ;
2012-04-09 19:12:12 +00:00
2012-10-14 09:00:49 +00:00
if ( ! strafe_y )
{
cl . playerview [ pnum ] . viewanglechange [ PITCH ] + = m_pitch . value * mouse_y ;
}
else
{
if ( ( in_strafe . state [ pnum ] & 1 ) & & noclip_anglehack )
movements [ 2 ] - = m_forward . value * mouse_y ;
else
movements [ 0 ] - = m_forward . value * mouse_y ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
}
2014-03-30 08:55:06 +00:00
static float joydeadzone ( float mag , float deadzone )
{
if ( mag > 1 ) //erg?
mag = 1 ;
if ( mag > deadzone )
{
mag - = deadzone ;
mag = mag / ( 1.f - deadzone ) ;
}
else
mag = 0 ;
return mag ;
}
void IN_MoveJoystick ( struct joy_s * joy , float * movements , int pnum , float frametime )
{
float mag ;
vec3_t jlook , jstrafe ;
int wpnum ;
/*each device will be processed when its player comes to be processed*/
wpnum = cl . splitclients ;
if ( wpnum < 1 )
wpnum = 1 ;
2015-03-03 00:14:43 +00:00
if ( cl_forceseat . ival )
wpnum = ( cl_forceseat . ival - 1 ) % wpnum ;
2014-03-30 08:55:06 +00:00
else
wpnum = joy - > qdeviceid % wpnum ;
if ( wpnum ! = pnum )
return ;
jlook [ 0 ] = joy - > axis [ 0 ] ;
jlook [ 1 ] = joy - > axis [ 1 ] ;
jlook [ 2 ] = joy - > axis [ 2 ] ;
jstrafe [ 0 ] = joy - > axis [ 3 ] ;
jstrafe [ 1 ] = joy - > axis [ 4 ] ;
jstrafe [ 2 ] = joy - > axis [ 5 ] ;
//uses a radial deadzone for x+y axis, and separate out the z axis, just because most controllers are 2d affairs with any 3rd axis being a separate knob.
//deadzone values are stolen from microsoft's xinput documentation. they seem quite large to me - I guess that means that xbox controllers are just dodgy imprecise crap with excessive amounts of friction and finger grease.
mag = joydeadzone ( sqrt ( jlook [ 0 ] * jlook [ 0 ] + jlook [ 1 ] * jlook [ 1 ] ) , 0.239 ) ;
mag = pow ( mag , 2 ) ;
jlook [ 0 ] * = mag ;
jlook [ 1 ] * = mag ;
mag = joydeadzone ( fabs ( jlook [ 2 ] ) , 0.00092 ) ;
jlook [ 2 ] * = mag ;
mag = joydeadzone ( sqrt ( jstrafe [ 0 ] * jstrafe [ 0 ] + jstrafe [ 1 ] * jstrafe [ 1 ] ) , 0.265 ) ;
mag = pow ( mag , 2 ) ;
jstrafe [ 0 ] * = mag ;
jstrafe [ 1 ] * = mag ;
mag = joydeadzone ( fabs ( jstrafe [ 2 ] ) , 0.00092 ) ;
jstrafe [ 2 ] * = mag ;
if ( Key_Dest_Has ( ~ kdm_game ) )
{
VectorClear ( jlook ) ;
VectorClear ( jstrafe ) ;
}
VectorScale ( jlook , frametime , jlook ) ;
VectorScale ( jstrafe , frametime , jstrafe ) ;
if ( ! movements ) //if this is null, gamecode should still get inputs, just no camera looking or anything.
return ;
//angle changes
cl . playerview [ pnum ] . viewanglechange [ YAW ] - = m_yaw . value * jlook [ 0 ] ;
cl . playerview [ pnum ] . viewanglechange [ PITCH ] + = m_pitch . value * jlook [ 1 ] ;
// cl.playerview[pnum].viewanglechange[ROLL] += m_roll.value * jlook[2]; //this would be too weird.
if ( in_mlook . state [ pnum ] & 1 )
V_StopPitchDrift ( & cl . playerview [ pnum ] ) ;
//movement
movements [ 1 ] + = m_side . value * jstrafe [ 0 ] ; //x=right=1
movements [ 0 ] - = m_forward . value * jstrafe [ 1 ] ; //y=forward=0
movements [ 2 ] + = m_side . value * jstrafe [ 2 ] ; //z=up=2
}
void IN_Move ( float * movements , int pnum , float frametime )
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
{
int i ;
INS_Move ( movements , pnum ) ;
for ( i = 0 ; i < MAXPOINTERS ; i + + )
IN_MoveMouse ( & ptr [ i ] , movements , pnum ) ;
2014-03-30 08:55:06 +00:00
for ( i = 0 ; i < MAXJOYSTICKS ; i + + )
IN_MoveJoystick ( & joy [ i ] , movements , pnum , frametime ) ;
}
void IN_JoystickAxisEvent ( int devid , int axis , float value )
{
struct eventlist_s * ev = in_newevent ( ) ;
if ( ! ev )
return ;
ev - > type = IEV_JOYAXIS ;
ev - > devid = devid ;
ev - > joy . axis = axis ;
ev - > joy . value = value ;
in_finishevent ( ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
}
2012-10-14 09:00:49 +00:00
void IN_KeyEvent ( int devid , int down , int keycode , int unicode )
2012-04-09 19:12:12 +00:00
{
struct eventlist_s * ev = in_newevent ( ) ;
2012-10-14 09:00:49 +00:00
if ( ! ev )
2012-04-09 19:12:12 +00:00
return ;
ev - > type = down ? IEV_KEYDOWN : IEV_KEYRELEASE ;
2012-12-15 00:25:54 +00:00
ev - > devid = devid ;
2012-04-09 19:12:12 +00:00
ev - > keyboard . scancode = keycode ;
ev - > keyboard . unicode = unicode ;
in_finishevent ( ) ;
}
2012-10-14 09:00:49 +00:00
/*
devid is the mouse device id . generally idependant from keyboards .
for multitouch , devid might be the touch identifier , which will persist until released .
x is horizontal , y is vertical .
z is height . . . generally its used as a mousewheel instead , but there are some ' 3 d ' mice out there , so its provided in this api .
2012-04-09 19:12:12 +00:00
*/
2012-10-14 09:00:49 +00:00
void IN_MouseMove ( int devid , int abs , float x , float y , float z , float size )
2012-04-09 19:12:12 +00:00
{
struct eventlist_s * ev = in_newevent ( ) ;
if ( ! ev )
return ;
2012-10-14 09:00:49 +00:00
ev - > devid = devid ;
ev - > type = abs ? IEV_MOUSEABS : IEV_MOUSEDELTA ;
ev - > mouse . x = x ;
ev - > mouse . y = y ;
ev - > mouse . z = z ;
ev - > mouse . tsize = size ;
2012-04-09 19:12:12 +00:00
in_finishevent ( ) ;
}