A bit of context, this device is a clone of the FunKey-S with a different form factor, hardware is mostly identical, the relevant difference is it has audio out (via usb-c, adapter to 3.5mm is included), this is the reason why the FunKey-SDK is needed for bulding.
This port is based on the old SDL 1.2 code because the device doesn't have SDL2 support. Alongside what was supported in the SDL 1.2 builds this port supports battery level, charging status and backlight control.
Change-Id: I7fcb85be62748644b667c0efebabf59d6e9c5ade
if you run yesno screens back to back or another screen with
wait_for_release you may never see the release
instead clear anything in the queue but release events
Change-Id: I1b1e42cbb44f2fdfed441ab1f217b6ea4fe07492
This enables smooth resizing of the window using a
fixed aspect ratio, instead of snapping into the
correct aspect ratio only when the resize operation
has finished, by using an SDL event filter that gets
events delivered during the resize operation
(whereas SDL_PollEvent blocks until done on macOS).
Change-Id: Ie6614e4b6f49a24469c5ee6a69721c9fbd440dae
No need to create a new texture for every
rendered frame, unless the scaling method
has been adjusted.
We also don't need to upload the (unchanged)
player interface to GPU memory repeatedly.
+ Remove unused lcd_display_redraw &
having_new_lcd variables
Change-Id: I5bff6aa2d54347a3f2c3afba8d8d7eb9e39f77f7
Tested on Linux, MacOS, and Windows.
On MacOS and Windows, we constrain the window's aspect
ratio by adjusting the size when responding to resize
events.
On Linux, I've not found a way to do so, that doesn't
result in fairly stuttery behavior and weird jumpy
behavior of the resize handle, possibly depending
on your window manager. So, black bars are displayed
around the content.
Maybe someone, at some point, finds a way.
(SDL3 seems to have SDL_SetWindowAspectRatio)
When the window is in fullscreen, black bars are
display necessarily, of course, on all systems,
unless the player GUI has exactly the same aspect
ratio as the screen...
Change-Id: I535e6617497611ea57a4c19e08e552f990859cfe
Event handling must happen on the main
thread for MacOS.
Not sure if button_queue_wait is the
best place for doing the SDL event
polling, but seems to work ok.
Change-Id: If928282df84bdd74e24a48afd7dbc4c4bfcc49e2