Commit Graph

39507 Commits

Author SHA1 Message Date
Michael Lotz 5052c5b678 Make adjustments to the JoystickProtocolHandler so that it works in accordance
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
2011-06-02 00:56:18 +00:00
Michael Lotz 23249681ab Since we never actually read more than one mouse_movement at a time and we only
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
2011-06-01 23:34:03 +00:00
Ryan Leavengood 4787582ad1 Add zuMi's Shortcuts icon. Thanks for the suggestion diver.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41863 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-01 21:37:34 +00:00
Scott McCreary 53592f6036 Added new gcc2 and gcc4 OptionalPackages for FRiSS, fixed some more typos.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41862 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-01 20:44:07 +00:00
Alexander von Gluck IV eb1b3e422f implement AtomBios CailRead/WriteFBData callbacks
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41860 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-01 18:34:13 +00:00
Alexander von Gluck IV 3fcaf0d61c remove unneeded orphan function declaration for AllocateFB
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41859 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-01 14:55:40 +00:00
Alexander von Gluck IV 057f5d1d50 GCC2 build fixes on radeon_hd driver
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-01 14:39:15 +00:00
Scott McCreary 4d0944c90d Updated KeymapSwitcher OptionalPackages for gcc2 and gcc4 alpha3, built by S.Zharski
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41857 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-31 22:10:11 +00:00
Scott McCreary 22d447acdc Updated gcc2 Ruby OptionalPackage for alpha3.
+alpha3


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-31 19:37:45 +00:00
Joachim Seemer 5719d5c9d6 Added LanguageFlags.rdef with the Esperanto flag data. Now Axel can play with it, see #7614. Thanks.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41854 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-31 17:12:10 +00:00
Joachim Seemer 547a76feb5 Removed the Esperanto flag again from the rdef, as it's not country, as correctly pointed out by Axel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41853 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-31 15:45:41 +00:00
Michael Lotz f202fdc6ed * Add Jamfiles to allow building the stickit sample code. It allows testing of
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
2011-05-31 02:33:28 +00:00
Michael Lotz f46bc7f19e * Add a JoystickProtocolHandler to usb_hid that supports the BJoystick protocol.
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
2011-05-31 02:21:05 +00:00
Michael Lotz 10a1a81d02 Also clear the sign extension when not changing signedness, as otherwise we'll
overwrite the values with the sign extension.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41850 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-31 02:09:10 +00:00
Michael Lotz ef13dbda92 * 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
2011-05-31 02:05:39 +00:00
Scott McCreary 331a968c65 Updated bepdf OptionalPackage for alpha3, moved licenses into to .OptionalPackageDescription file instead of OptionalPackages.
+alpha3


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41848 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-31 00:10:54 +00:00
Michael Lotz 6d551ee44f Also take the unsigned -> signed conversion into account.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 22:31:59 +00:00
Jérôme Duval 2925a66e80 revert r41842
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41845 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 22:17:56 +00:00
Clemens Zeidler 3b0616a46b Add more random into the SSL seed. Thanks Axel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41844 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 21:50:13 +00:00
Michael Lotz d75a906285 Add a ScaledData() getter that scales the data to the desired bit width and
converts the signed-ness as specified.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41843 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 21:45:10 +00:00
Jérôme Duval e761436dee Also enables the Initialize menu when the partition is also a device: Hopefully should fix #7572.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 21:42:35 +00:00
Clemens Zeidler a4710c0d46 Move ServerConnection class from the IMAP add-on to libmail.so. This avoids to init SSL each time an IMAP add-on
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
2011-05-30 21:36:06 +00:00
Axel Dörfler 3feabba6d9 * Applied patch by idefix that fixes IDE. Nah, that fixes launching BootManager
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
2011-05-30 21:17:10 +00:00
Michael Lotz b5274bc4f6 Pass read and write calls to the protocol handlers as well, moving the default
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
2011-05-30 19:53:14 +00:00
Jérôme Duval 6ec9dff3f3 ppc build fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41834 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 19:51:45 +00:00
Ingo Weinhold ad63c6796c Improved debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41833 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 18:48:10 +00:00
Oliver Tappe d9a26469df Fix #6969 (hopefully for real this time):
* 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
2011-05-30 18:44:22 +00:00
Joachim Seemer 1838417186 Added flag for Esperanto. Updated CountryFlags.rdef. Thanks dejam for noticing. Fixes #7614.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 17:56:46 +00:00
Philippe Houdoin d28b0b06d0 Of course, when incomptability kick in, it's never limited only to
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
2011-05-30 13:31:56 +00:00
Philippe Houdoin c3510ace83 When building floppy boot image on FreeBSD, the stat command line fail on
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
2011-05-30 09:52:08 +00:00
Clemens Zeidler b58ab52cd6 SSL should be thread safe (right?) but SSL_library_init function and SSL_load_error_strings are not, or they should be called only once...
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
2011-05-30 05:46:10 +00:00
Scott McCreary 9b2b1098ae Updated libsdl-1.2.14 to 1.2-hg which contains several fixes for Haiku.
+alpha3


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41827 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 05:29:13 +00:00
Clemens Zeidler 4b4ae23e28 Workaround for #7575. There seems to be something fishy in the regex. Could somebody with experience in re_search check what
the real problem is?



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41826 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 04:16:31 +00:00
Clemens Zeidler 389f3fe159 Add a simple test just to check that the synchronous quit request does not crash.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41824 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-29 22:47:23 +00:00
Clemens Zeidler f47952f723 If the looper is B_QUIT_REQUESTED synchronously. First quit and then send the reply message. Please check if this is the
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
2011-05-29 22:43:50 +00:00
Matt Madia c188658c85 Fixed the build for operating systems that are not Haiku.
Spotted by luroh. Patched by augiedoggie. Fixes #7607.
+alpha3


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-29 22:38:35 +00:00
Oliver Tappe 38f67a9da3 Update ICU packages for r1a3.
+alpha3

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-29 22:10:41 +00:00
Clemens Zeidler 806c3afaf6 Fix test app build and adjust the app path to the jam output directory.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-29 21:41:11 +00:00
Fredrik Modeen 981bdb5af9 Hope I fix more than I breake with this update of ipro1000
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
2011-05-29 19:27:05 +00:00
Matt Madia b8c41a1ad8 Applied a patch by Ingo, to strip the debug info from optional packages.
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
2011-05-29 18:02:21 +00:00
Axel Dörfler 105fd85c3a * Removed TypedGroupListModel - without GCC2's covariant return type handling,
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
2011-05-29 08:17:27 +00:00
Scott McCreary cb23dea57a Updated bepdf OptionalPackage for alpha3.
+alpha3


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41802 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-29 07:36:21 +00:00
Alexandre Deckner d797e0629c * Return a zero width and empty destination string when there's no destination dir. Fixes #7462 +alpha3
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41801 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-29 01:05:18 +00:00
Siarzhuk Zharski 63d46f24e2 Belarusian Localization files updated from HTA.
+alpha3



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41799 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-28 22:46:12 +00:00
Michael Lotz 305aff3f78 * Changed the way how devices are enumerated and protocol handlers are added to
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
2011-05-28 19:59:02 +00:00
Alexander von Gluck IV 3035edeb39 add Radeon HD2600 PCIID, Thanks Benjamin A!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41792 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-28 16:29:16 +00:00
Clemens Zeidler bef39d09af Make the app test suite partial compile again (gcc4). Commented out the cursor and message tests because I was not sure how to fix it. The UnitTester fails to load the addon, though. It can't get the symbol from the lib, any idea?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41788 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-28 07:16:21 +00:00
Scott McCreary d6497b0619 Roll back previous change since the new icu packages have 229 files and the old ones only had 8.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41784 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-27 22:45:43 +00:00
Scott McCreary 31327d3a86 Rebuilt icu gcc2 and gcc4 OptionalPackages, and armyknife gcc2 package for alpha3.
+alpha3


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41783 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-27 22:34:52 +00:00
Axel Dörfler 48ae3e3808 * Followed Ingo's suggestion, and added a BWindow::Layout() method.
* Changed ShowImage to use that function.
+alpha in case Ingo gives his okay :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41782 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-27 22:21:59 +00:00