Giter VIP home page Giter VIP logo

Comments (4)

kramble avatar kramble commented on September 14, 2024

Mouse support is now done. Just using event input, so no dependency on X-Windows or SDL (still needed for sound though).

It's a bit clunky, so you may want to tidy it up a bit (the code really needs to be in in_rpi.c not gl_vidrpi.c but that's where the original stuff was). I've also hacked around with platform.pi.c quite badly, sorry.

from qurp.

kramble avatar kramble commented on September 14, 2024

Ah, it's not quite working fully. It was ok with the mouse on /dev/input/event0 and keyboard on event1, but with them swapped over, it does not see the mouse at all. Not sure what's going on here as it ought not to matter. Will investigate...

Well, it seems the usb input devices can appear on any of the channels, and sometimes more than one (my keyboard was on both event0 and event1 and the mouse was on event2 this time!). Hopefully the code is a bit more robust now, though I'm going to have to google around for best practice here...

It all seems to be covered in these articles
http://www.linuxjournal.com/article/6396
http://www.linuxjournal.com/article/6429
Looks like EVIOCGBIT can be used to see if the device is a keyboard or mouse.

from qurp.

welford avatar welford commented on September 14, 2024

ok, feel free to move it to in_rpi.c, I believe input code is only in gl_vidrpi.c because i was using gl_vidlinux.c as my template when making the raspberry pi port.

Are you going to make pull requests for your changes?

from qurp.

kramble avatar kramble commented on September 14, 2024

Yep, my changes are pretty much complete (there is still an outstanding issue of keyup events occasionally being missed, but that can wait).

Looking at your most recent commit,there are only a couple of clashes. I added #include "stdio.h" to modern_gles_port.c to fix a compile warning, so that can be reverted, and I just need to add support for your RELEASE_BUILD in platform.pi.c. I'll do that right now, then I think I'll just create a pull request for the whole package, which leaves you with the problem of deciding how to merge it.
Alternatively I can resync my fork with yours, reapply my commits where they don't clash, then raise a pull request on that, but I'm not much of a github expert, so that may be more of a problem.
Anyway I'll get on with the RELEASE_BUILD change for now

from qurp.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.