Commit Graph
253 Commits
Author SHA1 Message Date
Renaud Lepage 597cadd347 "Ugly" Xbox fix. It's that, or renaming all the DELETE define of the InputHandler and its users. 2006-09-15 03:09:17 +00:00
Steve Checkoway 5083893317 Use UCKeyTranslate if the 'uchr' resource exists. If not, fall back on the 'KCHR' resource. 2006-09-14 09:13:46 +00:00
Steve Checkoway dd0e3ce082 Cleanup. 2006-09-14 07:20:05 +00:00
Steve Checkoway 4dd57b99bd Don't hard code joystick and pump numbers. 2006-09-14 06:06:53 +00:00
Chris Danford 790ccdbcbe fix joystick number not shown on input mapping screen 2006-08-08 08:46:40 +00:00
Steve Checkoway fd424585f2 Fix assert with monkey keyboard. 2006-07-26 00:31:48 +00:00
Steve Checkoway 7d2ff868e1 Cleanup. (This was written by Chris but InputHandler_MonkeyKeyboard.h was written by Glenn?) 2006-07-26 00:29:26 +00:00
Steve Checkoway a07e194cf1 Revert. Fixes Linux build. 2006-07-18 05:51:37 +00:00
Jason Felds 366c3440d4 Fix VC8 macro redef warning. (more to come) 2006-07-18 03:56:37 +00:00
Steve Checkoway 80698277cf Don't use rand()%n. The function specified by the ANSI committee is a terrible linear congruential generator. In fact, it's so bad that the low order bit alternates. The algorithm implemented as RandomFloat() seems to be Park and Miller's "minimum standard" generator which is better (but not great). [See Knuth for more information.]
Any place where you would use rand()%n, use RandomInt(0, n) instead.
2006-06-26 12:14:30 +00:00
Chris Danford f94566100f no character for Enter 2006-06-16 06:28:31 +00:00
Chris Danford 0b5baba88c fix compile 2006-06-16 06:27:53 +00:00
Glenn Maynard c29c725f4b cleanup (one-step conversion instead of three-step) 2006-06-15 07:29:34 +00:00
Glenn Maynard aa9eea16e0 more nudging: merge DeviceButtonToString calls 2006-06-15 06:38:24 +00:00
Glenn Maynard cc2fb2b137 equivalent but more consistent 2006-06-15 06:35:36 +00:00
Glenn Maynard 1157c5eae9 more obvious behavior, and change "Joy1_B1" to "Joy1 B1" for
consistency
2006-06-15 06:34:07 +00:00
Glenn Maynard 0b1eedce2c simplify 2006-06-15 06:30:35 +00:00
Glenn Maynard c9e55137a5 nudging GetDeviceSpecificInputString and GetLocalizedInputString
together
2006-06-15 06:23:58 +00:00
Glenn Maynard 0980208a1f DeviceButtonToString is already sanely capitalized 2006-06-15 06:21:32 +00:00
Glenn Maynard 35864b415c don't capitalize Space 2006-06-15 06:20:37 +00:00
Glenn Maynard 81ddf2d8e0 show "Space" if the character value is ' ', regardless of the KEY_ value 2006-06-15 06:17:46 +00:00
Glenn Maynard 1d4601eca7 localize "space" 2006-06-15 06:16:11 +00:00
Glenn Maynard 3c9897989c GetDeviceSpecificInputString and DeviceInputToLocalizedString are
the same: "a string suitable for display", but just formatted slightly
differently.  Handle these the same way (so hopefully a way to merge
them will become visible).

