713 Commits

Author SHA1 Message Date
Vincent-FK
bf24872be3 propose USB in menu only if connected, also checking if already sharing
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:30:40 +01:00
Vincent-FK
2c94471981 add scroll animation in menus
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:30:33 +01:00
Vincent-FK
be9d569e78 save Utils::getFileName return string value as static in order for it to be accessible outside the function scope
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:29:46 +01:00
Vincent-FK
e2951c7b8e correct bug in pixel copy during crop in rescaling function
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:29:27 +01:00
Vincent-FK
574ab1ae30 set dithering to rgb555 instead of rgb565 as it seems the screen only supports rgb555
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:29:09 +01:00
Vincent-FK
2eb437708d BUG correction: keep_aspect_ratio does bot work for images. Now we can set the containerWidth and containerHeight params for automatic cropping
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:28:35 +01:00
Vincent-FK
21ff820179 BUG correction: trap when idx theme out of bounds when not found in menumode
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:28:24 +01:00
Vincent-FK
115641c0e9 make tweens other than linear for components now work, added TWEEN_PROPERTY_X_OFFSET_SHIFT_MENU_DIRECTION
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:28:03 +01:00
Vincent-FK
4692a90c48 reinitialize battery ast_id_ in free_graphics
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:27:38 +01:00
Vincent-FK
b0872d2374 add theme chooser in menu
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:27:31 +01:00
Vincent-FK
71d439c3f7 add xml events onMenuFastScrollPrev onMenuFastScrollNext onMenuScrollPrev onMenuScrollNext
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:27:22 +01:00
Vincent-FK
bcac9e6f4d select correct item in ReloadableScrollingText and ReloadableText when scroll is detected
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:26:43 +01:00
Vincent-FK
7950bffc2e correct bugs in battery update and draw process
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:26:24 +01:00
Vincent-FK
298afbaf68 back to SDL_Delay
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:26:24 +01:00
Vincent-FK
c87a50d52b reset right GET_RUN_TIME_MS
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:26:24 +01:00
Vincent-FK
290d160677 BUG correction: battery charge is not displayed after exiting game
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:26:12 +01:00
Vincent-FK
5b51c7de41 render scrolling text only if necessary
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:26:00 +01:00
Vincent-FK
ebc035c869 set scrolling only if needed in reloadable scrolling texts
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:25:47 +01:00
Vincent-FK
cfb2dbd880 correct 2 bugs in scrolling text: not displayed if waitEndTime<=0 and reset current position to 0 correctly
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:25:00 +01:00
Vincent-FK
7ee88a1bc9 remove hidden files from listing
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:24:38 +01:00
Vincent-FK
c154a282ff BUG correction: replace SDL_Getticks by clock() since SDL_Getticks gets full and unusable after 43days (which happens always when we get the ntp time after retrofe is started)
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:24:19 +01:00
Vincent-FK
e7e4be0d11 do not display battery untils values are ready
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:24:19 +01:00
Vincent-FK
260178ef44 BUG correction: tests for disabling or not dithering was also disabling cache for scaling, so scaling was recomputed at every frame
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:23:50 +01:00
Vincent-FK
2530514e55 remove dithering for test
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:23:46 +01:00
Vincent-FK
3576503dc3 add sierra lite dithering 32bpp or 24bpp to 16bpp for all images, reloadable media or scrolling list if requested by field dithering in xml
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:23:38 +01:00
Vincent-FK
69e0a51dd2 clean up the code and add onNewItemSelected when exiting game
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:23:25 +01:00
Vincent-FK
785449ec2a declare battery files in settings
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:23:15 +01:00
Vincent-FK
86f7d7e5b2 handle all events now in retrofe, do not break when an active one was found anymore -> it caused some events not to be treated causing sometimes weird behaviors
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:23:15 +01:00
Vincent-FK
bbc8d4b2d8 remove unnecessary layout.conf file
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:22:55 +01:00
Vincent-FK
994e9afb1b check battery component values in files, add icons for no bat and bat charging
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:22:27 +01:00
Vincent-FK
b03b6c266c use static for percentage and other parameters in battery component
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:22:00 +01:00
Vincent-FK
b19c27656f add battery component, BUG correction: mustRender in page was rewritten at each component
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:21:44 +01:00
Vincent-FK
b15e0874da horizontal scolling text now goes forward and backwards
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:21:44 +01:00
Vincent-FK
72fda25983 stop horizontal scollable text after the end of text and not after the whole texts disappears off the screen
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:21:13 +01:00
Vincent-FK
8e777aba46 full "any component following menu" scroll working
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:20:56 +01:00
Vincent-FK
ee3c2dd67f reorder component update in reloadable screen update
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:20:49 +01:00
Vincent-FK
fe18b0329f add new tween tye yshitmenudirection, new event onMenuFastScroll, handing of reloadable medias following menus so that we can create lists following any menu
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:20:32 +01:00
Vincent-FK
37e0a0a31d relloadableScrollingText now centered with xOrigin and yOrigin, spaces in reloadableScrollingText, reloadableScrollingText now has the power to force screen renderings
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:20:32 +01:00
Vincent-FK
909b7a4dbd add cache prescaling images
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:20:25 +01:00
Vincent-FK
870255f628 add nearest neighbor resizing in render function
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:20:11 +01:00
Vincent-FK
2ee2c2e5f3 list games only once if same game has multiple accepted extensions
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:19:37 +01:00
Vincent-FK
287b1bb048 use sorted scandir instead of readdir
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:19:20 +01:00
Vincent-FK
5bb70b02eb BUG correction: text not cleared on deallocation, better state printing in state machine
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:18:52 +01:00
Vincent-FK
c96bd40a9b BUG correction: double free of menu memory
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:18:37 +01:00
Vincent-FK
0e831fcd66 free idx_menus
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:18:37 +01:00
Vincent-FK
a460438ed2 add Artifacts folder to .gitignore
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:18:27 +01:00
Vincent-FK
edc5f7d277 use usr/local/sbin binaries in menu
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:18:04 +01:00
Vincent-FK
5f1db4952f check exec return code for USB mounting
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:17:51 +01:00
Vincent-FK
14ca315440 add quick usb commands, need to be improved to check return value
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:17:43 +01:00
Vincent-FK
a5a611af19 correct render bug
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
2020-11-15 23:17:32 +01:00