Comments (4)
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.
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.
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.
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)
- release version crashes after selecting new game HOT 1
- no sound effects HOT 7
- Try half floats for vertex data. HOT 2
- keyboard events HOT 6
- Weird Bug on Raspberry Pi 1 HOT 6
- Error when attempting to build... HOT 1
- Floating weapon when not in water HOT 2
- Console commands not recognized, config.txt not created or edited HOT 6
- Doesn't compile - Raspbian Jessie HOT 5
- Compiling on Raspbian Stretch HOT 7
- OGG/MP3 music support, please? HOT 1
- Fast Quake SDL like retropie ? HOT 1
- Compilation errors for PI3B on Raspbian Buster (lite) HOT 6
- Use x86 processor for cross compilation? HOT 1
- Compilation error EGL_DISPMANX_WINDOW_T
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qurp.