WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: piCore 16.0 Release  (Read 4072 times)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12360
Re: piCore 16.0 Release
« Reply #15 on: October 27, 2025, 03:12:54 PM »
Hi Paul_123
You missed a couple:
aarch64
Code: [Select]
tinycorelinux/16.x/aarch64/tcz/sdl2-dev.tcz
tinycorelinux/16.x/aarch64/tcz/sdl3-dev.tcz

armhf
Code: [Select]
sdl2-dev.tcz

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1463
Re: piCore 16.0 Release
« Reply #16 on: October 28, 2025, 12:48:58 PM »
-dev are always -dev.


Same pattern as x86_64

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12360
Re: piCore 16.0 Release
« Reply #17 on: October 28, 2025, 04:09:49 PM »
Hi Paul_123
Sorry, my mistake.

Offline daab

  • Newbie
  • *
  • Posts: 8
Re: piCore 16.0 Release
« Reply #18 on: December 12, 2025, 01:24:13 PM »
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: [Select]
FDN: 0703, 0585 -> FDN: 0703, 0585
FUP: 0703, 0585 -> FUP: hit: 0675, 0525 0737, 0525
FUP: 0703, 0585

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: [Select]
            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;


Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1463
Re: piCore 16.0 Release
« Reply #19 on: December 12, 2025, 02:04:42 PM »
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.
« Last Edit: December 12, 2025, 02:30:44 PM by Paul_123 »

Offline daab

  • Newbie
  • *
  • Posts: 8
Re: piCore 16.0 Release
« Reply #20 on: December 12, 2025, 02:45:05 PM »
 :o  didn't think to look there  :-[, I assumed that this "essential" feature was fully functional given that SDL3 is now current.
I'll have a dig and see if I can attach the touch screen to a linux x86 desktop and see what results I get there.

Thanks.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1463
Re: piCore 16.0 Release
« Reply #21 on: December 12, 2025, 02:56:46 PM »
You may need to look at sdl3, since that is where most development is happening, and the raspi linux drivers are quite modern. I have a feeling that you are going to get major differences depending on if you using  1) standard linux frambuffer 2) Xorg 3) Wayland

There's a reason I've stayed away from graphics development as much as possible.

Offline daab

  • Newbie
  • *
  • Posts: 8
Re: piCore 16.0 Release
« Reply #22 on: December 14, 2025, 04:36:30 AM »
You may need to look at sdl3, since that is where most development is happening, and the raspi linux drivers are quite modern. I have a feeling that you are going to get major differences depending on if you using  1) standard linux frambuffer 2) Xorg 3) Wayland

There's a reason I've stayed away from graphics development as much as possible.
Hmmm.... I could only see a single component  for sdl3 in the https://repo.picoreplayer.org/repo/16.x/aarch64/tcz/
libsdl3 and libsdl3-dev

AFAICT there should also be image and ttf components?

Am I missing something?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15364
Re: piCore 16.0 Release
« Reply #23 on: December 14, 2025, 06:49:26 AM »
I'll take a look

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15364
Re: piCore 16.0 Release
« Reply #24 on: December 14, 2025, 08:20:05 AM »
sdl3_image and sdl3_ttf posted

Offline daab

  • Newbie
  • *
  • Posts: 8
Re: piCore 16.0 Release
« Reply #25 on: December 14, 2025, 11:14:58 AM »
sdl3_image and sdl3_ttf posted

Thank you very much!
I'll get down to porting port my code to SDL3 and give it a shot.