Allegro: make keyboards work.

* This may come in useful.

Fixes http://ports.haiku-files.org/ticket/579.
This commit is contained in:
Adrien Destugues
2015-11-12 23:08:29 +01:00
parent 98185482c2
commit edb4d73fdb
2 changed files with 62 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ HOMEPAGE="http://alleg.sourceforge.net/"
COPYRIGHT="1998-2010 Shawn Hargreaves et al."
LICENSE="Allegro"
REVISION="2"
SOURCE_URI="http://sourceforge.net/projects/alleg/files/allegro/4.4.2/allegro-4.4.2.tar.gz/download"
SOURCE_URI="http://sourceforge.net/projects/alleg/files/allegro/4.4.2/allegro-4.4.2.tar.gz"
CHECKSUM_SHA256="1b21e7577dbfada02d85ca4510bd22fedaa6ce76fde7f4838c7c1276eb840fdc"
PATCHES="allegro-4.4.2.patchset"

View File

@@ -1,4 +1,4 @@
From 77ba77a7ef990fe61c8e2f9674e6d61183660c08 Mon Sep 17 00:00:00 2001
From dd7f77dd640f2e3305f3af2e6a91c2b6dacfc632 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sat, 30 Nov 2013 12:14:54 +0100
Subject: Import Allegro 4.4.1.1 fixes that were not upstreamed.
@@ -73,10 +73,10 @@ index c6e4dad..a7c9d46 100644
* not started from a terminal.
*/
--
1.8.3.4
2.2.2
From 3600b5bd60d00734b54c270485f63a97e1dbad18 Mon Sep 17 00:00:00 2001
From 6f2c9d6d41abe0588c25757fae58f5656b153709 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Thu, 25 Sep 2014 11:09:14 +0200
Subject: Hack install dirfor binaries.
@@ -118,5 +118,62 @@ index 170c3b4..572317e 100644
#-----------------------------------------------------------------------------#
--
1.8.3.4
2.2.2
From 55918d6a59c3bbf710303e41f7919915ea5b0777 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Thu, 12 Nov 2015 23:02:46 +0100
Subject: Remove useless check of the keyboard id
* Why not accept different keyboard types?
diff --git a/src/beos/bkeyapi.cpp b/src/beos/bkeyapi.cpp
index 302f353..74a672f 100644
--- a/src/beos/bkeyapi.cpp
+++ b/src/beos/bkeyapi.cpp
@@ -26,8 +26,6 @@
#error something is wrong with the makefile
#endif
-#define KEY_ID_PC101 0 // the docs say it should be 0x83ab, but they lie
-
#define KEY_SEMAPHORE_NAME "keyboard driver waiting..."
#define KEY_THREAD_PERIOD 33333 // microseconds, 1/30th of a second
@@ -44,8 +42,6 @@
#define PREFIX_W "al-bkey WARNING: "
#define PREFIX_E "al-bkey ERROR: "
-static uint16 keyboard_id = (uint16)(-1);
-
static volatile int keyboard_thread_running = FALSE;
static thread_id keyboard_thread_id = -1;
@@ -299,14 +295,6 @@ extern "C" int be_key_init(void)
_pckeys_init();
- if (get_keyboard_id(&keyboard_id) == B_ERROR) {
- goto cleanup;
- }
-
- if (keyboard_id != KEY_ID_PC101) {
- goto cleanup;
- }
-
waiting_for_input = create_sem(0, "waiting for input...");
if (waiting_for_input < B_NO_ERROR) {
@@ -363,8 +351,6 @@ extern "C" void be_key_exit(void)
delete_sem(waiting_for_input);
waiting_for_input = -1;
}
-
- keyboard_id = (uint16)(-1);
}
--
2.2.2