summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/Src/ControllerInterface
AgeCommit message (Collapse)Author
2012-12-10Clean up gcc/g++ compiler warnings that have accumulated.Glenn Rice
2012-07-14Re-add hack to use SDL/SDL.h ifndef _WIN32.Scott Moreau
The correct convention is to use #include SDL.h in all cases but we have to do this so Externals/SDL builds, which isn't in the best shape.
2012-07-12Add periodic effects for haptic devices.Scott Moreau
This adds support for drivers supporting sine, square and triangle periodic haptic effects. This allows rumble to work on devices/drivers supporting these effects, such as an xbox controller using the xpad driver under Linux.
2012-07-12Add SDL2 support to build system.Scott Moreau
Dolphin code already builds against SDL2 but the build system never checks for SDL2, which is the what latest SDL is called now. SDL2 replaces SDL 1.3. This allows Dolphin to be build against SDL2, which activates certain new features such as the haptic interface.
2012-05-02Fix DirectInput D-Pad handling.Billiard26
2011-12-12Merge branch 'fix-real-gcpad-sticks'Jordan Woyak
2011-12-12detect input at 55% to catch silly c-stick rangeJordan Woyak
2011-10-01Fixed the controller config so that it lists DInput controllers with special ↵skidau
characters (like the Registered (R) sign) in their name. UTF8 is used to match the encoding used by the Wx GUI.
2011-08-31Untested attempt to fix real gcpad sticks not being detected by the input ↵Jordan Woyak
configuration dialogs.
2011-06-15Apply the simple NULL-checking patch from issue 4311.DimitriPilot3
Judging by the feedback provided by other OSX users, this appears to fix the crash when starting Dolphin on OSX with devices that have an empty name. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7598 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-04-01Fix SDL 1.3 support.Jordan Woyak
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7434 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-22Fixed some memory leaks. Only one was mine ;PJordan Woyak
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7392 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-15Fix DInput rumble.Jordan Woyak
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7347 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-14Fix DInput and SDL.Jordan Woyak
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7345 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-14Clean up "ControllerInterface" a bit.Jordan Woyak
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7339 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-07problem: TryAcquireSRWLockExclusive requires Windows 7 :/. solution kinda: ↵Jordan Woyak
use std::recursive_mutex (CriticalSection on windows) where try_lock is used. Dolphin should work on Vista x64 again. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7313 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-05Replaced Common::CriticalSection with a std::mutex implementation. 64bit ↵Jordan Woyak
Windows builds now use SRWLocks and ConditionVariables(requires Vista/7, x64 builds will no longer work on Windows XP x64). Tell me if you hate that. Removed Common::EventEx. Common::Event now uses a std::condition_variable impl.(using ConditionVariables on Windows x64, Events on x86, or posix condition variables elsewhere). I experience slight speed improvements with these changes. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7294 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-02-27PS3 controllers have some input elements with very large value fieldsSoren Jorvang
that cause IOHIDValueGetIntegerValue() to smash the stack when trying to convert them. In practice, all relevant axes seem to also be available as either 8 or 16-bit values, so just ignore anything that doesn't look like that (or a button). Fixes issue 3931. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7255 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-02-19Build fixes when using SDL 1.3 related to force feedback support, as ↵smelenchuk
suggested in issue #1338. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7199 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-02-03Fix the CMake build.Soren Jorvang
Prevent the PS3 HID crash until I can debug it. AudioUnits are enabled by default. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7052 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-30Guard against controller instances without any inputs.Soren Jorvang
Clean up OS X keyboard key names. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6985 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-30Enumerate identically named input devices.Soren Jorvang
Fixes issue 3929. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6984 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-28Fix OS X build.Soren Jorvang
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6951 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-27Various minor fixes to allow building with clang on OS X.Soren Jorvang
Fixes issue 3992. wxWidgets patch at http://trac.wxwidgets.org/ticket/12332 . git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6929 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-16Deal with "hat" switches.Soren Jorvang
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6863 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-15HID reports can use negative numbers.Soren Jorvang
Use UTF-8 for input device names and profile filenames. From8Bit->To8Bit is not transparent. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6857 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-14Accept arbitrary HID devices as gamepads instead of using SDL,Soren Jorvang
which has too narrow a view of what constitutes a joystick. Now if only I could find my Apple IR Remote.. :-) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6844 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-21Implement free look on linux. Patch due to artart78.Glenn Rice
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6638 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-16Fix the no gui cmake build.Glenn Rice
Add a version check for avcodec and swscale libraries. Fix a bug in the xlib wiimote emulation button configuration. If you are using a mouse button for wiimote emulation you may need to adjust your settings. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6426 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-13Simplify OpenCL compile-time detection on OS X.Soren Jorvang
Turn wiiuse io_osx.m into Objective-C++. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6398 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-19Made it easer to use mouse/keyboard and a gamepad together on the same ↵Jordan Woyak
emulated wiimote. Renamed mouse buttons from "Button N" to "Click N" so they do not conflict with gamepad buttons.(hopefully not too ugly, mouse buttons will need to be reconfigured) (Fixes issue 3363) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6289 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-12Temporarily re-enable SDL pad input on OS X.Soren Jorvang
Placeholder SConscript for VideoMerge plugin. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6272 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-12Moved WiimoteNew into Dolphin and eliminated the old wiimote plugin. Removed ↵Jordan Woyak
wiimote plugin support. Moved input dialog related InputUICommon stuff into DolphinWX. Removed now unused InputCommon files. UDPWiimote stuff is temporarily disabled until it is reorganized so Core won't depend on wx. Real wiimotes are now initialized on first need(wiimote diag open or game start) and left initialized until Dolphin exit.(maybe this will work better for Linux/OS X) (scons probably needs some fixes) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6270 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-11WiimoteNew: Made emulated wiimote return read error when motion plus ↵Jordan Woyak
register area is read.(Fixes "Sonic the Hedgehog 4" input, perhaps others) GCPad/WiimoteNew: Made DirectInput use the Dolphin window hwnd for SetCoopLevel instead of GetForegroundWindow.(attempt to fix issue where gamepads sometimes don't work until "Refresh" is pressed) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6269 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-09GCPad/WiimoteNew: Reordered some stuff in DirectInput device ↵Jordan Woyak
enumeration.(makes certain gamepads work now, hopfully doesn't break other pads) (Thanks to YoD for helping debug) Also fixed something ridiculous in the input config dialog. :p git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6264 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-03InputCommon(GCPad/WiimoteNew): Fixed issue when inifile didn't exist, ↵Jordan Woyak
defaults were loaded, and input didn't work. Fixed prob in DirectInput(hopefully doesn't break any other gamepads): buffered data wasn't ever being used. WiimoteNew: Hopefully made emulated swinging better(please comment). Added (completely untested) incomplete emulated turntable(DJ Hero) extension support :p. Deleted some files that I meant to delete in my last commit. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6250 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-18New Wiimote Plugin: Fix Emulated Wiimote Problem.(fixes issue 3230) Made the ↵Jordan Woyak
"Connected to X Wiimotes" text update on all tabs when clicking "Refresh"/"Pair Up". Some other cleanup. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6216 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-16New Wiimote Plugin: Added a real wiimote "Pair Up" button on Windows for the ↵Jordan Woyak
Microsoft bluetooth stack, like the old plugin. The PairUp function was copied from the old plugin and cleaned up. (Mostly untested because I'm not using the MS stack) Please test. Other minor changes to emu-wiimote and DInput. (Perhaps the "Refresh" button should call PairUp() followed by Refresh() to make the dialog simpler.) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6213 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-16ControllerInterface: DirectInput: Added support for Ramp and various ↵Jordan Woyak
Periodic force types. Only Constant forces were supported prior. (only partially tested due to lack of hardware) This may improve performance for those experiencing emulated wiimote slowdowns when using DInput rumble. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6212 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-02GCPad/Wiimote New (ControllerInterface): Some tweaks to the DirectInput ↵Jordan Woyak
code. (fix for a random gamepad which didn't work) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6159 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-29GCPad/Wiimote New: (OS X Config Dialog) Temporarily fix a crash when ↵Jordan Woyak
selecting an item in the device list (a current bug in wxWidgets with wxTE_PROCESS_ENTER). (Windows DirectInput) Hopefully made axis enumeration and the fall back to polled data(for drivers which don't support buffered data) simpler and more foolproof (a few users were having issues with a few specific gamepads). git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6143 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-26Gecko codes: Added parenthesis where they were needed.(thanks to glennrics ↵Jordan Woyak
and soren) Fixed a copy paste error with write & fill 8bit codes. Also forgot to remove a return false;.(some more codes should work (fixed issue 2968)) New Wiimote Plugin: Added emulated swinging.(seems to work) Changed the emulated calibration data to some nice values. ControllerInterface: moved and constified some stuff. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5980 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-22Prevent Python from stripping off the final newline of the main(){} Soren Jorvang
autoconfiguration tests. Some versions of gcc care enough about ANSI C to complain about this. Use the Linux install hierarchy conventions on other Unices as well. XKeysymToString returns NULL on unknown keysyms, which is not a valid std::string initializer. There appears to be some disagreement regarding the second parameter to iconv(). Some versions/installations have it as const, others don't. Unfortunately, due to wonderful C++ brain damage, implicit conversion from const to non-const doesn't work here. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5945 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-16Remove long-rotted vestiges of SDL video output.Soren Jorvang
Use SDL for input devices only on Windows and Linux. (Still globally enabled for the legacy Wiimote plugin.) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5886 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-16This is basicall linux code cleanup. We don not need to pass the X display ↵Glenn Rice
handle from the video plugin anymore. The wiimote plugins now open their own display handles, and the GUI uses the display handle of the main window frame. Only the window handle from the video plugin is needed. The pWindowHandle variable now passes this instead of the display handle. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5884 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-16New Wiimote Plugin: Moved Linux cursor position code into ↵Jordan Woyak
ControllerInterface/Xlib. (absolute cursor position can be mapped to something other than IR camera) (code fixed by Glennrics) Put the UDP Wiimote dialog's Update Buttons,Update IR,Update Nunchuk... checkboxes in an "Update" group box. Fixed some Linux config dialog problems. (thanks Glennrics again) Some other minor cleanup in ControllerInterface. (changed some std::string/stringstream to char[] where possible) Removed a warning in DX11 plugin. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5880 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-10GCPad/Wiimote New: Added a set defaults button to the config dialog. (gave ↵Jordan Woyak
new wiimote plugin a few default buttons, not done) Moved MSWindows cursor position code to ControllerInterface/DInput (plan on moving Linux's cursor code to Xlib as well). IR Up,Down,L,R now must have Cursor X/Y/-+ mapped for regular mouse control on Windows. (hopefully this isn't too confusing, the reset to default button automatically sets this up). Renamed One,Two,Minus,Plus to 12-+ (you will have to reconfigure these buttons, sorry). Added text labels for the button and trigger preview bitmaps. -other minor stuff. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5865 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-03New Wiimote Plugin: Added real wiimote support.(only tested on Windows, ↵Jordan Woyak
still a few probs: after refresh alt+F{5..8} x2 is needed) New Wiimote/GCPad: Re-merged Keyboard+Mouse for easier kb+mouse configuration, like before.(DirectInput doesn't support individual kb/mice anymore like I thought it did) Fixed some bugs and maybe leaks in GUI.(got rid of evil dynamic_cast) Renamed stuff from DirectInput to DInput, cause it's shorter and rhymes with XInput, I guess. (I remembered eol-style native, shuffle lost his job :P) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5822 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-26The ControllerInterface API has the notion of an "id" which is presumablySoren Jorvang
meant as a ideally persistent device instance number. In a dynamic environment such as when dealing with USB/bluetooth HID's, I am not sure how much sense such an id can make and it would probably be better to identify devices by an opaque blob (and a printable string). In any case, the OS X HID manager does not offer the illusion of a persistent integer instance identifier. A string in the form of the device's own name is not sufficient as on e.g. my Macbook Pro, there are three HID devices all bearing the name "Apple Internal Keyboard / Trackpad". For now, hijack the ControllerInterface id to mean the the HID usage page number. This at least separates keyboards and pointing devices, allowing the keyboard to be selected in the configuration dialog. Also some minor cleanup. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5793 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-22boring svn:eol-style native again...Shawn Hoffman
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5771 8ced0084-cf51-0410-be5f-012b33b47a6e