Commit Graph

51 Commits

Author SHA1 Message Date
Glenn Maynard f652510cc5 RepeatStopKey: stop repeating a key until it's released 2006-09-14 20:39:54 +00:00
Glenn Maynard 80a8a67631 remove fFastDelay 2006-09-13 03:01:51 +00:00
Glenn Maynard 89baa9f112 remove IET_SLOW_REPEAT 2006-09-13 02:59:43 +00:00
Glenn Maynard c71d8f7425 IET_SLOW_REPEAT -> IET_REPEAT 2006-09-13 02:59:05 +00:00
Glenn Maynard d03db0c4f9 remove IET_FAST_REPEAT 2006-09-13 02:55:19 +00:00
Glenn Maynard 897c1c9057 revert "simplify"; this removed an API call 2006-09-08 18:59:57 +00:00
Glenn Maynard 9e3f9f6fb3 const 2006-09-08 18:54:01 +00:00
Glenn Maynard 3fc0d75570 remove IET_LEVEL_CHANGED 2006-09-08 18:51:12 +00:00
Steve Checkoway 90336496bc Cleanup. 2006-09-08 05:06:02 +00:00
Steve Checkoway f89680bf06 Simplify. 2006-09-08 05:05:42 +00:00
Steve Checkoway eff97a098e Revert. I should be calling Reset() instead. 2006-09-08 04:49:40 +00:00
Glenn Maynard 3deda620b9 const
simplify InputFilter::GetPressedButtons
2006-09-08 04:26:23 +00:00
Steve Checkoway 8c3f4cebba Allow flushing of queued input events. 2006-09-08 04:10:47 +00:00
Glenn Maynard be6d3d4043 Include the complete input state with each input report.
This only deals with buttons being held, so won't cause
performance issues.

This deals with a general problem of the input layer:
you can query the current state of the inputs, but inputs
are received in a queue, causing inconsistencies.

This is why pressing enter during a load, then holding Alt
after pressing it, causes the game to switch fullscreen
after the load finishes; checking for "alt-enter" should
be checking if Alt was pressed when Enter was pressed,
not whether it's pressed right now.

Similarly, CodeDetector has difficulty handling a "Right-Left"
and a "Left-Right" code simultaneously.  If both buttons
are pressed quickly, it needs to check whether Right was
pressed at the time Left was reported, not at the time
EnteredCode was called.
2006-09-08 04:03:14 +00:00
Glenn Maynard dc531b59e4 don't derive InputEvent from DeviceInput 2006-09-08 01:11:18 +00:00
Glenn Maynard 2fa3dd658a don't bother typedefing this 2006-09-07 23:58:46 +00:00
Steve Checkoway cff13747a6 Cleanup. 2006-09-02 20:17:17 +00:00
Chris Danford 7f821e8cfc CString -> RString 2006-01-22 01:00:06 +00:00
Glenn Maynard 4664c25bee fix excessive memory usage by m_ButtonState 2005-12-28 20:41:24 +00:00
Glenn Maynard 29422da7d3 MAX_DEVICE_BUTTONS -> NUM_DeviceButton 2005-12-28 19:15:48 +00:00
Glenn Maynard 7039cafa9a Merge input symbols: any device can have any input key.
- This reduces the number of types associated with input; adding a
   distinct input type doesn't introduce a whole new enumerated type
   and related functions.
 - Special handling for different devices is needed less often.  If you
   want to respond to an F1 press, simply check for KEY_F1; the device
   type doesn't really matter (though it'll usually be a keyboard).
 - This allows cleaner support for generalized USB devices.  While they're
   usually of the traditional classes (keyboard, joystick) with associated
   inputs, they don't have to be.
 - Forced casts between parallel types can be removed, and weakly-specified
   variables (ints instead of the enum type) can be fixed.

Some things that might have been merged havn't; for example, arrow keys
on a keyboard (KEY_UP) are still distinct from axes on a joystick (JOY_UP).
These may or may not be merged in the future.