This also fixes the RageInputDevice dependency on RageInput.
2006-06-15 06:07:45 +00:00
Glenn Maynard 181c9d51f9 trying to unwrap this input stuff:
DeviceInputToTranslatedString will try DeviceButtonToChar; but we just
tried that; it then uses DeviceButtonToString.  use DeviceButtonToString
directly
2006-06-15 04:07:48 +00:00
Glenn Maynard 9ee37b04be cleanup 2006-06-15 03:50:43 +00:00
Glenn Maynard defdede155 DeviceButtonToLocalizedAndTranslatedString -> DeviceInputToTranslatedString 2006-06-15 03:39:45 +00:00
Chris Danford dd4d759dd5 ToAsciiEx maps these keys to a character. They shouldn't be mapped to any character. 2006-06-11 20:43:58 +00:00
Chris Danford 632ad67cdb fix some keys have ugly names in test input screen 2006-06-11 07:44:16 +00:00
Chris Danford e2eb5135e5 add international keyboard support 2006-06-11 07:12:01 +00:00
Chris Danford b79cb92052 remove use of towupper for OS X 2006-06-11 01:28:52 +00:00
Steve Checkoway fa56d41c17 Use wchar_t. This doesn't actually compile on the mac using the 10.2.8 sdk because wctype.h is missing so no towupper function exists. 2006-06-10 22:36:25 +00:00
Chris Danford 8cdce5cfda fix NumPad keys 2006-06-10 21:19:35 +00:00
Chris Danford 8c4cedf63f let OS handle key modifers (fixes number buttons w/ French keyboard) 2006-06-10 20:33:56 +00:00
Chris Danford dce168b0c2 international keyboard support 2006-06-10 06:50:50 +00:00
Steve Checkoway f39e79efed The last of the changes, I hope. 2006-05-14 07:04:28 +00:00
Chris Danford 5749dbb258 add "joystick with keyboard" button for Back 2006-04-21 00:46:36 +00:00
Glenn Maynard 0d4e8b44c2 Convert ACP strings from the OS that we show to the user. 2006-04-04 23:44:37 +00:00
Glenn Maynard 05c1ab44b9 simplify 2006-04-04 23:40:43 +00:00
Glenn Maynard f93db25802 Systems with many unbuffered joystick devices may send 50 presses
per frame.  Use a large value, so we only trigger as a diagnostic for
broken RageInputDrivers.
2006-03-26 01:42:37 +00:00
Chris Danford c0dfb2453d Don't always poll DI for joystick changes in the main thread. Instead, poll the HID registry value, then poll DI for 15 seconds to catch the joystick change. 2006-03-22 22:39:35 +00:00
Chris Danford 345a588e2d move DevicesChanged polling into separate thread because the DInput calls block. Only supported if ThreadedInput=1. 2006-03-17 00:29:10 +00:00
Chris Danford 4dd5728ee0 style cleanup 2006-03-17 00:15:35 +00:00
Chris Danford bf0cc13a47 Change GetDevicesAndDescriptions to fill in one vector instead of 2
Ignore changes in non-joystick devices when automapping
2006-02-27 17:51:27 +00:00
Steve Checkoway 5a916de95b Use -1 as a sentinel. 2006-02-27 00:20:18 +00:00
Steve Checkoway 0882afee6f Cleanup. 2006-02-24 21:51:31 +00:00
Steve Checkoway d396941353 Return mac keyboard strings (and also a bunch of international keyboard buttons that I don't have, can't test, and in many cases probably don't even exist. 2006-02-24 21:43:41 +00:00
Steve Checkoway c4fde125e4 Basic support for the USB pump pad. It is not HID-compliant and reports strange values when buttons are pressed and released. In particular, it claims that it's values are in the range [0,1], yet actually returns values in the range [0,3]. Also, there are two instances where releasing two buttons sends the same report (UR and MID, as well as DL and DR).
I suspect this makes it pretty much impossible to use (although the guy with the pad has the glowing report of, "and it seemed to work OK") but without actually having a pad with which to test, it's about all I can do.
2006-02-24 13:29:15 +00:00
Steve Checkoway 4199cbc9c0 Create JoystickDevices for HID game pads (untested). 2006-02-10 08:50:24 +00:00
Steve Checkoway bb9848adcc Revert. 2006-02-10 04:49:45 +00:00
Chris Danford 02786346b8 use gamepads 2006-02-09 01:53:24 +00:00