with the BJoystick requirements:
* Make the Read() non-blocking. This is required as BJoystick is a polling
interface. A single current state is used that is updated by a separate thread
on report arrival. The thread is spawned as soon as the ProtocolHandler is
opened for the first time (and quit at the first wait return after the
ProtocolHandler is closed). With this we can simply return the current state
on read.
* Remove the ring buffer as it was not needed in the first place. This also
happens to solve the problem of sharing a JoystickProtocolHandler. Before,
concurrent reads would queue up the same result multiple times in the ring
buffer and then return stale data on the next update.
Solves most of #7629.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41865 a95241bf-73f2-0310-859d-f6bbb57e9c96
ever wait for reports on demand, there's no need for buffering at all.
This removes some unnecessary copying and ring buffer overhead, the ring buffer
will now in fact not be created at all.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41864 a95241bf-73f2-0310-859d-f6bbb57e9c96
the BJoystick API and joystick drivers.
* Also fix a few warnings in the code that were caused by using NULL instead of
0 for BWindow/BView flags.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41852 a95241bf-73f2-0310-859d-f6bbb57e9c96
This includes input scaling, so the resulting input ranges should always match
the ones of the BJoystick data (hence no calibration should be required).
* It supports joysticks, gamepads and multi-axis controllers. I've only tested
it with a Microsoft SideWinder Gamepad Pro so far, which now works as expected
with stickit.
* Fixes#7429.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41851 a95241bf-73f2-0310-859d-f6bbb57e9c96
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
is loaded. SMTP and POP still have this problem! TODO: use the ServerConnection class in these add-ons too.
This would also remove a lot of #ifdef SSL form these add-ons. Will not do it in the near future, feel free to fix it
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41840 a95241bf-73f2-0310-859d-f6bbb57e9c96
when mimset didn't run yet. This obviously cleans up after a change that I
did, thanks a lot!
* This closes bug #7595.
* Also took the opportunity to clean up a bit more in this regard, and fixed a
few coding style violations.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41837 a95241bf-73f2-0310-859d-f6bbb57e9c96
of returning B_ERROR to the ProtocolHandler base class. Not used yet, but will
be used for the BJoystick <-> JoystickProtocolHandler.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41835 a95241bf-73f2-0310-859d-f6bbb57e9c96
* move all the isw... functions from wchar.h to wctype.h (just following version 7
of the POSIX base specs)
* remove all declarations from wchar.h that are in wctype.h, too
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41832 a95241bf-73f2-0310-859d-f6bbb57e9c96
option string: FreeBSD's stat command line don't use %s format specifier for
file size. Instead, %s specifier is unused at all and they goes with %z.
For file Zize, I guess...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41830 a95241bf-73f2-0310-859d-f6bbb57e9c96
the -c/--format option which is unsupported on this platform.
Add a fallback, which should fix#7613.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41829 a95241bf-73f2-0310-859d-f6bbb57e9c96
Remove extra ssl lock, there is already one in ssl.
This fixes#7574. I have seen this or a similar bug before and it was quit reproduceable, now it seems to be fixed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41828 a95241bf-73f2-0310-859d-f6bbb57e9c96
correct semantics. I expected that the looper is dead when SendMessage returned. This should fix#7559 where the looper
destructor has to be called before continuing the cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41821 a95241bf-73f2-0310-859d-f6bbb57e9c96
it's taken from freebsd driver e1000 r221505
This include alot of cards (including my HP)
I had to "remove" som parts. led was the easiest part. All code shoulc have haiku in them
The part below was perhaps needed but I could not fix the error that whas showing (located in if_em.c) aslo it works as is on my HP 8540.
static int
em_sysctl_reg_handler(SYSCTL_HANDLER_ARGS)
{
struct adapter *adapter;
u_int val;
adapter = oidp->oid_arg1;
val = E1000_READ_REG(&adapter->hw, oidp->oid_arg2);
return (sysctl_handle_int(oidp, &val, 0, req));
}
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41815 a95241bf-73f2-0310-859d-f6bbb57e9c96
To note, the reduction of block size from 2048 to 1024 was not applied.
Introduced a new build variable HAIKU_STRIP_DEBUG_FROM_OPTIONAL_PACKAGES,
which will allow users to enable/disable that functionality. In the
alpha-* and nightly-* profiles, it is enabled. Reduced the image size
for alpha-* to 690M. The size for nightly images was left untouched.
+alpha3
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41812 a95241bf-73f2-0310-859d-f6bbb57e9c96
it's not really worth the effort.
* Added missing libstdc++ to the build.
* This fixes the GCC4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41803 a95241bf-73f2-0310-859d-f6bbb57e9c96
handle the different device classes. Handlers are now added based on the
application collections that the HID descriptor describes instead of by
enumerating the different report items inside the reports. This means that a
device is now logically treated as a mouse when it comes with an application
collection that designates it as a mouse, instead of when there is a report
that contains an X and a Y axis. This resolves the conflicts that gamepads
and joysticks were added as mice due to them containing such elements. This
therefore fixes#4499 and opens up the way to properly handle other device
types like joysticks (#7429), gamepads, tablets (#7354, #5989 and #7481) and
so on. I'll work on gamepads/joysticks next and see where we stand for tablets
later.
* Added a few enumeration functions to HIDCollection to support the above.
* Fix the root collection handling. A device doesn't describe a single root
collection and then adds everything as a child. Instead it just has multiple
collections on level 0. We account for that now by always creating an empty
logical collection as the root collection where all the collections of the
descriptor get added.
* Rename the {Mouse|Keyboard}Device.{cpp|h} to
{Mouse|Keyboard}ProtocolHandler.{cpp|h} as that more clearly describes their
purpose. These classes are protocol handlers, i.e. they handle the ioctl based
mouse and keyboard protocol between the driver and the input_server add-ons.
* Change a lot of stuff to use references instead of pointers where it makes
sense (not necessarily complete yet).
I've tested this successfully on a keyboard with extended keys, a combo device
with a keyboard with extended keys and a mouse, a mouse and a gamepad (that now
doesn't do anything anymore) and found no regressions. However, since there are
a lot of very varied ways how to describe such functions with HID, it's not too
unlikely that some more curiously described devices will now stop working. These
have to be handled case by case and their usages have to be added to the added
to the appropriate handlers (or new handlers have to be written). Please test
and create bug reports (preferrably including the report descriptor that is
written out to /tmp).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41794 a95241bf-73f2-0310-859d-f6bbb57e9c96