#
ab176368 |
|
03-Jun-2011 |
Michael Lotz <mmlr@mlotz.ch> |
* Replace the fixed size extended_joystick structure with a variably sized one inside BJoystick. * Add joystick_module_info flag to communicate support for variably sized reads. * The variably sized data structure is set up to describe either the actual amount of data, when variably sized reads are supported by the driver, or it is set up so that it exactly matches the data layout of the extended_joystick structure. This allows us to support both as input data, while only needing to care about a single format inside BJoystick. Convenience pointers allow the data to be retrieved without additional overhead or extra logic. * Add some sanity checks and ensure some boundaries when dealing reading data from the variably sized structure (as there might not be any buttons, hats, axis at all now). * Ensure that the extended_joystick structure doesn't change in size due to padding by making it _PACKED (it wasn't padded though). This is still supposed to work exactly as before. However, it opens up the possibility to actually support arbitrary controllers with arbitrary axis, hat and button counts. It therefore allows to actually deliver what the BJoystick API was designed to handle all along. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41885 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4b5bcc66 |
|
03-Jun-2011 |
Michael Lotz <mmlr@mlotz.ch> |
Introduce a BJoystick::GetButtonValues() function that aligns with the other Get*Values() functions but retrieves an arbitrary amount of button states using a boolean array. This overcomes the 32 button limitation on the API side. Right now the function does simply set the first 32 states from the button bitmap, as the BJoystick to driver interface hasn't been adapted yet. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41882 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
bb2420a4 |
|
03-Jun-2011 |
Michael Lotz <mmlr@mlotz.ch> |
Remove two unimplemented private functions. Since their signature was changed already anyway (as compared to the original BeOS ones) this won't introduce any missing symbols. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41879 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1147fabd |
|
02-Jun-2011 |
Michael Lotz <mmlr@mlotz.ch> |
Move function definitions to match their declaration order. Also move some declarations to group them more logically. No functional changes. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41878 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
464e0351 |
|
02-Jun-2011 |
Michael Lotz <mmlr@mlotz.ch> |
* Add a BJoystick::RescanDevices() public function. It allows the BJoystick to be updated with newly plugged in devices without the need to recreate a BJoystick object. * Do an initial (re-)scan on object creation instead of always scanning in CountDevices() and by extension GetDeviceName(). * This makes CountDevices() and GetDeviceName() stable with regards to the device list, so that an enumerating application doesn't suddenly get more/less devices than it might expect. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41870 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ef13dbda |
|
30-May-2011 |
Michael Lotz <mmlr@mlotz.ch> |
* Actually implement the relevant parts of BJoystick, i.e. reading the joystick info and values. Inspired by and in parts based on the patch by caz_haiku in ticket #7429 (though rewritten completely due to the other changes). Thanks for the pointers! * Clean up the mixup of internal joystick info and the one from joystick_driver.h so that BJoystick and the drivers talk about the same structures. * Extensive coding style cleanup, simplifications, NULL checks, early returns, std::nothrow allocations, include sorting, argument naming, ... that kind of stuff. * Added some TODO notes for remaining stuff. * Automatic (and manual) whitespace cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41849 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6e6b0851 |
|
11-Oct-2009 |
Axel Dörfler <axeld@pinc-software.de> |
* Applied (cleaned up) patch by Stefano to fix bug #4742. * Note while this fixed running BeOS apps using BJoystick, it breaks all apps (and SDL) that have been compiled for Haiku R1/alpha1. It's really bad that r27171 went through unnoticed. We should really try harder next time (and try to get the ABI change detection script working in an automated way). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33520 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b48e7fc8 |
|
12-Sep-2009 |
Rene Gollent <anevilyak@gmail.com> |
Fix Device Kit build in debug mode. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33110 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ab83d3e9 |
|
28-Aug-2009 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Rewrote Joystick.h and DigitalPort.h git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32791 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4cc3ec9f |
|
23-Oct-2008 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Moved _joystick_info definition to JoystickTweaker.h, since there is no point to keep it public. Removed default parameter in the second version of Open(), otherwise the two functions can't be used unambiguously. Should fix bug #2904 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28291 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
88b05467 |
|
23-Aug-2008 |
Fredrik Modeen <fredrik@modeen.se> |
Code cleanup git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27171 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8f38768e |
|
11-Aug-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Don't define DEBUG in public headers!!! Doing it this way will break the build for others, namely those that also include <Debug.h> * This fixes the remaining problems of building Pe under Haiku. * Those files need a giant style cleanup... Fredrik, time to have a look at our style guide :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26931 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
cf859ccc |
|
03-Aug-2008 |
Fredrik Modeen <fredrik@modeen.se> |
Some small updates to joystick.h git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26763 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f6e4cbb9 |
|
15-Oct-2007 |
Axel Dörfler <axeld@pinc-software.de> |
* Rewrote BeBuild.h which had "a few" consequences (got rid of all those class definitions). * Minor cleanup here and there. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
30410560 |
|
10-Aug-2002 |
beveloper <beveloper@nowhere.fake> |
Adding only those device kit headers that are required by libdevice.so Taken from headers-src.tgz from ftp.be.com git-svn-id: file:///srv/svn/repos/haiku/trunk/current@692 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ab1763688ff174338630285826b8af0043d0f2e9 |
|
03-Jun-2011 |
Michael Lotz <mmlr@mlotz.ch> |
* Replace the fixed size extended_joystick structure with a variably sized one inside BJoystick. * Add joystick_module_info flag to communicate support for variably sized reads. * The variably sized data structure is set up to describe either the actual amount of data, when variably sized reads are supported by the driver, or it is set up so that it exactly matches the data layout of the extended_joystick structure. This allows us to support both as input data, while only needing to care about a single format inside BJoystick. Convenience pointers allow the data to be retrieved without additional overhead or extra logic. * Add some sanity checks and ensure some boundaries when dealing reading data from the variably sized structure (as there might not be any buttons, hats, axis at all now). * Ensure that the extended_joystick structure doesn't change in size due to padding by making it _PACKED (it wasn't padded though). This is still supposed to work exactly as before. However, it opens up the possibility to actually support arbitrary controllers with arbitrary axis, hat and button counts. It therefore allows to actually deliver what the BJoystick API was designed to handle all along. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41885 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4b5bcc668412cfa0cdbaf600fdb5bc082c32e2d6 |
|
03-Jun-2011 |
Michael Lotz <mmlr@mlotz.ch> |
Introduce a BJoystick::GetButtonValues() function that aligns with the other Get*Values() functions but retrieves an arbitrary amount of button states using a boolean array. This overcomes the 32 button limitation on the API side. Right now the function does simply set the first 32 states from the button bitmap, as the BJoystick to driver interface hasn't been adapted yet. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41882 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
bb2420a47472560ac4035c77035ce1b9e373d009 |
|
03-Jun-2011 |
Michael Lotz <mmlr@mlotz.ch> |
Remove two unimplemented private functions. Since their signature was changed already anyway (as compared to the original BeOS ones) this won't introduce any missing symbols. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41879 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1147fabd67979ebdaad88ec6bed718a555816083 |
|
02-Jun-2011 |
Michael Lotz <mmlr@mlotz.ch> |
Move function definitions to match their declaration order. Also move some declarations to group them more logically. No functional changes. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41878 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
464e0351d3a6f9b75f06e90111754fc183684b11 |
|
02-Jun-2011 |
Michael Lotz <mmlr@mlotz.ch> |
* Add a BJoystick::RescanDevices() public function. It allows the BJoystick to be updated with newly plugged in devices without the need to recreate a BJoystick object. * Do an initial (re-)scan on object creation instead of always scanning in CountDevices() and by extension GetDeviceName(). * This makes CountDevices() and GetDeviceName() stable with regards to the device list, so that an enumerating application doesn't suddenly get more/less devices than it might expect. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41870 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ef13dbda922b4cf26edc3d0bd5ca665e801c6b9d |
|
30-May-2011 |
Michael Lotz <mmlr@mlotz.ch> |
* Actually implement the relevant parts of BJoystick, i.e. reading the joystick info and values. Inspired by and in parts based on the patch by caz_haiku in ticket #7429 (though rewritten completely due to the other changes). Thanks for the pointers! * Clean up the mixup of internal joystick info and the one from joystick_driver.h so that BJoystick and the drivers talk about the same structures. * Extensive coding style cleanup, simplifications, NULL checks, early returns, std::nothrow allocations, include sorting, argument naming, ... that kind of stuff. * Added some TODO notes for remaining stuff. * Automatic (and manual) whitespace cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41849 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6e6b0851ca338f3e14664db2f06f2348dcafb23b |
|
11-Oct-2009 |
Axel Dörfler <axeld@pinc-software.de> |
* Applied (cleaned up) patch by Stefano to fix bug #4742. * Note while this fixed running BeOS apps using BJoystick, it breaks all apps (and SDL) that have been compiled for Haiku R1/alpha1. It's really bad that r27171 went through unnoticed. We should really try harder next time (and try to get the ABI change detection script working in an automated way). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33520 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b48e7fc84238b8e955d11934875ead8aa088f13c |
|
12-Sep-2009 |
Rene Gollent <anevilyak@gmail.com> |
Fix Device Kit build in debug mode. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33110 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ab83d3e93214227a4bfb368c96c69141518943de |
|
28-Aug-2009 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Rewrote Joystick.h and DigitalPort.h git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32791 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4cc3ec9fddb82a76cea81c0704881074254a79e9 |
|
23-Oct-2008 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Moved _joystick_info definition to JoystickTweaker.h, since there is no point to keep it public. Removed default parameter in the second version of Open(), otherwise the two functions can't be used unambiguously. Should fix bug #2904 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28291 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
88b054673088991cb8d512346ffe991cb5b1e274 |
|
23-Aug-2008 |
Fredrik Modeen <fredrik@modeen.se> |
Code cleanup git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27171 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8f38768e656e5abd6efdf3fd57b3273ce420d22f |
|
11-Aug-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Don't define DEBUG in public headers!!! Doing it this way will break the build for others, namely those that also include <Debug.h> * This fixes the remaining problems of building Pe under Haiku. * Those files need a giant style cleanup... Fredrik, time to have a look at our style guide :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26931 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
cf859cccf6a18b733f24b83fb69edc8832a84597 |
|
03-Aug-2008 |
Fredrik Modeen <fredrik@modeen.se> |
Some small updates to joystick.h git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26763 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f6e4cbb95290a74b33d012600438b84742b0e572 |
|
15-Oct-2007 |
Axel Dörfler <axeld@pinc-software.de> |
* Rewrote BeBuild.h which had "a few" consequences (got rid of all those class definitions). * Minor cleanup here and there. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
3041056043f274853e0170eec8ab5de5216d16bc |
|
10-Aug-2002 |
beveloper <beveloper@nowhere.fake> |
Adding only those device kit headers that are required by libdevice.so Taken from headers-src.tgz from ftp.be.com git-svn-id: file:///srv/svn/repos/haiku/trunk/current@692 a95241bf-73f2-0310-859d-f6bbb57e9c96
|