From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 7A1DF7EC6E for ; Thu, 19 Dec 2013 06:27:50 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of monnier.florent@gmail.com) identity=pra; client-ip=209.85.212.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="monnier.florent@gmail.com"; x-sender="monnier.florent@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of monnier.florent@gmail.com designates 209.85.212.176 as permitted sender) identity=mailfrom; client-ip=209.85.212.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="monnier.florent@gmail.com"; x-sender="monnier.florent@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wi0-f176.google.com) identity=helo; client-ip=209.85.212.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="monnier.florent@gmail.com"; x-sender="postmaster@mail-wi0-f176.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqMCAJuDslLRVdSwlGdsb2JhbABZg0NVuR2BCwgWDgEBAQEHCwsJEiqCJQEBAQQnGQEbHQEDDAYFCw0uIgERAQUBHAYbh2cBAxGlGIxagwmNewoZJw1khhgRAQUMjlMzB4Q2BJgWgTCOdxgphFg7 X-IPAS-Result: AqMCAJuDslLRVdSwlGdsb2JhbABZg0NVuR2BCwgWDgEBAQEHCwsJEiqCJQEBAQQnGQEbHQEDDAYFCw0uIgERAQUBHAYbh2cBAxGlGIxagwmNewoZJw1khhgRAQUMjlMzB4Q2BJgWgTCOdxgphFg7 X-IronPort-AV: E=Sophos;i="4.95,512,1384297200"; d="scan'208";a="41660435" Received: from mail-wi0-f176.google.com ([209.85.212.176]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 19 Dec 2013 06:27:50 +0100 Received: by mail-wi0-f176.google.com with SMTP id hq4so6329526wib.15 for ; Wed, 18 Dec 2013 21:27:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=TJBEgKLyOUsMC0rC7EmDneTVXnDT5tyeR3jfpr2Nou0=; b=nmTaN6rVTx2SsyjoJnZx44jN8Kl0jIoxkA7padWkVlbka3W8uZI9/vRACfAJ/sO/vk NlpbxMIix57CJJIuaIoHcZryT6kYSFYrCNw+KXHUFkKegFIptlxzIIA2raECA+ulc40l pqVUBEKnt7aahMNFh2vOwQQJ+reEqs/K2Tnew/2uhdhpJuIRsV7cZdk34x4E9vRKSMhu OL13d7ELaFe6L5vJY3NTxunrSiDuYo3BiurtoY6Dg3XPlQz1WCA+A4EoCWh5Hrg2tfYy xl453htQBFQiZSMLdd1ScUB6+muImKKyClm0m2m8pw30m9GaaYIgO5xF3NSGIzkilZB6 lJSA== MIME-Version: 1.0 X-Received: by 10.180.207.239 with SMTP id lz15mr669736wic.28.1387430869372; Wed, 18 Dec 2013 21:27:49 -0800 (PST) Received: by 10.194.77.110 with HTTP; Wed, 18 Dec 2013 21:27:49 -0800 (PST) In-Reply-To: References: <4DDEBB7487B641C0834F09D522EA9918@erratique.ch> Date: Thu, 19 Dec 2013 06:27:49 +0100 Message-ID: From: Florent Monnier To: =?ISO-8859-1?Q?Daniel_B=FCnzli?= Cc: caml list Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Validation-by: monnier.florent@gmail.com Subject: Re: [Caml-list] SDL2 bindings, testers and feedback welcome 2013/12/19, Florent Monnier wrote: > 2013/12/17, Daniel B=FCnzli 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: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 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 =3D 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 =3D Sdl.Event.create () in try =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D i'll issue it on gh --=20 Florent