From: Florent Monnier <monnier.florent@gmail.com>
To: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
Cc: caml list <caml-list@inria.fr>
Subject: Re: [Caml-list] SDL2 bindings, testers and feedback welcome
Date: Thu, 19 Dec 2013 06:27:49 +0100 [thread overview]
Message-ID: <CAE1DttAtjZzzqUOwrbnNOKdMfZb6kCj4OLF1jVQH5biCahCmGQ@mail.gmail.com> (raw)
In-Reply-To: <CAE1DttAreRmH+18o4K27x37Ao+oCQ0X96+C+Z0Cry45BEwaPqg@mail.gmail.com>
2013/12/19, Florent Monnier wrote:
> 2013/12/17, Daniel Bünzli wrote:
>> * Testing the binding to the joystick/game controller/force feedback api,
>> I have none of these things in my hands.
[...]
> while running sdlevents.ml I can see logs in the console about key
> strokes events and mouse events, but nothing for the joypad.
[...]
with the following patch the logs then display events from the joypad:
================================================================
--- dbuenzli/tsdl-1904fb/test/sdlevents.ml
+++ dbuenzli/tsdl-JO/test/sdlevents.ml
@@ -20,6 +20,22 @@
match Sdl.create_window ~w:640 ~h:480 "SDL events" flags with
| `Error -> log_err " Create window:"
| `Ok w ->
+
+ begin match Sdl.num_joysticks () with
+ | `Error -> log_err " Num Joysticks:"
+ | `Ok nj ->
+ log " Num Joysticks: %d" nj;
+ for i = 0 to nj-1 do
+ match Sdl.joystick_open i with
+ | `Error -> log_err " Opening Joysticks %d:" i
+ | `Ok j ->
+ match Sdl.joystick_name j with
+ | `Error -> log_err " Getting name for joystick %d:" i
+ | `Ok jname ->
+ log " Joystick `%s` opened" jname
+ done;
+ end;
+
Sdl.start_text_input ();
let e = Sdl.Event.create () in
try
================================================================
i'll issue it on gh
--
Florent
next prev parent reply other threads:[~2013-12-19 5:27 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-17 6:11 Daniel Bünzli
2013-12-17 7:02 ` Anthony Tavener
2013-12-17 14:17 ` Florent Monnier
2013-12-17 15:14 ` Daniel Bünzli
2013-12-18 6:54 ` Erkki Seppala
2013-12-18 8:05 ` Anthony Tavener
2013-12-18 9:24 ` Daniel Bünzli
2013-12-18 8:18 ` Florent Monnier
2013-12-22 10:01 ` Kakadu
2013-12-30 13:28 ` Vu Ngoc San
2013-12-17 17:05 ` Ashish Agarwal
2013-12-17 17:47 ` Daniel Bünzli
2013-12-17 18:57 ` Ashish Agarwal
2013-12-17 19:45 ` Anthony Tavener
2013-12-18 15:40 ` Ashish Agarwal
2013-12-18 18:02 ` Yotam Barnoy
2013-12-18 19:53 ` Daniel Bünzli
2013-12-18 22:29 ` Ashish Agarwal
2013-12-18 22:45 ` Daniel Bünzli
2013-12-17 20:26 ` Daniel Bünzli
2013-12-18 1:13 ` Francois Berenger
2013-12-18 6:44 ` Erkki Seppala
2013-12-18 9:21 ` Daniel Bünzli
2013-12-19 1:11 ` Florent Monnier
2013-12-19 6:39 ` Florent Monnier
2013-12-17 19:29 ` Erkki Seppala
2013-12-19 5:20 ` Florent Monnier
2013-12-19 5:27 ` Florent Monnier [this message]
2013-12-19 7:13 ` Daniel Bünzli
2013-12-19 12:38 ` Florent Monnier
2014-02-12 10:43 ` Daniel Bünzli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAE1DttAtjZzzqUOwrbnNOKdMfZb6kCj4OLF1jVQH5biCahCmGQ@mail.gmail.com \
--to=monnier.florent@gmail.com \
--cc=caml-list@inria.fr \
--cc=daniel.buenzli@erratique.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox