Commit Graph

13 Commits

Author SHA1 Message Date
Unknown W. Brackets
bfd86e4999 Windows: Make InputDevice destructor virtual. 2021-02-14 10:30:10 -08:00
Silent
0b5458f759
Remove KeyboardDevice which was essentially useless
Refactor InputDevice to simplify it
2019-07-02 19:17:52 +02:00
Unknown W. Brackets
9e390510df Remove legacy InputState. 2017-03-14 22:07:07 -07:00
Unknown W. Brackets
cf88c7ff67 Add an option to ignore gamepads when not focused. 2015-02-28 14:02:03 -08:00
Unknown W. Brackets
b641ced7e0 Poll controllers on a separate thread on Windows.
This means controllers will sample more than the game fps, and will work
whenever keyboards do.
2014-03-23 23:46:10 -07:00
Henrik Rydgard
cc58e34cf8 Remove legacy key mapping and associate devices with keys (DInput has been left behind for now, will be fixed up soon). Saving is broken, will be fixed soon. 2013-07-06 20:45:44 +02:00
Unknown W. Brackets
dcd2c26214 Treat the keyboard and pads differently.
We basically never want two pads active at once, but keyboard is
different.  So, they need to be treated differently.

Fixes #1212.
2013-04-07 18:42:23 -07:00
Henrik Rydgard
09d1f3c1fa win: Fix X360 button problems by skipping DInput if there's a 360 pad available. 2013-04-01 20:15:16 +02:00
Henrik Rydgard
0eda1a8fe5 Show bg and icon on pause screen. 2013-03-31 01:04:46 +01:00
Henrik Rydgard
afa21588d7 Some work towards better control handling, includes stickyfix from native 2013-03-30 23:55:28 +01:00
Diogo Franco (Kovensky)
6108e36ae9 Several fixes to build under stricter C++11
Add missing #include to various files.

strings.h isn't provided by MSVC so we don't include it there; it's needed
for other OSes/compilers.

Get rid of pre-ISO-C malloc.h includes; malloc is provided by stdlib.h.

Fixes some linuxisms.

Prepend __builtin_ to __clear_cache, calling it without the prefix is a
GNU extension.
2012-11-21 14:33:50 -03:00
Diogo Franco (Kovensky)
7e7e9a0452 Add a class for keyboard input
Removes the windows-specific hack from sceCtrl
to read keyboard input and instead add a hack to
PPSSPPWindows.

The input mapping is still hardcoded and is the same
as it was in sceCtrl.

Add an std::list to WindowsHost that, curretly, contains
a hardcoded list of preferred `InputDevice`s. Devices
are tried in-order until one of them reports success.
Xinput is preferred over Keyboard. Keyboard always
returns success. Pointers are stored in the std::list
for polymorphism.

Change XinputDevice to report failure as soon as a
device can't be queried, instead of only a frame later.
2012-11-12 17:49:40 +00:00
Diogo Franco (Kovensky)
2210b19244 Xinput input support
Picks the first Xinput device available, waits 100 frames between
retries when no devices are available.

Controls are hardcoded so every x360 controller button corresponds
to the PSP button in the same physical position. Input from right
stick and from analog triggers is ignored.

The Xinput code though is overriden by SampleControls' hardcoded
keyboard input. XinputDevice was tested to work with
samples/controller/basic when SampleControls is disabled.
2012-11-12 17:40:01 +00:00