Thanks. I've applied the wmDelete changes (with slight changes to unify the code) to svn trunk (will be in ogl-es soon).
Rest also looks good on first view, Printf's need to be log calls. And I think I'll backport the EET_TOUCH_INPUT_EVENT first to trunk as it makes sense in there as well and then merge it back to ogl-es branch. I'll check if I have some way to test it (maybe tablet or laptop) but it's probably fine anyway (defined out by default anyway...) and I assume you tested it?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Updated patch without the Phosh fix, and with the correct logging functions. Any ETA on when ogl-es will be merged? Also the GitHub mirror seems a little outdated.
Thanks, it's already good enough. I'll do rest soon (probably next week) and merge then. GitHub mirror is not from us, so you have to ask it's owner about that.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Also, your subset of the LibPNG source doesn't include some ARM NEON specific optimizations, so I disabled those so they didn't cause undefined references when building for ARM.
And since Debian 11 adds back the GLES1 headers, here is a patch that re-enables GLES1 on Linux and only uses the kronos-api headers if you specify _IRR_OGLES1_USE_KHRONOS_API_HEADERS_.
Thanks, I can add those as well. Glad to hears GLES1 will be back in Debian. I really hopes ES2 will also be repaired as for last year I had no desktop system to test GL ES anymore (and developing on Android is not exactly fun...). But please use new patch-reports in future for different things. Discussions can become tricky when all kind of unrelated patches are mixed in one report and we won't run out of patch-numbers anytime soon ;-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, png patch also applied. Though I wonder if it would compile if I added those subfoldres (all optimizations are in sub-folders which I removed, thought it might be possible to just add them and add those files on certain platforms).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
First - why cast to XITouchClassInfo? XIAnyClassInfo should have the type and you probably shouldn't cast before you know it is of that type.
And second problem is one that really confuses me because I'm not quite sure why this even works. Why != instead of == here? Don't you want to find the touch input device? This seems to use the first device which has a class which is not a touch input device. Thought maybe same device can also accidentally have a touch-input device in your case and so it still worked?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Unfortunately wrong code can still work sometimes. Like in this case for example if the same device additionally has a XITouchClass for the deviceid. But if you look at it then this seems to also return a deviceid when no touch input is available for example. And also other way round - it seems to not return a device when touch input is the only thing that specific device offers. Unless I misunderstand something - this line is just wrong and simply returns any device except those which only have touch-input. You can test it by replacing the != with == and if I'm right it will still work for your case.
Last edit: Michael Zeilfelder 2020-12-28
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I assume the above is probably just a bug. But it gave me another idea. Why not enable input events for all devices which have a XITouchClass? Shouldn't be a problem - and then it works if people have more than one . It might conflict a bit if they try to use more than one at the same time... but better than not having working some at all I suppose.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've added a modifed version of the patch to r6178 in svn trunk. The new code is mostly in CIrrDeviceLinux::initXInput2(), so maybe take a look at my changes if they look fine to you. If so I'll merge with ogl-es branch tomorrow. Or if you are not familiar enough with this I can just merge and you can give it a try (it's disabled by default anyway in IrrCompileConfig).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
edit: It's in r6180 svn in ogl-es branch (but use current version, I made an error when merging that one). My version with the changes. I hope it works like that (not tested).
And forget about my unedited post - I was too tired when I wrote that (didn't notice I was writing in german ^_^).
Last edit: Michael Zeilfelder 2020-12-30
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just tested it. The changes made make the touchsceen send mouse input emulation events and the touchscreen events. It should just send the touchscreen events. (ie. You press the screen and you get both a TouchInput and MouseInput event),
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Are the wmDelete changes related to the input changes or is this something independent?
Unrelated bug-fix so it doesn't immediately close on the Phosh shell
Here is a version with a few fixes
Thanks. I've applied the wmDelete changes (with slight changes to unify the code) to svn trunk (will be in ogl-es soon).
Rest also looks good on first view, Printf's need to be log calls. And I think I'll backport the EET_TOUCH_INPUT_EVENT first to trunk as it makes sense in there as well and then merge it back to ogl-es branch. I'll check if I have some way to test it (maybe tablet or laptop) but it's probably fine anyway (defined out by default anyway...) and I assume you tested it?
Yes, I tested it on my PinePhone with Minetest and it works.
Updated patch without the Phosh fix, and with the correct logging functions. Any ETA on when
ogl-es
will be merged? Also the GitHub mirror seems a little outdated.This patch should be easier to apply.
And this has both the Phosh fix and the multitouch code:
Thanks, it's already good enough. I'll do rest soon (probably next week) and merge then. GitHub mirror is not from us, so you have to ask it's owner about that.
Also, your subset of the LibPNG source doesn't include some ARM NEON specific optimizations, so I disabled those so they didn't cause undefined references when building for ARM.
And since Debian 11 adds back the GLES1 headers, here is a patch that re-enables GLES1 on Linux and only uses the
kronos-api
headers if you specify_IRR_OGLES1_USE_KHRONOS_API_HEADERS_
.Thanks, I can add those as well. Glad to hears GLES1 will be back in Debian. I really hopes ES2 will also be repaired as for last year I had no desktop system to test GL ES anymore (and developing on Android is not exactly fun...). But please use new patch-reports in future for different things. Discussions can become tricky when all kind of unrelated patches are mixed in one report and we won't run out of patch-numbers anytime soon ;-)
Sorry, I won't enable by default. Just no longer force disabling it. As I'm still on Debian 10 I can't compile ES branch anymore otherwise.
OK, png patch also applied. Though I wonder if it would compile if I added those subfoldres (all optimizations are in sub-folders which I removed, thought it might be possible to just add them and add those files on certain platforms).
Thank you! In the future I will put the patches in separate tickets.
I tested this with my laptop (my laptop has a touchscreen)and it works. My laptop uses Ubuntu 20.04.
Hm, I believe it works for you. But there's a line in the code which confuses me a bit:
XITouchClassInfo class_info = (XITouchClassInfo ) (dev->classes[j]);
if (class_info->type != XITouchClass)
[
devid = dev->deviceid;
goto STOP_SEARCH_DEVICE;
}
First - why cast to XITouchClassInfo? XIAnyClassInfo should have the type and you probably shouldn't cast before you know it is of that type.
And second problem is one that really confuses me because I'm not quite sure why this even works. Why != instead of == here? Don't you want to find the touch input device? This seems to use the first device which has a class which is not a touch input device. Thought maybe same device can also accidentally have a touch-input device in your case and so it still worked?
I don't fully understand how that code works, I got it from https://github.com/esjeon/xinput2-touch/blob/master/event.c. But it does work on both my PinePhone and my laptop.
Unfortunately wrong code can still work sometimes. Like in this case for example if the same device additionally has a XITouchClass for the deviceid. But if you look at it then this seems to also return a deviceid when no touch input is available for example. And also other way round - it seems to not return a device when touch input is the only thing that specific device offers. Unless I misunderstand something - this line is just wrong and simply returns any device except those which only have touch-input. You can test it by replacing the != with == and if I'm right it will still work for your case.
Last edit: Michael Zeilfelder 2020-12-28
I assume the above is probably just a bug. But it gave me another idea. Why not enable input events for all devices which have a XITouchClass? Shouldn't be a problem - and then it works if people have more than one . It might conflict a bit if they try to use more than one at the same time... but better than not having working some at all I suppose.
I've added a modifed version of the patch to r6178 in svn trunk. The new code is mostly in CIrrDeviceLinux::initXInput2(), so maybe take a look at my changes if they look fine to you. If so I'll merge with ogl-es branch tomorrow. Or if you are not familiar enough with this I can just merge and you can give it a try (it's disabled by default anyway in IrrCompileConfig).
edit: It's in r6180 svn in ogl-es branch (but use current version, I made an error when merging that one). My version with the changes. I hope it works like that (not tested).
And forget about my unedited post - I was too tired when I wrote that (didn't notice I was writing in german ^_^).
Last edit: Michael Zeilfelder 2020-12-30
I just tested it. The changes made make the touchsceen send mouse input emulation events and the touchscreen events. It should just send the touchscreen events. (ie. You press the screen and you get both a TouchInput and MouseInput event),