Tiny Core Base > piCore Final Releases
piCore 16.0 Release
Rich:
Hi Paul_123
You missed a couple:
aarch64
--- Code: ---tinycorelinux/16.x/aarch64/tcz/sdl2-dev.tcz
tinycorelinux/16.x/aarch64/tcz/sdl3-dev.tcz
--- End code ---
armhf
--- Code: ---sdl2-dev.tcz
--- End code ---
Paul_123:
-dev are always -dev.
Same pattern as x86_64
Rich:
Hi Paul_123
Sorry, my mistake.
daab:
Hi,
It appears that there is a bug touch screen handling in SDL2 in piCore.
For reference I'm using piCorePlayer 11.0-rc2.
The touch location reported in SDL events does not change after touching the screen, and no finger motion events are reported.
My test program yields this output even though I have moved my finger far away from the position i put my finger down before raising my finger off the screen
--- Code: ---FDN: 0703, 0585 -> FDN: 0703, 0585
FUP: 0703, 0585 -> FUP: hit: 0675, 0525 0737, 0525
FUP: 0703, 0585
--- End code ---
This indicates that the co-ordinates for the SDL_FINGERUP, event always match that of the preceding SDL_FINGERDOWN event.
And no events appear to be generated for SDL_FINGERMOTION.
This is the section of code producing that output, in a SDL_PollEvent loop.
--- Code: --- case SDL_FINGERMOTION:
{
SDL_Point pt = {
.x = (int)(event.tfinger.x*screen_width),
.y = (int)(event.tfinger.y*screen_height)
};
translate_point(&pt);
input_printf("FMO: %04d, %04d\n", (int)(event.tfinger.x*screen_width), (int)(event.tfinger.y*screen_height));
bool selected = false;
for(widget* widget=view.list->tail.prev; widget != NULL; widget=widget->prev) {
if (widget->hidden) { continue;}
if (!selected) {
widget->focussed = SDL_PointInRect(&pt, &widget->input_rect) && (!widget->focus_disabled);
widget->highlight = widget->focussed;
selected = widget->highlight;
} else {
widget->focussed = false;
widget->highlight = false;
}
}
} break;
case SDL_FINGERDOWN:
{
input_printf("FDN: %04d, %04d -> ", (int)(event.tfinger.x*screen_width), (int)(event.tfinger.y*screen_height));
SDL_Point pt = {
.x = (int)(event.tfinger.x*screen_width),
.y = (int)(event.tfinger.y*screen_height)
};
translate_point(&pt);
bool selected = false;
for(widget* widget=view.list->tail.prev; widget != NULL; widget=widget->prev) {
if (widget->hidden) { continue;}
if (!selected) {
widget->focussed = SDL_PointInRect(&pt, &widget->input_rect) && (!widget->focus_disabled);
widget->highlight = widget->focussed;
widget->pressed = widget->focussed;
selected = widget->highlight;
} else {
widget->focussed = false;
widget->highlight = false;
widget->pressed = false;
}
}
input_printf("FDN: %04d, %04d\n", pt.x, pt.y);
} break;
case SDL_FINGERUP:
{
input_printf("FUP: %04d, %04d -> ", (int)(event.tfinger.x*screen_width), (int)(event.tfinger.y*screen_height));
SDL_Point pt = {
.x = (int)(event.tfinger.x*screen_width),
.y = (int)(event.tfinger.y*screen_height)
};
translate_point(&pt);
for(widget* widget=view.list->tail.prev; widget != NULL; widget=widget->prev) {
if (widget->hidden) { continue;}
widget->pressed = false;
if (SDL_PointInRect(&pt, &widget->input_rect) && widget->focussed) {
input_printf("FUP: hit: %04d, %04d %04d, %04d\n",
widget->input_rect.x, widget->input_rect.y,
widget->input_rect.x + widget->input_rect.w,
widget->input_rect.y, widget->input_rect.h
);
widget->focussed = false;
widget->highlight = widget->focussed;
widget_dispatch_action(widget);
} else {
widget->focussed = false;
widget->highlight = false;
}
}
input_printf("FUP: %04d, %04d\n", pt.x, pt.y);
} break;
--- End code ---
Paul_123:
What indications are there that this is an OS issue? If this is an SDL error, perhaps you will get more traction on the SDL forums.
Looking at github, there are issues around Mouse/Finger Motion and up/down events.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version