Some were: removed PUMP_ symbols.  Treat them as generic buttons, and just
give them names with GetDeviceSpecificInputString.  It's not worth
introducing more special names for something only used in one place.
2005-12-28 08:52:20 +00:00
Glenn Maynard 499dcf9c32 debouncing code broke handling of threaded inputs; fix 2005-11-06 12:14:35 +00:00
Chris Danford ae7300b3be const cleanup 2005-10-15 16:47:44 +00:00
Glenn Maynard ee9fd1ecc2 remove fast repeat rate. It's the same as the slow rate, and nothing uses it. (IET_FAST_REPEAT kept for now, since some code uses it.) 2005-09-22 23:22:18 +00:00
Glenn Maynard 1df0a43b3f implement generic high-level input debouncing 2005-09-19 07:09:55 +00:00
Glenn Maynard e308f7e6ea cleanup 2005-09-19 04:51:49 +00:00
Glenn Maynard c765508bc1 fix crash due to memset()ing a non-POD 2005-05-10 04:42:14 +00:00
Glenn Maynard ed1c6ff32f add input button comments 2005-05-08 09:19:35 +00:00
Glenn Maynard 4e5077ef84 cleanup, handle IET_LEVEL_CHANGED 2004-09-09 22:14:33 +00:00
Glenn Maynard a3e10dee2b no, really, remove ugly "JoytechInput" stuff that was never actually implemented 2004-09-09 18:34:28 +00:00
Glenn Maynard 6c28f869b1 remove ugly "JoytechInput" stuff that was never actually implemented 2004-09-09 18:33:09 +00:00
Glenn Maynard 733127d8ed license update 2004-06-08 01:24:17 +00:00
Glenn Maynard 9b2f146605 SetRepeatRate, ResetRepeatRate, ResetKeyRepeat 2003-11-25 21:46:30 +00:00
Chris Danford 8c3db31ba7 optimize InputFilter::Update 2003-10-07 05:59:58 +00:00
Glenn Maynard 8f3927478f add ForceKey, StopForcingKey 2003-09-03 21:49:11 +00:00
Glenn Maynard dc9b6ed06d don't pull in RageThreads.h 2003-07-26 21:58:48 +00:00
Glenn Maynard 5adb26a169 thread safety 2003-07-14 06:21:12 +00:00
Chris Danford ae2be8a170 Fix stuck keys after toggle fullscreen 2003-06-22 04:38:05 +00:00
Glenn Maynard 8ca36e9cfb add InputFilter::ResetDevice 2003-06-21 20:58:40 +00:00
Glenn Maynard 48ddbf625c whoops, wrong header 2003-02-16 02:25:46 +00:00
Glenn Maynard 7578257a17 Use SDL events for keyboard and joystick input. It's simpler.
It's also the "preferred" way of doing it, according to the SDL
docs, so maybe it'll work better.

This will reliably queue events, so we can handle coin events during
loads.

It'll queue events a little too reliably; we might want to flush some events
when we load screens.
2003-02-16 01:35:48 +00:00
Glenn Maynard 55e92e771d s/CArray<x,y>/vector<x>/g 2003-01-03 05:56:28 +00:00
Glenn Maynard 24cc7a3c04 Get rid of all other #pragma once's, except the one in StdAfx.h.
(three cheers for perl)
2002-11-16 08:07:38 +00:00
Chris Danford 15fc589cc6 Fixed articts in hold note and life frames. 2002-10-18 19:01:32 +00:00
Glenn Maynard fe58e28516 lower repeat time 2002-09-10 06:27:57 +00:00
Glenn Maynard 839d2388a2 Filter layer over *BeingPressed in InputFilter, to put odd special cases
without mussing up RageInput.

Disables the new joystick axes (they're only there for a USB converter
special case that I havn't added yet and will cause problems for others).
2002-09-08 06:10:23 +00:00
Chris Danford 4ec08edf2d Mini-rewrite of input mapping, theme support, and added KSF reader. 2002-07-31 19:40:40 +00:00
Chris Danford 936fabbe85 more fixes to Oni and courses 2002-07-27 19:29:51 +00:00
Chris Danford 2f80235590 no message 2002-05-19 01:59:48 +00:00
Chris Danford 6f1c1e4619 no message 2002-05-01 19:14:55 +00:00