mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-07-10 13:29:52 -04:00
Compare commits
240 commits
7ab521cba6
...
814979d49b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
814979d49b | ||
|
|
d33d2f0840 | ||
|
|
acba3fcb07 | ||
|
|
390d17893f | ||
|
|
a9a4b3316f | ||
|
|
ca7399821f | ||
|
|
097403e1a2 | ||
|
|
3967180c62 | ||
|
|
db1ca7c5c1 | ||
|
|
d06fa10485 | ||
|
|
f62e29f311 | ||
|
|
f9504df7bd | ||
|
|
40b9d09022 | ||
|
|
ebf42dae68 | ||
|
|
40c2200152 | ||
|
|
0d5afa6d66 | ||
|
|
8e89f8a5d6 | ||
|
|
7437f7b214 | ||
|
|
04a7a60f8b | ||
|
|
f69d40564d | ||
|
|
78ec149555 | ||
|
|
85adf518ac | ||
|
|
e6b4ec81ff | ||
|
|
a82396b0be | ||
|
|
adbb185f7b | ||
|
|
b54b10dc6d | ||
|
|
aa4ea8e279 | ||
|
|
96f1b19149 | ||
|
|
9e6135ecd2 | ||
|
|
9a31255ff8 | ||
|
|
a3be8d1a12 | ||
|
|
55d15b17b7 | ||
|
|
6351b64fff | ||
|
|
a097c23db2 | ||
|
|
f11c89aae2 | ||
|
|
412a78dd5f | ||
|
|
ce88de54b8 | ||
|
|
8a1a3d745d | ||
|
|
ddc31e8ddc | ||
|
|
1ded71b751 | ||
|
|
5c02cf3b3c | ||
|
|
c7d5603c63 | ||
|
|
f4e9ba7f17 | ||
|
|
acff6143c4 | ||
|
|
d87755c535 | ||
|
|
3ba63d667e | ||
|
|
3d3df07c45 | ||
|
|
9e3b38c863 | ||
|
|
379c056299 | ||
|
|
1039eb305a | ||
|
|
92d62cf6ac | ||
|
|
174a2330e9 | ||
|
|
6aa8d80ba2 | ||
|
|
45bd7c4400 | ||
|
|
204684f3e2 | ||
|
|
05de3651d2 | ||
|
|
cf2872af11 | ||
|
|
e3e416c51b | ||
|
|
d618846a8f | ||
|
|
dcc997e4e4 | ||
|
|
1cbf61607e | ||
|
|
cac0be6af5 | ||
|
|
e0ac7a75a3 | ||
|
|
b99b2e98df | ||
|
|
d9b1819e0b | ||
|
|
24b0254d96 | ||
|
|
3cd286d8f8 | ||
|
|
3e08b86e4b | ||
|
|
a824085057 | ||
|
|
02f7dabc67 | ||
|
|
5462f203d3 | ||
|
|
0e3355de50 | ||
|
|
0db37606b0 | ||
|
|
4875f706c2 | ||
|
|
a700dcdfb0 | ||
|
|
44713c3014 | ||
|
|
5d3723bbf4 | ||
|
|
3c41d6a1c1 | ||
|
|
202243a1ab | ||
|
|
115b2ae800 | ||
|
|
e0bbf8f9da | ||
|
|
22b4cd3232 | ||
|
|
949a99a24d | ||
|
|
9a85d01a32 | ||
|
|
30567451b1 | ||
|
|
b6db69e7ef | ||
|
|
aeb42039f9 | ||
|
|
cf10fa5243 | ||
|
|
13bcd68346 | ||
|
|
f42d95b4a6 | ||
|
|
1e3301388c | ||
|
|
18237a3c1f | ||
|
|
278a5a9bc2 | ||
|
|
1d33585686 | ||
|
|
2dc466229e | ||
|
|
005826b630 | ||
|
|
ad64336e69 | ||
|
|
81962808a2 | ||
|
|
39e7f3f29d | ||
|
|
fba3021ffd | ||
|
|
bf273149b7 | ||
|
|
2e126ee3ba | ||
|
|
53d2a99a2a | ||
|
|
a269a1360a | ||
|
|
f2f92dd8e1 | ||
|
|
3de8814fb8 | ||
|
|
cd699e5448 | ||
|
|
7a32c8b5e3 | ||
|
|
c0027abd0e | ||
|
|
5a838851ed | ||
|
|
ca2edad012 | ||
|
|
7154fcd9a8 | ||
|
|
0fc352da0f | ||
|
|
3403e3cfb9 | ||
|
|
db0d7649e0 | ||
|
|
d737cbb931 | ||
|
|
d00a53a1f0 | ||
|
|
c3ad489738 | ||
|
|
32b8af9840 | ||
|
|
383e227671 | ||
|
|
58ce77fbe2 | ||
|
|
f07e977d7c | ||
|
|
4d773a3329 | ||
|
|
f1bdf1e3c2 | ||
|
|
59a42fbf61 | ||
|
|
0a1858b9d1 | ||
|
|
fee00f1f3c | ||
|
|
c5c39a3fdb | ||
|
|
513365713a | ||
|
|
a81d3fa10e | ||
|
|
dfe965d81e | ||
|
|
e5c7f0c41c | ||
|
|
722e4f10ad | ||
|
|
9b0516e4e1 | ||
|
|
1add6b0dd5 | ||
|
|
86decaab9e | ||
|
|
292e8a17a2 | ||
|
|
f123dbc04a | ||
|
|
2b96380641 | ||
|
|
7517674513 | ||
|
|
74905f4796 | ||
|
|
0836ebbd45 | ||
|
|
ad05e23b72 | ||
|
|
e80e1448f1 | ||
|
|
3152beee32 | ||
|
|
a39e4f2a06 | ||
|
|
4469b95ef2 | ||
|
|
addcc159c2 | ||
|
|
d54b9e6f8d | ||
|
|
3b2555bd4d | ||
|
|
c052d11673 | ||
|
|
a7754eee71 | ||
|
|
1c84362f3e | ||
|
|
16900c7fee | ||
|
|
892fbe8d8f | ||
|
|
d72a93836c | ||
|
|
3507f32d01 | ||
|
|
8af98332ab | ||
|
|
f17effbe8f | ||
|
|
d1f1d1da5e | ||
|
|
8e5efb6850 | ||
|
|
e1534d8065 | ||
|
|
35270d08e9 | ||
|
|
160905b1b8 | ||
|
|
9f20c45a5e | ||
|
|
f0d3d76b26 | ||
|
|
fa67d29909 | ||
|
|
543c8de861 | ||
|
|
abaac894f9 | ||
|
|
e62ac0d2c6 | ||
|
|
018994e8c7 | ||
|
|
358c6056ef | ||
|
|
6e64cb8043 | ||
|
|
6e31703289 | ||
|
|
0c464c3d49 | ||
|
|
72af66bc8b | ||
|
|
e75e9d22fa | ||
|
|
e6b62b0dbb | ||
|
|
d75a5d5769 | ||
|
|
9936d93fea | ||
|
|
2a29dedeb6 | ||
|
|
0c8365a286 | ||
|
|
a019f19b1c | ||
|
|
239ba599fd | ||
|
|
e471fe4115 | ||
|
|
21e9d3f449 | ||
|
|
ff3155be9a | ||
|
|
c2344070ac | ||
|
|
bf0fa29a30 | ||
|
|
9a142ee02d | ||
|
|
44e8d8226a | ||
|
|
2291aa24f2 | ||
|
|
64b1f09e06 | ||
|
|
edecad823e | ||
|
|
c0a8303a9c | ||
|
|
727cb798e1 | ||
|
|
04e557898f | ||
|
|
ae17d606be | ||
|
|
cfbbf5b488 | ||
|
|
95df5fdec0 | ||
|
|
eb6746c1d6 | ||
|
|
4ffd098ac9 | ||
|
|
557694a07f | ||
|
|
6a252576f5 | ||
|
|
f456dbfa52 | ||
|
|
b5597a1c38 | ||
|
|
bf8328fbe0 | ||
|
|
1c39495ec2 | ||
|
|
0492021247 | ||
|
|
13a0e58b1c | ||
|
|
69b6c97e58 | ||
|
|
aae46a822a | ||
|
|
29d62e933f | ||
|
|
1a8efac956 | ||
|
|
58f75311d8 | ||
|
|
6e27ba80e4 | ||
|
|
d97e4425c6 | ||
|
|
39497d1c74 | ||
|
|
8abc859c32 | ||
|
|
cae433608f | ||
|
|
2c0381a34e | ||
|
|
a446c06b21 | ||
|
|
d8db60b34a | ||
|
|
7c2e84ad2f | ||
|
|
17d28b96b6 | ||
|
|
b350d6e066 | ||
|
|
c4abbdd718 | ||
|
|
127428e32d | ||
|
|
6fc41c7cdf | ||
|
|
21fe45caad | ||
|
|
1beafb9290 | ||
|
|
6ee85ce61a | ||
|
|
b4c308d698 | ||
|
|
89cb41c322 | ||
|
|
f774de61b6 | ||
|
|
a977c19338 | ||
|
|
5951f6e5e9 | ||
|
|
4c60fe95fc | ||
|
|
7d3f738b3f | ||
|
|
db32a7f07e |
3852 changed files with 23201 additions and 15365 deletions
21
.gitignore
vendored
21
.gitignore
vendored
|
|
@ -82,7 +82,15 @@ __pycache__
|
||||||
/utils/bspatch/bspatch
|
/utils/bspatch/bspatch
|
||||||
|
|
||||||
# imxtools
|
# imxtools
|
||||||
|
/utils/imxtools/misc/io_pins
|
||||||
|
/utils/imxtools/misc/wiki_gen
|
||||||
/utils/imxtools/scsitools/scsitool
|
/utils/imxtools/scsitools/scsitool
|
||||||
|
/utils/imxtools/sbtools/elftosb
|
||||||
|
/utils/imxtools/sbtools/elftosb1
|
||||||
|
/utils/imxtools/sbtools/rsrctool
|
||||||
|
/utils/imxtools/sbtools/sbloader
|
||||||
|
/utils/imxtools/sbtools/sbtoelf
|
||||||
|
/utils/mkimxboot/mkimxboot
|
||||||
|
|
||||||
# /utils/rbutilqt/
|
# /utils/rbutilqt/
|
||||||
/utils/rbutilqt/build
|
/utils/rbutilqt/build
|
||||||
|
|
@ -100,16 +108,22 @@ __pycache__
|
||||||
# /utils/rbutilqt/lang/
|
# /utils/rbutilqt/lang/
|
||||||
/utils/rbutilqt/lang/*.qm
|
/utils/rbutilqt/lang/*.qm
|
||||||
|
|
||||||
# More rbutil
|
# More target-specific utilities
|
||||||
/utils/*/buildposix
|
/utils/*/buildposix
|
||||||
/utils/*/uninstall_script.[ch]
|
/utils/*/uninstall_script.[ch]
|
||||||
/utils/*/install_script.[ch]
|
/utils/*/install_script.[ch]
|
||||||
/utils/mkimxboot/mkimxboot
|
/utils/e200tool/e200load
|
||||||
/utils/mknwzboot/mknwzboot
|
/utils/mknwzboot/mknwzboot
|
||||||
/utils/mkzenboot/mkzenboot
|
/utils/mkzenboot/mkzenboot
|
||||||
/utils/sansapatcher/sansapatcher
|
/utils/sansapatcher/sansapatcher
|
||||||
/utils/jztool/jztool
|
/utils/jztool/jztool
|
||||||
/utils/tools/bin2c
|
/utils/tools/bin2c
|
||||||
|
/utils/rk27utils/nandextract/nandextract
|
||||||
|
/utils/rk27utils/rk27load/rk27load
|
||||||
|
/utils/rk27utils/rkwtool/rkwtool
|
||||||
|
/utils/rk27utils/rkusbtool/rkusbtool
|
||||||
|
/utils/mkmpioboot/mkmpioboot
|
||||||
|
/utils/mktccboot/mktccboot
|
||||||
|
|
||||||
# /tools/
|
# /tools/
|
||||||
/tools/bdf2bmp
|
/tools/bdf2bmp
|
||||||
|
|
@ -188,8 +202,9 @@ __pycache__
|
||||||
# /utils/nwztools
|
# /utils/nwztools
|
||||||
/utils/nwztools/scsitools/scsitool
|
/utils/nwztools/scsitools/scsitool
|
||||||
/utils/nwztools/upgtools/upgtool
|
/utils/nwztools/upgtools/upgtool
|
||||||
|
/utils/nwztools/emmctools/emmctool
|
||||||
|
|
||||||
# utils/rk27utils
|
# utils/rk27utils
|
||||||
/utils/rk27utils/rkboottool/rkboottool
|
/utils/rk27utils/rkboottool/rkboottool
|
||||||
|
|
||||||
# /utils/themeeditor/
|
# /utils/themeeditor/
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
# \/ \/ \/ \/ \/
|
# \/ \/ \/ \/ \/
|
||||||
# $Id$
|
|
||||||
#
|
#
|
||||||
|
|
||||||
PACKAGE=org.rockbox
|
PACKAGE=org.rockbox
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Thomas Martitz
|
* Copyright (C) 2011 Thomas Martitz
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Thomas Martitz
|
* Copyright (C) 2010 Thomas Martitz
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Thomas Martitz
|
* Copyright (C) 2010 Thomas Martitz
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Thomas Martitz
|
* Copyright (C) 2010 Thomas Martitz
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Jonathan Gordon
|
* Copyright (C) 2010 Jonathan Gordon
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Thomas Martitz
|
* Copyright (C) 2010 Thomas Martitz
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Thomas Martitz
|
* Copyright (C) 2010 Thomas Martitz
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Jonathan Gordon
|
* Copyright (C) 2010 Jonathan Gordon
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Thomas Martitz
|
* Copyright (C) 2011 Thomas Martitz
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Thomas Martitz
|
* Copyright (C) 2011 Thomas Martitz
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Thomas Martitz
|
* Copyright (C) 2010 Thomas Martitz
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Antoine Cellerier <dionoea at videolan dot org>
|
* Copyright (C) 2011 Antoine Cellerier <dionoea at videolan dot org>
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Antoine Cellerier <dionoea at videolan dot org>
|
* Copyright (C) 2011 Antoine Cellerier <dionoea at videolan dot org>
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Antoine Cellerier <dionoea at videolan dot org>
|
* Copyright (C) 2011 Antoine Cellerier <dionoea at videolan dot org>
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Antoine Cellerier <dionoea at videolan dot org>
|
* Copyright (C) 2011 Antoine Cellerier <dionoea at videolan dot org>
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Antoine Cellerier <dionoea at videolan dot org>
|
* Copyright (C) 2011 Antoine Cellerier <dionoea at videolan dot org>
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Ray Lambert
|
* Copyright (C) 2005 Ray Lambert
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Ray Lambert
|
* Copyright (C) 2005 Ray Lambert
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006 Jonathan Gordon
|
* Copyright (C) 2006 Jonathan Gordon
|
||||||
* Copyright (C) 2017 William Wilgus
|
* Copyright (C) 2017 William Wilgus
|
||||||
|
|
@ -430,6 +429,7 @@ static inline bool get_action_touchscreen(action_last_t *last, action_cur_t *cur
|
||||||
{
|
{
|
||||||
intptr_t data = button_get_data();
|
intptr_t data = button_get_data();
|
||||||
long now = current_tick;
|
long now = current_tick;
|
||||||
|
last->repeated = false;
|
||||||
|
|
||||||
if (has_flag(last->button, BUTTON_TOUCHSCREEN) &&
|
if (has_flag(last->button, BUTTON_TOUCHSCREEN) &&
|
||||||
!has_flag(last->button, BUTTON_REL))
|
!has_flag(last->button, BUTTON_REL))
|
||||||
|
|
@ -439,7 +439,6 @@ static inline bool get_action_touchscreen(action_last_t *last, action_cur_t *cur
|
||||||
if (!has_flag(cur->button, BUTTON_REL))
|
if (!has_flag(cur->button, BUTTON_REL))
|
||||||
last->ts_data = data;
|
last->ts_data = data;
|
||||||
|
|
||||||
/* Historical baggage... may be unnecessary. */
|
|
||||||
if (has_flag(cur->button, BUTTON_REPEAT))
|
if (has_flag(cur->button, BUTTON_REPEAT))
|
||||||
last->repeated = true;
|
last->repeated = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2003 Uwe Freese
|
* Copyright (C) 2003 Uwe Freese
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2003 Uwe Freese
|
* Copyright (C) 2003 Uwe Freese
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008 by Jonathan Gordon
|
* Copyright (C) 2008 by Jonathan Gordon
|
||||||
*
|
*
|
||||||
|
|
@ -73,11 +72,13 @@ enum {
|
||||||
|
|
||||||
/** Generic GUI class events **/
|
/** Generic GUI class events **/
|
||||||
enum {
|
enum {
|
||||||
GUI_EVENT_STATUSBAR_TOGGLE = (EVENT_CLASS_GUI|1),
|
/* Redraw skin as needed (or by force) */
|
||||||
|
GUI_EVENT_ACTIONREDRAW = (EVENT_CLASS_GUI|1),
|
||||||
|
/* Redraw skin, and update the screen if it's dirty */
|
||||||
GUI_EVENT_ACTIONUPDATE,
|
GUI_EVENT_ACTIONUPDATE,
|
||||||
GUI_EVENT_THEME_CHANGED,
|
GUI_EVENT_THEME_CHANGED,
|
||||||
/* Called when the UI viewport is cleared in the skin engine to
|
/* Called when the UI viewport is cleared in the skin engine to
|
||||||
* notify the current screen that it needs to do an update */
|
* notify the current screen that it needs to redraw itself */
|
||||||
GUI_EVENT_NEED_UI_UPDATE,
|
GUI_EVENT_NEED_UI_UPDATE,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002 Linus Nielsen Feltzing
|
* Copyright (C) 2002 Linus Nielsen Feltzing
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
# \/ \/ \/ \/ \/
|
# \/ \/ \/ \/ \/
|
||||||
# $Id$
|
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES += -I$(APPSDIR) $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
|
INCLUDES += -I$(APPSDIR) $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Audio signal path management APIs
|
* Audio signal path management APIs
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005-2007 Miika Pekkarinen
|
* Copyright (C) 2005-2007 Miika Pekkarinen
|
||||||
* Copyright (C) 2007-2008 Nicolas Pennequin
|
* Copyright (C) 2007-2008 Nicolas Pennequin
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005-2007 Miika Pekkarinen
|
* Copyright (C) 2005-2007 Miika Pekkarinen
|
||||||
* Copyright (C) 2007-2008 Nicolas Pennequin
|
* Copyright (C) 2007-2008 Nicolas Pennequin
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 Michael Sevakis
|
* Copyright (c) 2011 Michael Sevakis
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
# \/ \/ \/ \/ \/
|
# \/ \/ \/ \/ \/
|
||||||
# $Id$
|
|
||||||
#
|
#
|
||||||
|
|
||||||
BITMAPDIR = $(ROOTDIR)/apps/bitmaps
|
BITMAPDIR = $(ROOTDIR)/apps/bitmaps
|
||||||
|
|
|
||||||
|
|
@ -959,14 +959,15 @@ static bool delete_bookmark(const char* bookmark_file_name, int bookmark_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
/* This displays the bookmarks in a file and allows the user to */
|
/* Displays bookmarks in a file, so user can select one to play. */
|
||||||
/* select one to play. */
|
/* */
|
||||||
/* *selected_bookmark contains a non NULL value on successful bookmark */
|
/* Returns */
|
||||||
/* selection. */
|
/* BOOKMARK_SUCCESS A bookmark or 'Don't Resume' was selected */
|
||||||
/* Returns BOOKMARK_SUCCESS on successful bookmark selection, BOOKMARK_FAIL*/
|
/* BOOKMARK_FAIL No selection was made */
|
||||||
/* if no selection was made and BOOKMARK_USB_CONNECTED if the selection */
|
/* BOOKMARK_USB_CONNECTED USB connection forced exit of menu */
|
||||||
/* menu is forced to exit due to a USB connection. */
|
/* */
|
||||||
/* ------------------------------------------------------------------------*/
|
/* *selected_bookmark will point to bookmark if selected, or will be NULL */
|
||||||
|
/* ----------------------------------------------------------------------- */
|
||||||
static int select_bookmark(const char* bookmark_file_name,
|
static int select_bookmark(const char* bookmark_file_name,
|
||||||
bool show_dont_resume,
|
bool show_dont_resume,
|
||||||
char** selected_bookmark)
|
char** selected_bookmark)
|
||||||
|
|
@ -979,6 +980,7 @@ static int select_bookmark(const char* bookmark_file_name,
|
||||||
bool exit = false;
|
bool exit = false;
|
||||||
bool refresh = true;
|
bool refresh = true;
|
||||||
int ret = BOOKMARK_FAIL;
|
int ret = BOOKMARK_FAIL;
|
||||||
|
*selected_bookmark = NULL;
|
||||||
|
|
||||||
bookmarks = plugin_get_buffer(&size);
|
bookmarks = plugin_get_buffer(&size);
|
||||||
bookmarks->buffer_size = size;
|
bookmarks->buffer_size = size;
|
||||||
|
|
@ -996,9 +998,9 @@ static int select_bookmark(const char* bookmark_file_name,
|
||||||
|
|
||||||
while (!exit)
|
while (!exit)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (refresh)
|
if (refresh)
|
||||||
{
|
{
|
||||||
|
refresh = false;
|
||||||
int count = get_bookmark_count(bookmark_file_name);
|
int count = get_bookmark_count(bookmark_file_name);
|
||||||
bookmarks->total_count = count;
|
bookmarks->total_count = count;
|
||||||
|
|
||||||
|
|
@ -1007,8 +1009,7 @@ static int select_bookmark(const char* bookmark_file_name,
|
||||||
/* No more bookmarks, delete file and exit */
|
/* No more bookmarks, delete file and exit */
|
||||||
splash(HZ, ID2P(LANG_BOOKMARK_LOAD_EMPTY));
|
splash(HZ, ID2P(LANG_BOOKMARK_LOAD_EMPTY));
|
||||||
remove(bookmark_file_name);
|
remove(bookmark_file_name);
|
||||||
*selected_bookmark = NULL;
|
break;
|
||||||
return BOOKMARK_FAIL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bookmarks->show_dont_resume)
|
if (bookmarks->show_dont_resume)
|
||||||
|
|
@ -1032,80 +1033,61 @@ static int select_bookmark(const char* bookmark_file_name,
|
||||||
gui_synclist_draw(&list);
|
gui_synclist_draw(&list);
|
||||||
cond_talk_ids_fq(VOICE_EXT_BMARK);
|
cond_talk_ids_fq(VOICE_EXT_BMARK);
|
||||||
gui_synclist_speak_item(&list);
|
gui_synclist_speak_item(&list);
|
||||||
refresh = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
list_do_action(CONTEXT_BOOKMARKSCREEN, HZ / 2, &list, &action);
|
list_do_action(CONTEXT_BOOKMARKSCREEN, HZ / 2, &list, &action);
|
||||||
item = gui_synclist_get_sel_pos(&list) / 2;
|
item = gui_synclist_get_sel_pos(&list) / 2;
|
||||||
|
|
||||||
if (bookmarks->show_dont_resume)
|
if (bookmarks->show_dont_resume)
|
||||||
{
|
|
||||||
item--;
|
item--;
|
||||||
}
|
|
||||||
|
|
||||||
if (action == ACTION_STD_CONTEXT)
|
if (action == ACTION_STD_CONTEXT)
|
||||||
{
|
{
|
||||||
MENUITEM_STRINGLIST(menu_items, ID2P(LANG_BOOKMARK_CONTEXT_MENU),
|
gui_synclist_scroll_stop(&list);
|
||||||
NULL, ID2P(LANG_BOOKMARK_CONTEXT_RESUME),
|
MENUITEM_STRINGLIST(menu_items, ID2P(LANG_BOOKMARK_CONTEXT_MENU), NULL,
|
||||||
ID2P(LANG_DELETE));
|
ID2P(LANG_BOOKMARK_CONTEXT_RESUME),
|
||||||
static const int menu_actions[] =
|
ID2P(LANG_DELETE));
|
||||||
{
|
static const int menu_actions[] = {ACTION_STD_OK,
|
||||||
ACTION_STD_OK, ACTION_BMS_DELETE
|
ACTION_BMS_DELETE};
|
||||||
};
|
|
||||||
int selection = do_menu(&menu_items, NULL, NULL, false);
|
int selection = do_menu(&menu_items, NULL, NULL, false);
|
||||||
|
|
||||||
refresh = true;
|
refresh = true;
|
||||||
|
|
||||||
if (selection >= 0 && selection <=
|
if (selection >= 0 && selection <=
|
||||||
(int) (sizeof(menu_actions) / sizeof(menu_actions[0])))
|
(int) (sizeof(menu_actions) / sizeof(menu_actions[0])))
|
||||||
{
|
|
||||||
action = menu_actions[selection];
|
action = menu_actions[selection];
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
case ACTION_STD_OK:
|
case ACTION_STD_OK:
|
||||||
if (item >= 0)
|
|
||||||
{
|
|
||||||
talk_shutup();
|
|
||||||
*selected_bookmark = bookmarks->items[item - bookmarks->start];
|
|
||||||
return BOOKMARK_SUCCESS;
|
|
||||||
}
|
|
||||||
exit = true;
|
|
||||||
ret = BOOKMARK_SUCCESS;
|
ret = BOOKMARK_SUCCESS;
|
||||||
break;
|
if (item >= 0)
|
||||||
|
*selected_bookmark = bookmarks->items[item - bookmarks->start];
|
||||||
|
/* fall through */
|
||||||
case ACTION_TREE_WPS:
|
case ACTION_TREE_WPS:
|
||||||
case ACTION_STD_CANCEL:
|
case ACTION_STD_CANCEL:
|
||||||
exit = true;
|
exit = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACTION_BMS_DELETE:
|
case ACTION_BMS_DELETE:
|
||||||
if (item >= 0)
|
if (item < 0)
|
||||||
|
break;
|
||||||
|
if (confirm_delete_yesno("", str(LANG_BOOKMARK_CONTEXT_MENU)) == YESNO_YES)
|
||||||
{
|
{
|
||||||
if (confirm_delete_yesno("", str(LANG_BOOKMARK_CONTEXT_MENU)) == YESNO_YES)
|
delete_bookmark(bookmark_file_name, item);
|
||||||
{
|
bookmarks->reload = true;
|
||||||
delete_bookmark(bookmark_file_name, item);
|
|
||||||
bookmarks->reload = true;
|
|
||||||
}
|
|
||||||
refresh = true;
|
|
||||||
}
|
}
|
||||||
|
refresh = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (default_event_handler(action) == SYS_USB_CONNECTED)
|
if (default_event_handler(action) == SYS_USB_CONNECTED)
|
||||||
{
|
{
|
||||||
ret = BOOKMARK_USB_CONNECTED;
|
ret = BOOKMARK_USB_CONNECTED;
|
||||||
exit = true;
|
exit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
gui_synclist_scroll_stop(&list);
|
||||||
talk_shutup();
|
talk_shutup();
|
||||||
*selected_bookmark = NULL;
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 Nicolas Pennequin
|
* Copyright (C) 2007 Nicolas Pennequin
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 Nicolas Pennequin
|
* Copyright (C) 2007 Nicolas Pennequin
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005-2007 Miika Pekkarinen
|
* Copyright (C) 2005-2007 Miika Pekkarinen
|
||||||
* Copyright (C) 2007-2008 Nicolas Pennequin
|
* Copyright (C) 2007-2008 Nicolas Pennequin
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Miika Pekkarinen
|
* Copyright (C) 2005 Miika Pekkarinen
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002 Björn Stenberg
|
* Copyright (C) 2002 Björn Stenberg
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2020 by William Wilgus
|
* Copyright (C) 2020 by William Wilgus
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2020 by William Wilgus
|
* Copyright (C) 2020 by William Wilgus
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 Nicolas Pennequin, Jonathan Gordon
|
* Copyright (C) 2007 Nicolas Pennequin, Jonathan Gordon
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 Nicolas Pennequin, Jonathan Gordon
|
* Copyright (C) 2007 Nicolas Pennequin, Jonathan Gordon
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002 Heikki Hannikainen
|
* Copyright (C) 2002 Heikki Hannikainen
|
||||||
*
|
*
|
||||||
|
|
@ -219,6 +218,22 @@ static int dbg_threads_action_callback(int action, struct gui_synclist *lists)
|
||||||
}
|
}
|
||||||
#if LCD_WIDTH <= 128
|
#if LCD_WIDTH <= 128
|
||||||
int *x_offset = ((int*) lists->data);
|
int *x_offset = ((int*) lists->data);
|
||||||
|
#if CONFIG_CPU == AS3525v2
|
||||||
|
if (action == ACTION_STD_MENU)
|
||||||
|
{
|
||||||
|
*x_offset += 1;
|
||||||
|
action = ACTION_REDRAW;
|
||||||
|
}
|
||||||
|
else if (IS_SYSEVENT(action))
|
||||||
|
{
|
||||||
|
return ACTION_REDRAW;
|
||||||
|
}
|
||||||
|
else if (action == ACTION_STD_OK)
|
||||||
|
{
|
||||||
|
*x_offset = 0;
|
||||||
|
action = ACTION_REDRAW;
|
||||||
|
}
|
||||||
|
#else
|
||||||
if (action == ACTION_STD_OK)
|
if (action == ACTION_STD_OK)
|
||||||
{
|
{
|
||||||
*x_offset += 1;
|
*x_offset += 1;
|
||||||
|
|
@ -232,6 +247,7 @@ static int dbg_threads_action_callback(int action, struct gui_synclist *lists)
|
||||||
{
|
{
|
||||||
*x_offset = 0;
|
*x_offset = 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
(void) lists;
|
(void) lists;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002 Heikki Hannikainen
|
* Copyright (C) 2002 Heikki Hannikainen
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006 Michael Sevakis
|
* Copyright (C) 2006 Michael Sevakis
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006 Michael Sevakis
|
* Copyright (C) 2006 Michael Sevakis
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002 Björn Stenberg
|
* Copyright (C) 2002 Björn Stenberg
|
||||||
* Copyright (C) 2024 William Wilgus
|
* Copyright (C) 2024 William Wilgus
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002 Björn Stenberg
|
* Copyright (C) 2002 Björn Stenberg
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 by Björn Stenberg
|
* Copyright (C) 2005 by Björn Stenberg
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 by Björn Stenberg
|
* Copyright (C) 2005 by Björn Stenberg
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
*
|
*
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 Jonathan Gordon
|
* Copyright (C) 2007 Jonathan Gordon
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002 Henrik Backe
|
* Copyright (C) 2002 Henrik Backe
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022 by Aidan MacDonald
|
* Copyright (C) 2022 by Aidan MacDonald
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022 Aidan MacDonald
|
* Copyright (C) 2022 Aidan MacDonald
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006 Dave Chapman
|
* Copyright (C) 2006 Dave Chapman
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006 Dave Chapman
|
* Copyright (C) 2006 Dave Chapman
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 by Jonathan Gordon
|
* Copyright (C) 2011 by Jonathan Gordon
|
||||||
*
|
*
|
||||||
|
|
@ -44,6 +43,7 @@
|
||||||
|
|
||||||
static struct listitem_viewport_cfg *listcfg[NB_SCREENS] = {NULL};
|
static struct listitem_viewport_cfg *listcfg[NB_SCREENS] = {NULL};
|
||||||
static struct gui_synclist *current_list;
|
static struct gui_synclist *current_list;
|
||||||
|
static bool needs_scrollbar[NB_SCREENS];
|
||||||
|
|
||||||
static int current_row;
|
static int current_row;
|
||||||
static int current_column;
|
static int current_column;
|
||||||
|
|
@ -56,6 +56,7 @@ void skinlist_set_cfg(enum screen_type screen,
|
||||||
if (listcfg[screen])
|
if (listcfg[screen])
|
||||||
screens[screen].scroll_stop_viewport(&listcfg[screen]->selected_item_vp.vp);
|
screens[screen].scroll_stop_viewport(&listcfg[screen]->selected_item_vp.vp);
|
||||||
listcfg[screen] = cfg;
|
listcfg[screen] = cfg;
|
||||||
|
needs_scrollbar[screen] = false;
|
||||||
current_list = NULL;
|
current_list = NULL;
|
||||||
current_column = -1;
|
current_column = -1;
|
||||||
current_row = -1;
|
current_row = -1;
|
||||||
|
|
@ -145,7 +146,6 @@ int skinlist_get_line_count(enum screen_type screen, struct gui_synclist *list)
|
||||||
|
|
||||||
static int current_item;
|
static int current_item;
|
||||||
static int current_nbitems;
|
static int current_nbitems;
|
||||||
static bool needs_scrollbar[NB_SCREENS];
|
|
||||||
bool skinlist_needs_scrollbar(enum screen_type screen)
|
bool skinlist_needs_scrollbar(enum screen_type screen)
|
||||||
{
|
{
|
||||||
return needs_scrollbar[screen];
|
return needs_scrollbar[screen];
|
||||||
|
|
@ -281,7 +281,7 @@ bool skinlist_draw(struct screen *display, struct gui_synclist *list)
|
||||||
}
|
}
|
||||||
current_column = -1;
|
current_column = -1;
|
||||||
current_row = -1;
|
current_row = -1;
|
||||||
skin_render_deferred(display, parent);
|
|
||||||
current_drawing_line = list->selected_item;
|
current_drawing_line = list->selected_item;
|
||||||
|
sb_skin_force_next_update(); /* update scroll bar */
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 by Jonathan Gordon
|
* Copyright (C) 2007 by Jonathan Gordon
|
||||||
*
|
*
|
||||||
|
|
@ -446,7 +445,6 @@ void list_draw(struct screen *display, struct gui_synclist *list)
|
||||||
|
|
||||||
callback_draw_item(&list_info);
|
callback_draw_item(&list_info);
|
||||||
}
|
}
|
||||||
skin_render_deferred(display, parent);
|
|
||||||
display->set_viewport(last_vp);
|
display->set_viewport(last_vp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) Jonathan Gordon (2006)
|
* Copyright (C) Jonathan Gordon (2006)
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) Jonathan Gordon (2006)
|
* Copyright (C) Jonathan Gordon (2006)
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 Jonathan Gordon
|
* Copyright (C) 2007 Jonathan Gordon
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 by Kevin Ferrare
|
* Copyright (C) 2005 by Kevin Ferrare
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013 Thomas Martitz
|
* Copyright (C) 2013 Thomas Martitz
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013 Thomas Martitz
|
* Copyright (C) 2013 Thomas Martitz
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 by Kevin Ferrare
|
* Copyright (C) 2005 by Kevin Ferrare
|
||||||
*
|
*
|
||||||
|
|
@ -49,8 +48,6 @@
|
||||||
void list_draw(struct screen *display, struct gui_synclist *list);
|
void list_draw(struct screen *display, struct gui_synclist *list);
|
||||||
|
|
||||||
static long last_dirty_tick;
|
static long last_dirty_tick;
|
||||||
static bool sb_title_is_dirty;
|
|
||||||
static bool theme_enabled;
|
|
||||||
static struct viewport parent[NB_SCREENS];
|
static struct viewport parent[NB_SCREENS];
|
||||||
static struct gui_synclist *current_lists;
|
static struct gui_synclist *current_lists;
|
||||||
|
|
||||||
|
|
@ -183,6 +180,9 @@ void gui_synclist_init(struct gui_synclist * gui_list,
|
||||||
gui_list->data = data;
|
gui_list->data = data;
|
||||||
gui_list->scroll_all = scroll_all;
|
gui_list->scroll_all = scroll_all;
|
||||||
gui_list->selected_size = selected_size;
|
gui_list->selected_size = selected_size;
|
||||||
|
if (selected_size != 1)
|
||||||
|
FOR_NB_SCREENS(i)
|
||||||
|
skinlist_set_cfg(i, NULL);
|
||||||
gui_list->title = NULL;
|
gui_list->title = NULL;
|
||||||
gui_list->title_icon = Icon_NOICON;
|
gui_list->title_icon = Icon_NOICON;
|
||||||
|
|
||||||
|
|
@ -221,32 +221,11 @@ int gui_list_get_item_offset(struct gui_synclist * gui_list,
|
||||||
return item_offset;
|
return item_offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sb_title_cb(unsigned short id, void *data, void *userdata)
|
|
||||||
{
|
|
||||||
(void)id;
|
|
||||||
(void)data;
|
|
||||||
theme_enabled = true;
|
|
||||||
gui_synclist_draw((struct gui_synclist *) userdata);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Force a full screen update.
|
* Force a full screen update.
|
||||||
*/
|
*/
|
||||||
void gui_synclist_draw(struct gui_synclist *gui_list)
|
void gui_synclist_draw(struct gui_synclist *gui_list)
|
||||||
{
|
{
|
||||||
if (sb_title_is_dirty)
|
|
||||||
{
|
|
||||||
sb_title_is_dirty = theme_enabled = false;
|
|
||||||
|
|
||||||
/* tell skin engine to refresh, then call us back */
|
|
||||||
add_event_ex(GUI_EVENT_NEED_UI_UPDATE, true, sb_title_cb, gui_list);
|
|
||||||
send_event(GUI_EVENT_ACTIONUPDATE, (void*)1);
|
|
||||||
remove_event_ex(GUI_EVENT_NEED_UI_UPDATE, sb_title_cb, gui_list);
|
|
||||||
|
|
||||||
/* sb_title_cb was only called if theme is enabled */
|
|
||||||
if (theme_enabled)
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (list_is_dirty(gui_list))
|
if (list_is_dirty(gui_list))
|
||||||
{
|
{
|
||||||
list_init_viewports(gui_list);
|
list_init_viewports(gui_list);
|
||||||
|
|
@ -258,6 +237,7 @@ void gui_synclist_draw(struct gui_synclist *gui_list)
|
||||||
{
|
{
|
||||||
if (!skinlist_draw(&screens[i], gui_list))
|
if (!skinlist_draw(&screens[i], gui_list))
|
||||||
list_draw(&screens[i], gui_list);
|
list_draw(&screens[i], gui_list);
|
||||||
|
skin_mark_dirty(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -461,7 +441,7 @@ void gui_synclist_set_title(struct gui_synclist * gui_list,
|
||||||
gui_list->title_icon = icon;
|
gui_list->title_icon = icon;
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
sb_set_title_text(title, icon, i);
|
sb_set_title_text(title, icon, i);
|
||||||
sb_title_is_dirty = true;
|
send_event(GUI_EVENT_ACTIONREDRAW, (void*)1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void gui_synclist_set_nb_items(struct gui_synclist * lists, int nb_items)
|
void gui_synclist_set_nb_items(struct gui_synclist * lists, int nb_items)
|
||||||
|
|
@ -952,7 +932,7 @@ bool simplelist_show_list(struct simplelist_info *info)
|
||||||
|
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
list_do_action(CONTEXT_LIST, info->timeout, &lists, &action);
|
list_do_action(CONTEXT_TREE|ALLOW_SOFTLOCK, info->timeout, &lists, &action);
|
||||||
|
|
||||||
/* We must yield in this case or no other thread can run */
|
/* We must yield in this case or no other thread can run */
|
||||||
if (info->timeout == TIMEOUT_NOBLOCK)
|
if (info->timeout == TIMEOUT_NOBLOCK)
|
||||||
|
|
@ -978,6 +958,11 @@ bool simplelist_show_list(struct simplelist_info *info)
|
||||||
info->selection = -1;
|
info->selection = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
else if (action == ACTION_TREE_WPS)
|
||||||
|
{
|
||||||
|
info->selection = -2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
else if (action == ACTION_STD_OK)
|
else if (action == ACTION_STD_OK)
|
||||||
{
|
{
|
||||||
info->selection = gui_synclist_get_sel_pos(&lists);
|
info->selection = gui_synclist_get_sel_pos(&lists);
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 by Kevin Ferrare
|
* Copyright (C) 2005 by Kevin Ferrare
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 by Kevin Ferrare
|
* Copyright (C) 2005 by Kevin Ferrare
|
||||||
* Copyright (C) 2007 by Jonathan Gordon
|
* Copyright (C) 2007 by Jonathan Gordon
|
||||||
|
|
@ -533,7 +532,7 @@ bool option_screen(const struct settings_list *setting,
|
||||||
if (!allow_wrap)
|
if (!allow_wrap)
|
||||||
lists.wraparound = false;
|
lists.wraparound = false;
|
||||||
|
|
||||||
if (list_do_action(CONTEXT_LIST, HZ, /* HZ so the status bar redraws */
|
if (list_do_action(CONTEXT_LIST|ALLOW_SOFTLOCK, HZ, /* HZ so the status bar redraws */
|
||||||
&lists, &action))
|
&lists, &action))
|
||||||
{
|
{
|
||||||
/* setting changed */
|
/* setting changed */
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 by Kevin Ferrare
|
* Copyright (C) 2005 by Kevin Ferrare
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002 Björn Stenberg
|
* Copyright (C) 2002 Björn Stenberg
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008 Thomas Martitz
|
* Copyright (C) 2008 Thomas Martitz
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008 by Jonathan Gordon
|
* Copyright (C) 2008 by Jonathan Gordon
|
||||||
*
|
*
|
||||||
|
|
@ -40,6 +39,7 @@
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "shortcuts.h"
|
#include "shortcuts.h"
|
||||||
#include "appevents.h"
|
#include "appevents.h"
|
||||||
|
#include "statusbar-skinned.h"
|
||||||
|
|
||||||
/* 1 top, 1 bottom, 2 on either side, 1 for the icons
|
/* 1 top, 1 bottom, 2 on either side, 1 for the icons
|
||||||
* if enough space, top and bottom have 2 lines */
|
* if enough space, top and bottom have 2 lines */
|
||||||
|
|
@ -233,7 +233,7 @@ static void quickscreen_draw(struct quickscreen *qs, enum screen_type screen)
|
||||||
(vp_icons->width/2) - 4, vp_icons->height - 8, 7, 8);
|
(vp_icons->width/2) - 4, vp_icons->height - 8, 7, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
skin_render_deferred(display, parent);
|
skin_mark_dirty(display->screen_type);
|
||||||
display->set_viewport(last_vp);
|
display->set_viewport(last_vp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -418,13 +418,11 @@ static void quickscreen_run(struct quickscreen * qs)
|
||||||
can_quit = true;
|
can_quit = true;
|
||||||
else if (button == ACTION_QS_VOLUP) {
|
else if (button == ACTION_QS_VOLUP) {
|
||||||
adjust_volume(1);
|
adjust_volume(1);
|
||||||
FOR_NB_SCREENS(i)
|
sb_skin_force_next_update();
|
||||||
skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_NON_STATIC);
|
|
||||||
}
|
}
|
||||||
else if (button == ACTION_QS_VOLDOWN) {
|
else if (button == ACTION_QS_VOLDOWN) {
|
||||||
adjust_volume(-1);
|
adjust_volume(-1);
|
||||||
FOR_NB_SCREENS(i)
|
sb_skin_force_next_update();
|
||||||
skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_NON_STATIC);
|
|
||||||
}
|
}
|
||||||
else if (button == ACTION_STD_CONTEXT)
|
else if (button == ACTION_STD_CONTEXT)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 by Kevin Ferrare
|
* Copyright (C) 2005 by Kevin Ferrare
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) Markus Braun (2002)
|
* Copyright (C) Markus Braun (2002)
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Kevin Ferrare
|
* Copyright (C) 2005 Kevin Ferrare
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Jonathan Gordon
|
* Copyright (C) 2010 Jonathan Gordon
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002-2007 Björn Stenberg
|
* Copyright (C) 2002-2007 Björn Stenberg
|
||||||
* Copyright (C) 2007-2008 Nicolas Pennequin
|
* Copyright (C) 2007-2008 Nicolas Pennequin
|
||||||
|
|
@ -71,8 +70,20 @@
|
||||||
#include "statusbar-skinned.h"
|
#include "statusbar-skinned.h"
|
||||||
#include "skin_display.h"
|
#include "skin_display.h"
|
||||||
|
|
||||||
|
static bool dirty[NB_SCREENS];
|
||||||
|
|
||||||
void skin_render(struct gui_wps *gwps, unsigned refresh_mode);
|
void skin_render(struct gui_wps *gwps, unsigned refresh_mode);
|
||||||
|
|
||||||
|
bool skin_is_dirty(enum screen_type screen)
|
||||||
|
{
|
||||||
|
return dirty[screen] && !(dirty[screen] = false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void skin_mark_dirty(enum screen_type screen)
|
||||||
|
{
|
||||||
|
dirty[screen] = true;
|
||||||
|
}
|
||||||
|
|
||||||
/* update a skinned screen, update_type is WPS_REFRESH_* values.
|
/* update a skinned screen, update_type is WPS_REFRESH_* values.
|
||||||
* Usually it should only be WPS_REFRESH_NON_STATIC
|
* Usually it should only be WPS_REFRESH_NON_STATIC
|
||||||
* A full update will be done if required (skin_do_full_update() == true)
|
* A full update will be done if required (skin_do_full_update() == true)
|
||||||
|
|
@ -90,6 +101,7 @@ void skin_update(enum skinnable_screens skin, enum screen_type screen,
|
||||||
|
|
||||||
skin_render(gwps, skin_do_full_update(skin, screen) ?
|
skin_render(gwps, skin_do_full_update(skin, screen) ?
|
||||||
SKIN_REFRESH_ALL : update_type);
|
SKIN_REFRESH_ALL : update_type);
|
||||||
|
skin_mark_dirty(screen);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef AB_REPEAT_ENABLE
|
#ifdef AB_REPEAT_ENABLE
|
||||||
|
|
@ -198,6 +210,23 @@ void draw_progressbar(struct gui_wps *gwps, struct skin_viewport* skin_viewport,
|
||||||
length = 100;
|
length = 100;
|
||||||
end = battery_level();
|
end = battery_level();
|
||||||
}
|
}
|
||||||
|
else if (pb->type == SKIN_TOKEN_PLAYLIST_PROGRESSBAR)
|
||||||
|
{
|
||||||
|
unsigned long pl_elapsed, pl_total;
|
||||||
|
if (id3 && wps_get_playlist_percent(id3,
|
||||||
|
id3->elapsed + state->ff_rewind_count,
|
||||||
|
&pl_elapsed, &pl_total)
|
||||||
|
&& pl_total > 0)
|
||||||
|
{
|
||||||
|
length = pl_total;
|
||||||
|
end = pl_elapsed;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
length = 1;
|
||||||
|
end = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (pb->type == SKIN_TOKEN_PEAKMETER_LEFTBAR ||
|
else if (pb->type == SKIN_TOKEN_PEAKMETER_LEFTBAR ||
|
||||||
pb->type == SKIN_TOKEN_PEAKMETER_RIGHTBAR)
|
pb->type == SKIN_TOKEN_PEAKMETER_RIGHTBAR)
|
||||||
{
|
{
|
||||||
|
|
@ -397,8 +426,17 @@ void wps_display_images(struct gui_wps *gwps, struct viewport* vp)
|
||||||
(void)vp;
|
(void)vp;
|
||||||
struct wps_data *data = gwps->data;
|
struct wps_data *data = gwps->data;
|
||||||
struct screen *display = gwps->display;
|
struct screen *display = gwps->display;
|
||||||
struct skin_token_list *list = SKINOFFSETTOPTR(get_skin_buffer(data), data->images);
|
|
||||||
|
|
||||||
|
/* Start with album art, as it may be drawn over by mask images */
|
||||||
|
#ifdef HAVE_ALBUMART
|
||||||
|
struct skin_albumart *aa = SKINOFFSETTOPTR(get_skin_buffer(data), data->albumart);
|
||||||
|
if (aa && aa->draw_handle >= 0)
|
||||||
|
{
|
||||||
|
draw_album_art(gwps, aa->draw_handle, false);
|
||||||
|
aa->draw_handle = -1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
struct skin_token_list *list = SKINOFFSETTOPTR(get_skin_buffer(data), data->images);
|
||||||
while (list)
|
while (list)
|
||||||
{
|
{
|
||||||
struct wps_token *token = SKINOFFSETTOPTR(get_skin_buffer(data), list->token);
|
struct wps_token *token = SKINOFFSETTOPTR(get_skin_buffer(data), list->token);
|
||||||
|
|
@ -420,15 +458,6 @@ void wps_display_images(struct gui_wps *gwps, struct viewport* vp)
|
||||||
}
|
}
|
||||||
list = SKINOFFSETTOPTR(get_skin_buffer(data), list->next);
|
list = SKINOFFSETTOPTR(get_skin_buffer(data), list->next);
|
||||||
}
|
}
|
||||||
#ifdef HAVE_ALBUMART
|
|
||||||
/* now draw the AA */
|
|
||||||
struct skin_albumart *aa = SKINOFFSETTOPTR(get_skin_buffer(data), data->albumart);
|
|
||||||
if (aa && aa->draw_handle >= 0)
|
|
||||||
{
|
|
||||||
draw_album_art(gwps, aa->draw_handle, false);
|
|
||||||
aa->draw_handle = -1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
display->set_drawmode(DRMODE_SOLID);
|
display->set_drawmode(DRMODE_SOLID);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002-2007 Björn Stenberg
|
* Copyright (C) 2002-2007 Björn Stenberg
|
||||||
* Copyright (C) 2007-2008 Nicolas Pennequin
|
* Copyright (C) 2007-2008 Nicolas Pennequin
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Jonathan Gordon
|
* Copyright (C) 2010 Jonathan Gordon
|
||||||
*
|
*
|
||||||
|
|
@ -50,9 +49,6 @@ char* wps_default_skin(enum screen_type screen);
|
||||||
char* default_radio_skin(enum screen_type screen);
|
char* default_radio_skin(enum screen_type screen);
|
||||||
static bool skins_initialised = false;
|
static bool skins_initialised = false;
|
||||||
|
|
||||||
static char* get_skin_filename(char *buf, size_t buf_size,
|
|
||||||
enum skinnable_screens skin, enum screen_type screen);
|
|
||||||
|
|
||||||
struct gui_skin_helper {
|
struct gui_skin_helper {
|
||||||
void (*process)(enum screen_type screen, struct wps_data *data, bool preprocess);
|
void (*process)(enum screen_type screen, struct wps_data *data, bool preprocess);
|
||||||
char* (*default_skin)(enum screen_type screen);
|
char* (*default_skin)(enum screen_type screen);
|
||||||
|
|
@ -153,11 +149,6 @@ void gui_sync_skin_init(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void skin_unload_all(void)
|
|
||||||
{
|
|
||||||
gui_sync_skin_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void skin_reset_buffers(int item, int screen)
|
static void skin_reset_buffers(int item, int screen)
|
||||||
{
|
{
|
||||||
skin_data_free_buflib_allocs(&skins[item][screen].data);
|
skin_data_free_buflib_allocs(&skins[item][screen].data);
|
||||||
|
|
@ -174,7 +165,6 @@ static void skin_reset_buffers(int item, int screen)
|
||||||
void settings_apply_skins(void)
|
void settings_apply_skins(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char filename[MAX_PATH];
|
|
||||||
|
|
||||||
if (audio_status() & AUDIO_STATUS_PLAY)
|
if (audio_status() & AUDIO_STATUS_PLAY)
|
||||||
audio_stop();
|
audio_stop();
|
||||||
|
|
@ -197,7 +187,6 @@ void settings_apply_skins(void)
|
||||||
{
|
{
|
||||||
FOR_NB_SCREENS(j)
|
FOR_NB_SCREENS(j)
|
||||||
{
|
{
|
||||||
get_skin_filename(filename, MAX_PATH, i,j);
|
|
||||||
gui_skin_reset(&skins[i][j]);
|
gui_skin_reset(&skins[i][j]);
|
||||||
skins[i][j].gui_wps.display = &screens[j];
|
skins[i][j].gui_wps.display = &screens[j];
|
||||||
if (skin_helpers[i]->load_on_boot)
|
if (skin_helpers[i]->load_on_boot)
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 Nicolas Pennequin
|
* Copyright (C) 2007 Nicolas Pennequin
|
||||||
* Copyright (C) 2009 Jonathan Gordon
|
* Copyright (C) 2009 Jonathan Gordon
|
||||||
|
|
@ -50,12 +49,8 @@ void skin_disarm_touchregions(struct gui_wps *gwps);
|
||||||
/* Do a update_type update of the skinned screen */
|
/* Do a update_type update of the skinned screen */
|
||||||
void skin_update(enum skinnable_screens skin, enum screen_type screen,
|
void skin_update(enum skinnable_screens skin, enum screen_type screen,
|
||||||
unsigned int update_type);
|
unsigned int update_type);
|
||||||
|
void skin_mark_dirty(enum screen_type screen);
|
||||||
/* Defer updates in skin_render */
|
bool skin_is_dirty(enum screen_type screen);
|
||||||
void skin_defer_rendering(bool deferred);
|
|
||||||
/* Render viewport together with deferred updates */
|
|
||||||
void skin_render_deferred(struct screen *display, struct viewport *vp);
|
|
||||||
|
|
||||||
bool skin_has_sbs(struct gui_wps *gwps);
|
bool skin_has_sbs(struct gui_wps *gwps);
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -83,8 +78,6 @@ void skin_load(enum skinnable_screens skin, enum screen_type screen,
|
||||||
struct gui_wps *skin_get_gwps(enum skinnable_screens skin, enum screen_type screen);
|
struct gui_wps *skin_get_gwps(enum skinnable_screens skin, enum screen_type screen);
|
||||||
void gui_sync_skin_init(void);
|
void gui_sync_skin_init(void);
|
||||||
|
|
||||||
void skin_unload_all(void);
|
|
||||||
|
|
||||||
bool skin_do_full_update(enum skinnable_screens skin, enum screen_type screen);
|
bool skin_do_full_update(enum skinnable_screens skin, enum screen_type screen);
|
||||||
void skin_request_full_update(enum skinnable_screens skin);
|
void skin_request_full_update(enum skinnable_screens skin);
|
||||||
void skin_request_update_locked(bool locked);
|
void skin_request_update_locked(bool locked);
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 Nicolas Pennequin, Dan Everton, Matthias Mohr
|
* Copyright (C) 2007 Nicolas Pennequin, Dan Everton, Matthias Mohr
|
||||||
* 2010 Jonathan Gordon
|
* 2010 Jonathan Gordon
|
||||||
|
|
@ -1235,6 +1234,13 @@ static int parse_progressbar_tag(struct skin_element* element,
|
||||||
token->type = SKIN_TOKEN_VOLUMEBAR;
|
token->type = SKIN_TOKEN_VOLUMEBAR;
|
||||||
else if (token->type == SKIN_TOKEN_BATTERY_PERCENT)
|
else if (token->type == SKIN_TOKEN_BATTERY_PERCENT)
|
||||||
token->type = SKIN_TOKEN_BATTERY_PERCENTBAR;
|
token->type = SKIN_TOKEN_BATTERY_PERCENTBAR;
|
||||||
|
else if (token->type == SKIN_TOKEN_PLAYLIST_ELAPSED_PERCENT)
|
||||||
|
{
|
||||||
|
#ifndef __PCTOOL__
|
||||||
|
wps_playlist_percent_enable(); /* enable scanning track lengths */
|
||||||
|
#endif
|
||||||
|
token->type = SKIN_TOKEN_PLAYLIST_PROGRESSBAR;
|
||||||
|
}
|
||||||
else if (token->type == SKIN_TOKEN_TUNER_RSSI)
|
else if (token->type == SKIN_TOKEN_TUNER_RSSI)
|
||||||
token->type = SKIN_TOKEN_TUNER_RSSI_BAR;
|
token->type = SKIN_TOKEN_TUNER_RSSI_BAR;
|
||||||
else if (token->type == SKIN_TOKEN_PEAKMETER_LEFT)
|
else if (token->type == SKIN_TOKEN_PEAKMETER_LEFT)
|
||||||
|
|
@ -2417,6 +2423,7 @@ static int skin_element_callback(struct skin_element* element, void* data)
|
||||||
case SKIN_TOKEN_PROGRESSBAR:
|
case SKIN_TOKEN_PROGRESSBAR:
|
||||||
case SKIN_TOKEN_VOLUME:
|
case SKIN_TOKEN_VOLUME:
|
||||||
case SKIN_TOKEN_BATTERY_PERCENT:
|
case SKIN_TOKEN_BATTERY_PERCENT:
|
||||||
|
case SKIN_TOKEN_PLAYLIST_ELAPSED_PERCENT:
|
||||||
case SKIN_TOKEN_PLAYER_PROGRESSBAR:
|
case SKIN_TOKEN_PLAYER_PROGRESSBAR:
|
||||||
case SKIN_TOKEN_PEAKMETER_LEFT:
|
case SKIN_TOKEN_PEAKMETER_LEFT:
|
||||||
case SKIN_TOKEN_PEAKMETER_RIGHT:
|
case SKIN_TOKEN_PEAKMETER_RIGHT:
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id: skin_parser.c 26752 2010-06-10 21:22:16Z bieber $
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Jonathan Gordon
|
* Copyright (C) 2010 Jonathan Gordon
|
||||||
*
|
*
|
||||||
|
|
@ -84,8 +83,6 @@ static void skin_render_playlistviewer(struct playlistviewer* viewer,
|
||||||
unsigned long refresh_type);
|
unsigned long refresh_type);
|
||||||
|
|
||||||
static char* skin_buffer;
|
static char* skin_buffer;
|
||||||
static bool defer_rendering;
|
|
||||||
static bool dirty[NB_SCREENS];
|
|
||||||
|
|
||||||
static inline struct skin_element*
|
static inline struct skin_element*
|
||||||
get_child(OFFSETTYPE(struct skin_element**) children, int child)
|
get_child(OFFSETTYPE(struct skin_element**) children, int child)
|
||||||
|
|
@ -230,6 +227,7 @@ static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info,
|
||||||
case SKIN_TOKEN_PLAYLIST_PERCENTBAR:
|
case SKIN_TOKEN_PLAYLIST_PERCENTBAR:
|
||||||
case SKIN_TOKEN_SETTINGBAR:
|
case SKIN_TOKEN_SETTINGBAR:
|
||||||
case SKIN_TOKEN_PROGRESSBAR:
|
case SKIN_TOKEN_PROGRESSBAR:
|
||||||
|
case SKIN_TOKEN_PLAYLIST_PROGRESSBAR:
|
||||||
case SKIN_TOKEN_TUNER_RSSI_BAR:
|
case SKIN_TOKEN_TUNER_RSSI_BAR:
|
||||||
case SKIN_TOKEN_LIST_SCROLLBAR:
|
case SKIN_TOKEN_LIST_SCROLLBAR:
|
||||||
{
|
{
|
||||||
|
|
@ -843,29 +841,6 @@ void skin_render_viewport(struct skin_element* viewport, struct gui_wps *gwps,
|
||||||
wps_display_images(gwps, &skin_viewport->vp);
|
wps_display_images(gwps, &skin_viewport->vp);
|
||||||
}
|
}
|
||||||
|
|
||||||
void skin_defer_rendering(bool deferred)
|
|
||||||
{
|
|
||||||
defer_rendering = deferred;
|
|
||||||
}
|
|
||||||
|
|
||||||
void skin_render_deferred(struct screen *display, struct viewport *vp)
|
|
||||||
{
|
|
||||||
if (defer_rendering)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (dirty[display->screen_type])
|
|
||||||
{
|
|
||||||
dirty[display->screen_type] = false;
|
|
||||||
display->set_viewport(NULL);
|
|
||||||
display->update();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
display->set_viewport(vp);
|
|
||||||
display->update_viewport();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void skin_render(struct gui_wps *gwps, unsigned refresh_mode)
|
void skin_render(struct gui_wps *gwps, unsigned refresh_mode)
|
||||||
{
|
{
|
||||||
const int vp_is_appearing = (VP_DRAW_WASHIDDEN|VP_DRAW_HIDEABLE);
|
const int vp_is_appearing = (VP_DRAW_WASHIDDEN|VP_DRAW_HIDEABLE);
|
||||||
|
|
@ -957,19 +932,14 @@ void skin_render(struct gui_wps *gwps, unsigned refresh_mode)
|
||||||
skin_backdrop_show(data->backdrop_id);
|
skin_backdrop_show(data->backdrop_id);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
dirty[display->screen_type] = defer_rendering;
|
|
||||||
if (((refresh_mode&SKIN_REFRESH_ALL) == SKIN_REFRESH_ALL))
|
if (((refresh_mode&SKIN_REFRESH_ALL) == SKIN_REFRESH_ALL))
|
||||||
{
|
{
|
||||||
defer_rendering = true;
|
|
||||||
/* If this is the UI viewport then let the UI know
|
/* If this is the UI viewport then let the UI know
|
||||||
* to redraw itself */
|
* to redraw itself */
|
||||||
send_event(GUI_EVENT_NEED_UI_UPDATE, NULL);
|
send_event(GUI_EVENT_NEED_UI_UPDATE, NULL);
|
||||||
defer_rendering = dirty[display->screen_type];
|
|
||||||
}
|
}
|
||||||
/* Restore the default viewport */
|
/* Restore the default viewport */
|
||||||
display->set_viewport_ex(NULL, VP_FLAG_VP_SET_CLEAN);
|
display->set_viewport_ex(NULL, VP_FLAG_VP_SET_CLEAN);
|
||||||
if (!defer_rendering)
|
|
||||||
display->update();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static __attribute__((noinline))
|
static __attribute__((noinline))
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002-2007 Björn Stenberg
|
* Copyright (C) 2002-2007 Björn Stenberg
|
||||||
* Copyright (C) 2007-2008 Nicolas Pennequin
|
* Copyright (C) 2007-2008 Nicolas Pennequin
|
||||||
|
|
@ -42,10 +41,15 @@
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "led.h"
|
#include "led.h"
|
||||||
#include "peakmeter.h"
|
#include "peakmeter.h"
|
||||||
|
#include "splash.h"
|
||||||
/* Image stuff */
|
/* Image stuff */
|
||||||
#include "albumart.h"
|
#include "albumart.h"
|
||||||
#include "playlist.h"
|
#include "playlist.h"
|
||||||
#include "playback.h"
|
#include "playback.h"
|
||||||
|
#include "metadata.h"
|
||||||
|
#include "crc32.h"
|
||||||
|
#include "file.h"
|
||||||
|
#include "core_alloc.h"
|
||||||
#include "tdspeed.h"
|
#include "tdspeed.h"
|
||||||
#include "viewport.h"
|
#include "viewport.h"
|
||||||
#include "tagcache.h"
|
#include "tagcache.h"
|
||||||
|
|
@ -69,6 +73,10 @@
|
||||||
#include "option_select.h"
|
#include "option_select.h"
|
||||||
#include "wps.h"
|
#include "wps.h"
|
||||||
|
|
||||||
|
#if (CONFIG_STORAGE & STORAGE_ATA)
|
||||||
|
#include "ata.h" /* ata_disk_isssd() */
|
||||||
|
#endif
|
||||||
|
|
||||||
#define NOINLINE __attribute__ ((noinline))
|
#define NOINLINE __attribute__ ((noinline))
|
||||||
|
|
||||||
static const char* get_codectype(const struct mp3entry* id3)
|
static const char* get_codectype(const struct mp3entry* id3)
|
||||||
|
|
@ -199,6 +207,167 @@ const char *get_cuesheetid3_token(struct wps_token *token, struct mp3entry *id3,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Whole-playlist progress by time (%pX). if track count exceeds MAX_TRACKS
|
||||||
|
* the tag falls back to position-based progress.
|
||||||
|
* The cache is keyed on the track count and a crc of the
|
||||||
|
* first, middle and last filenames, so a playlist change, same-length swap,
|
||||||
|
* or reshuffle causes a reload of the length data. */
|
||||||
|
#define PLPCT_MAX_TRACKS 500
|
||||||
|
|
||||||
|
static struct {
|
||||||
|
uint32_t sig; /* signature of the playlist to detect changed playlist or reshuffle*/
|
||||||
|
int amount;
|
||||||
|
bool nomem; /* allocation failed -> position fallback */
|
||||||
|
bool enabled; /* tag was parsed */
|
||||||
|
uint16_t track_mins[PLPCT_MAX_TRACKS];
|
||||||
|
unsigned long total_min;
|
||||||
|
} plpct = { .amount = -1, .enabled = false };
|
||||||
|
|
||||||
|
static uint32_t plpct_sig(void)
|
||||||
|
{
|
||||||
|
struct playlist_info *pl = playlist_get_current();
|
||||||
|
/* changes on any playlist swap or reshuffle */
|
||||||
|
return pl->seed ^ pl->first_index ^ pl->amount ^ pl->last_insert_pos ^ pl->dirlen
|
||||||
|
^ pl->created_tick ^ pl->max_playlist_size ^ pl->last_shuffled_start;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Equal-weight estimate (every track the same length)
|
||||||
|
scaled by 1000 as %pX is percent-only. */
|
||||||
|
static void plpct_estimate(const struct mp3entry *id3, unsigned long elapsed_ms,
|
||||||
|
int index, int amount,
|
||||||
|
unsigned long *elapsed_s, unsigned long *total_s)
|
||||||
|
{
|
||||||
|
unsigned long frac = 0; /* 0..1000 through the current track */
|
||||||
|
if (id3->length)
|
||||||
|
frac = MIN(1000UL, 1000UL * elapsed_ms / id3->length);
|
||||||
|
*elapsed_s = (unsigned long)(index - 1) * 1000 + frac;
|
||||||
|
*total_s = (unsigned long)amount * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
void wps_playlist_percent_enable(void)
|
||||||
|
{
|
||||||
|
plpct.enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void wps_playlist_percent_prepare(void)
|
||||||
|
{
|
||||||
|
if (!plpct.enabled)
|
||||||
|
return;
|
||||||
|
|
||||||
|
plpct.nomem = true;
|
||||||
|
|
||||||
|
int amount = playlist_amount();
|
||||||
|
plpct.sig = plpct_sig();
|
||||||
|
plpct.amount = amount;
|
||||||
|
if (amount <= 0 || amount > PLPCT_MAX_TRACKS) /* too many tracks abort */
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct playlist_track_info info;
|
||||||
|
|
||||||
|
struct mp3entry *tmp = get_temp_mp3entry(NULL); /* shared scratch */
|
||||||
|
|
||||||
|
if (!tmp)
|
||||||
|
return;
|
||||||
|
#if (CONFIG_STORAGE & STORAGE_ATA) /* Harddrive estimate length based on filesize */
|
||||||
|
unsigned int last_afmt = AFMT_UNKNOWN;
|
||||||
|
uint32_t last_bps = 0;
|
||||||
|
#endif
|
||||||
|
for (int n = 0; n < amount; n++)
|
||||||
|
{
|
||||||
|
unsigned long secs = 0;
|
||||||
|
uint16_t mins = 0;
|
||||||
|
if (playlist_get_track_info(NULL, n, &info) < 0) /* couldn't get track filename abort */
|
||||||
|
goto abort;
|
||||||
|
|
||||||
|
int slot = info.display_index - 1;
|
||||||
|
if (slot < 0 || slot >= amount)
|
||||||
|
goto abort;
|
||||||
|
|
||||||
|
#if (CONFIG_STORAGE & STORAGE_ATA) /* Harddrive */
|
||||||
|
int fd = open(info.filename, O_RDONLY);
|
||||||
|
if (fd >= 0)
|
||||||
|
{
|
||||||
|
unsigned int afmt = probe_file_format(info.filename);
|
||||||
|
off_t size = filesize(fd);
|
||||||
|
|
||||||
|
if (size > 0)
|
||||||
|
{
|
||||||
|
if (afmt != last_afmt || last_bps == 0
|
||||||
|
|| amount <= 50 || (amount <= 250 && ata_disk_isssd())) // TODO tune this for harddisk devices
|
||||||
|
{
|
||||||
|
if (get_metadata_afmt(tmp, fd, info.filename, afmt,
|
||||||
|
METADATA_EXCLUDE_ID3_PATH | METADATA_EXCLUDE_NORMALIZE))
|
||||||
|
{
|
||||||
|
secs = tmp->length / 1000;
|
||||||
|
last_bps = (uint32_t)((uint64_t)size * 1000 / tmp->length);
|
||||||
|
last_afmt = afmt;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else /* file size only -- no per-track metadata parse */
|
||||||
|
{
|
||||||
|
secs = (unsigned long)((uint64_t)size / last_bps);
|
||||||
|
}
|
||||||
|
mins = MIN(MAX(1, (secs + 30) / 60), 65535ul);/* minutes, rounded to nearest */
|
||||||
|
}
|
||||||
|
close(fd);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
if (get_metadata_ex(tmp, -1, info.filename,
|
||||||
|
METADATA_EXCLUDE_ID3_PATH | METADATA_EXCLUDE_NORMALIZE))
|
||||||
|
{
|
||||||
|
secs = tmp->length / 1000;
|
||||||
|
mins = MIN(MAX(1, (secs + 30) / 60), 65535ul);/* minutes, rounded to nearest */
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
/* unreadable tracks count as zero length */
|
||||||
|
plpct.track_mins[slot] = mins;
|
||||||
|
}
|
||||||
|
|
||||||
|
plpct.total_min = 0;
|
||||||
|
for (int t = 0; t < plpct.amount; t++)
|
||||||
|
plpct.total_min += plpct.track_mins[t];
|
||||||
|
plpct.nomem = false;
|
||||||
|
abort:
|
||||||
|
get_temp_mp3entry(tmp); /* release scratch */
|
||||||
|
}
|
||||||
|
|
||||||
|
bool wps_get_playlist_percent(struct mp3entry *id3, unsigned long elapsed_ms,
|
||||||
|
unsigned long *elapsed_s, unsigned long *total_s)
|
||||||
|
{
|
||||||
|
int amount = playlist_amount();
|
||||||
|
int index = playlist_get_display_index(); /* 1-based */
|
||||||
|
|
||||||
|
if (!id3 || amount <= 0 || index < 1 || index > amount)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
uint32_t sig = plpct_sig();
|
||||||
|
if (amount != plpct.amount || sig != plpct.sig)
|
||||||
|
{
|
||||||
|
splashf(0, ID2P(LANG_WAIT));
|
||||||
|
wps_playlist_percent_enable();
|
||||||
|
wps_playlist_percent_prepare();
|
||||||
|
}
|
||||||
|
/* error parsing playlist or more than MAX_TRACKS fall back to
|
||||||
|
position-based progress rather than blank */
|
||||||
|
if (plpct.nomem)
|
||||||
|
{
|
||||||
|
plpct_estimate(id3, elapsed_ms, index, amount, elapsed_s, total_s);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned long before_min = 0;
|
||||||
|
for (int t = 0; t < index - 1; t++)
|
||||||
|
before_min += plpct.track_mins[t];
|
||||||
|
|
||||||
|
*elapsed_s = before_min * 60 + elapsed_ms / 1000;
|
||||||
|
*total_s = plpct.total_min * 60;
|
||||||
|
if (*elapsed_s > *total_s)
|
||||||
|
*elapsed_s = *total_s;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
static const char* get_filename_token(struct wps_token *token, char* filename,
|
static const char* get_filename_token(struct wps_token *token, char* filename,
|
||||||
char *buf, int buf_size)
|
char *buf, int buf_size)
|
||||||
{
|
{
|
||||||
|
|
@ -334,6 +503,24 @@ const char *get_id3_token(struct wps_token *token, struct mp3entry *id3,
|
||||||
snprintf(buf, buf_size, "%lu", 100 * elapsed / length);
|
snprintf(buf, buf_size, "%lu", 100 * elapsed / length);
|
||||||
return buf;
|
return buf;
|
||||||
|
|
||||||
|
case SKIN_TOKEN_PLAYLIST_ELAPSED_PERCENT:
|
||||||
|
{
|
||||||
|
unsigned long pl_elapsed, pl_total;
|
||||||
|
if (!wps_get_playlist_percent(id3, elapsed,
|
||||||
|
&pl_elapsed, &pl_total)
|
||||||
|
|| pl_total == 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
/* %pX always yields a value for a valid playlist now (the
|
||||||
|
equal-weight estimate until the scan finishes, then the exact
|
||||||
|
time-weighted figure), so it behaves like any percent tag;
|
||||||
|
%?pX<...> is true whenever the tag applies (a sized playlist). */
|
||||||
|
if (intval && limit == TOKEN_VALUE_ONLY)
|
||||||
|
*intval = 100 * pl_elapsed / pl_total;
|
||||||
|
snprintf(buf, buf_size, "%lu", 100 * pl_elapsed / pl_total);
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
|
||||||
case SKIN_TOKEN_TRACK_STARTING:
|
case SKIN_TOKEN_TRACK_STARTING:
|
||||||
{
|
{
|
||||||
unsigned long time = token->value.i * (HZ/TIMEOUT_UNIT);
|
unsigned long time = token->value.i * (HZ/TIMEOUT_UNIT);
|
||||||
|
|
@ -510,7 +697,7 @@ const char *get_radio_token(struct wps_token *token, int preset_offset,
|
||||||
if (preset < 0)
|
if (preset < 0)
|
||||||
preset += preset_count;
|
preset += preset_count;
|
||||||
if (token->type == SKIN_TOKEN_PRESET_NAME)
|
if (token->type == SKIN_TOKEN_PRESET_NAME)
|
||||||
snprintf(buf, buf_size, "%s", radio_get_preset_name(preset));
|
radio_get_preset_name(preset, buf, buf_size);
|
||||||
else if (token->type == SKIN_TOKEN_PRESET_FREQ)
|
else if (token->type == SKIN_TOKEN_PRESET_FREQ)
|
||||||
format_freq_MHz(radio_get_preset_freq(preset),
|
format_freq_MHz(radio_get_preset_freq(preset),
|
||||||
region_data->freq_step, buf, buf_size);
|
region_data->freq_step, buf, buf_size);
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 - Jonathan Gordon
|
* Copyright (C) 2009 - Jonathan Gordon
|
||||||
*
|
*
|
||||||
|
|
@ -204,24 +203,11 @@ int skin_get_touchaction(struct gui_wps *gwps, int* edge_offset)
|
||||||
if (!gwps->id3)
|
if (!gwps->id3)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (gevent.id == GESTURE_HOLD ||
|
audio_pre_ff_rewind();
|
||||||
gevent.id == GESTURE_DRAGSTART ||
|
gwps->id3->elapsed = gwps->id3->length / 1000 * (*edge_offset);
|
||||||
gevent.id == GESTURE_DRAG)
|
|
||||||
{
|
|
||||||
audio_pre_ff_rewind();
|
|
||||||
gwps->id3->elapsed = gwps->id3->length * (*edge_offset) / 1000;
|
|
||||||
}
|
|
||||||
else if (gevent.id == GESTURE_RELEASE)
|
|
||||||
{
|
|
||||||
audio_ff_rewind(gwps->id3->elapsed);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
gwps->id3->elapsed = gwps->id3->length * (*edge_offset) / 1000;
|
|
||||||
audio_pre_ff_rewind();
|
|
||||||
audio_ff_rewind(gwps->id3->elapsed);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (gevent.id == GESTURE_TAP || gevent.id == GESTURE_RELEASE)
|
||||||
|
audio_ff_rewind(gwps->id3->elapsed);
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case ACTION_TOUCH_VOLUME:
|
case ACTION_TOUCH_VOLUME:
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 Nicolas Pennequin
|
* Copyright (C) 2007 Nicolas Pennequin
|
||||||
*
|
*
|
||||||
|
|
@ -429,6 +428,12 @@ const char *get_cuesheetid3_token(struct wps_token *token, struct mp3entry *id3,
|
||||||
int offset_tracks, char *buf, int buf_size);
|
int offset_tracks, char *buf, int buf_size);
|
||||||
const char *get_id3_token(struct wps_token *token, struct mp3entry *id3,
|
const char *get_id3_token(struct wps_token *token, struct mp3entry *id3,
|
||||||
char *filename, char *buf, int buf_size, int limit, int *intval);
|
char *filename, char *buf, int buf_size, int limit, int *intval);
|
||||||
|
/* whole-playlist progress backing %pX (number and bar forms) */
|
||||||
|
bool wps_get_playlist_percent(struct mp3entry *id3, unsigned long elapsed_ms,
|
||||||
|
unsigned long *elapsed_s, unsigned long *total_s);
|
||||||
|
void wps_playlist_percent_enable(void);
|
||||||
|
void wps_playlist_percent_prepare(void);
|
||||||
|
|
||||||
#if CONFIG_TUNER
|
#if CONFIG_TUNER
|
||||||
const char *get_radio_token(struct wps_token *token, int preset_offset,
|
const char *get_radio_token(struct wps_token *token, int preset_offset,
|
||||||
char *buf, int buf_size, int limit, int *intval);
|
char *buf, int buf_size, int limit, int *intval);
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) Daniel Stenberg (2002)
|
* Copyright (C) Daniel Stenberg (2002)
|
||||||
|
* Copyright (C) William Wilgus (2026)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
|
@ -39,109 +39,235 @@
|
||||||
static long progress_next_tick, talked_tick;
|
static long progress_next_tick, talked_tick;
|
||||||
|
|
||||||
#define MAXLINES (LCD_HEIGHT/6)
|
#define MAXLINES (LCD_HEIGHT/6)
|
||||||
#define MAXBUFFER 512
|
|
||||||
|
|
||||||
|
#ifndef BOOTLOADER
|
||||||
|
#if MEMORYSIZE > 8
|
||||||
|
#define MAXBUFFER MAX(1024, (LCD_WIDTH/SYSFONT_WIDTH) * MAXLINES + 1)
|
||||||
|
#else
|
||||||
|
#define MAXBUFFER MAX(512, (LCD_WIDTH/SYSFONT_WIDTH) * MAXLINES + 1)
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define MAXBUFFER (512)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define RECT_SPACING 3
|
#define RECT_SPACING 3
|
||||||
#define SPLASH_MEMORY_INTERVAL (HZ)
|
#define SPLASH_MEMORY_INTERVAL (HZ)
|
||||||
|
|
||||||
|
/* splash_internal does the actual drawing of the splash box and text
|
||||||
|
* each call to splash remembers the max size and will not shrink the splash box
|
||||||
|
* until it is reset by an activity change or \f at the beginning of a string
|
||||||
|
*
|
||||||
|
* splash supports several escape sequences ("\n\t\f\r\v\b")
|
||||||
|
* '\n' (new line) indicates the end of a line of text and starts a new one
|
||||||
|
* ("\n\n" will end a line and create a blank line)
|
||||||
|
* '\n' as the first character of the text will create a blank line
|
||||||
|
*
|
||||||
|
* '\t' (tab) starts a new line and adds several spaces to the beginning of the
|
||||||
|
* new line it also left/right justifies the splash text box
|
||||||
|
* (RTL languages will right justify)
|
||||||
|
* '\t' as the last character of the text will left/right justify
|
||||||
|
* without adding any tabs to the text output
|
||||||
|
*
|
||||||
|
* '\f' (form feed) as the first character of the text will reset the text box
|
||||||
|
* width and height
|
||||||
|
*
|
||||||
|
* Others:
|
||||||
|
* '\f', \r', '\v' '\b' will be treated as a breaking space character
|
||||||
|
* they will not be displayed as output and multiple sequences will be
|
||||||
|
* treated as a single character
|
||||||
|
* eg. "\b\v\f\r" will break the line but only once and will not show as a space
|
||||||
|
* where as "\n\n" will break a line and add a blank line
|
||||||
|
* "\t\t" would break a line and add a total of 4 spaces to the next line
|
||||||
|
*/
|
||||||
static bool splash_internal(struct screen * screen, const char *fmt, va_list ap,
|
static bool splash_internal(struct screen * screen, const char *fmt, va_list ap,
|
||||||
struct viewport *vp, int addl_lines)
|
struct viewport *vp, int addl_lines)
|
||||||
{
|
{
|
||||||
static int max_width[NB_SCREENS] = {2*RECT_SPACING};
|
static const char matchstr[] = "\r\n\f\v\t\b";
|
||||||
|
static int max_width[NB_SCREENS] = {0};
|
||||||
|
static int max_height[NB_SCREENS] = {0};
|
||||||
#ifndef BOOTLOADER
|
#ifndef BOOTLOADER
|
||||||
|
static char splash_buf[MAXBUFFER] = {0};
|
||||||
static enum current_activity last_act = ACTIVITY_UNKNOWN;
|
static enum current_activity last_act = ACTIVITY_UNKNOWN;
|
||||||
enum current_activity act = get_current_activity();
|
enum current_activity act = get_current_activity();
|
||||||
|
|
||||||
if (last_act != act) /* changed activities reset max_width */
|
if (last_act != act) /* changed activities reset width / height */
|
||||||
{
|
{
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
max_width[i] = 2*RECT_SPACING;
|
{
|
||||||
|
max_width[i] = 0;
|
||||||
|
max_height[i] = 0;
|
||||||
|
}
|
||||||
last_act = act;
|
last_act = act;
|
||||||
}
|
}
|
||||||
|
#else /*def BOOTLOADER*/
|
||||||
|
char splash_buf[MAXBUFFER] = {0}; /* on the stack for the bootloader */
|
||||||
#endif
|
#endif
|
||||||
/* prevent screen artifacts by keeping the max width seen */
|
|
||||||
int min_width = max_width[screen->screen_type];
|
|
||||||
char splash_buf[MAXBUFFER];
|
|
||||||
struct splash_lines {
|
struct splash_lines {
|
||||||
const char *str;
|
const char *str;
|
||||||
size_t len;
|
uint16_t x;
|
||||||
|
uint16_t len;
|
||||||
} lines[MAXLINES];
|
} lines[MAXLINES];
|
||||||
const char *next;
|
memset(lines, 0, sizeof(lines));
|
||||||
const char *lastbreak = NULL;
|
|
||||||
const char *store = NULL;
|
char *buf = splash_buf;
|
||||||
|
const char *next, *store;
|
||||||
|
|
||||||
|
bool has_tabs = false;
|
||||||
int line = 0;
|
int line = 0;
|
||||||
int x = 0;
|
int x = 0, w = 0;
|
||||||
int y, i;
|
int y;
|
||||||
int space_w, w, chr_h;
|
int space_w, chr_h;
|
||||||
int width, height;
|
int width = vp->width - RECT_SPACING*2;
|
||||||
int maxw = min_width - 2*RECT_SPACING;
|
int height = vp->height;
|
||||||
|
|
||||||
|
/* prevent screen artifacts by keeping the max width / height seen */
|
||||||
|
int maxw = max_width[screen->screen_type];
|
||||||
|
int maxh = max_height[screen->screen_type];
|
||||||
int fontnum = vp->font;
|
int fontnum = vp->font;
|
||||||
|
|
||||||
char lastbrkchr;
|
size_t next_len;
|
||||||
size_t len, next_len;
|
|
||||||
const char matchstr[] = "\r\n\f\v\t ";
|
|
||||||
font_getstringsize(" ", &space_w, &chr_h, fontnum);
|
|
||||||
y = chr_h + (addl_lines * chr_h);
|
|
||||||
|
|
||||||
vsnprintf(splash_buf, sizeof(splash_buf), fmt, ap);
|
font_getstringsize(" ", &space_w, &chr_h, fontnum);
|
||||||
|
y = (addl_lines * chr_h);
|
||||||
|
|
||||||
|
int res = vsnprintf(splash_buf, sizeof(splash_buf), fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
/* break splash string into display lines, doing proper word wrap */
|
if (res <= 0 || width < space_w || height < chr_h)
|
||||||
next = strptokspn_r(splash_buf, matchstr, &next_len, &store);
|
|
||||||
if (!next)
|
|
||||||
return false; /* nothing to display */
|
|
||||||
|
|
||||||
lines[line].len = next_len;
|
|
||||||
lines[line].str = next;
|
|
||||||
while (true)
|
|
||||||
{
|
{
|
||||||
w = font_getstringnsize(next, next_len, NULL, NULL, fontnum);
|
#ifdef SIMULATOR
|
||||||
if (lastbreak)
|
if (res <= 0)
|
||||||
|
printf("ERROR: %s %d\n", __func__, res);
|
||||||
|
else
|
||||||
|
printf("WARNING: %s vp too small\n", __func__);
|
||||||
|
#endif
|
||||||
|
return false; /* nothing to display */
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *lastbreak = splash_buf;
|
||||||
|
if (*lastbreak == '\f') /* only as first character - Reset splash box size */
|
||||||
|
{
|
||||||
|
maxw = 0;
|
||||||
|
maxh = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
while(true) /* break splash string into display lines, doing proper word wrap */
|
||||||
|
{
|
||||||
|
#ifndef BOOTLOADER
|
||||||
|
while (*lastbreak != '\0') /* handle escape chars*/
|
||||||
{
|
{
|
||||||
len = next - lastbreak;
|
switch (*lastbreak) /* all chars in matchstr */
|
||||||
int next_w = len * space_w;
|
|
||||||
if (x + next_w + w > vp->width - RECT_SPACING*2 || lastbrkchr != ' ')
|
|
||||||
{ /* too wide, or control character wrap */
|
|
||||||
if (x > maxw)
|
|
||||||
maxw = x;
|
|
||||||
if ((y + chr_h * 2 > vp->height) || (line >= (MAXLINES-1)))
|
|
||||||
break; /* screen full or out of lines */
|
|
||||||
x = 0;
|
|
||||||
y += chr_h;
|
|
||||||
|
|
||||||
/* split when it fits since we didn't find a valid token to break on */
|
|
||||||
size_t nl = next_len;
|
|
||||||
while (w > vp->width && --nl > 0)
|
|
||||||
w = font_getstringnsize(next, nl, NULL, NULL, fontnum);
|
|
||||||
|
|
||||||
if (nl > 1 && nl != next_len)
|
|
||||||
{
|
|
||||||
next_len = nl;
|
|
||||||
store = next + nl; /* move the start pos for the next token read */
|
|
||||||
}
|
|
||||||
|
|
||||||
lines[++line].len = next_len;
|
|
||||||
lines[line].str = next;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
/* restore & calculate spacing */
|
case '\t': /*fallthrough*/
|
||||||
lines[line].len += next_len + 1;
|
has_tabs = true; /* left justify (right justify for RTL)*/
|
||||||
x += next_w;
|
case '\n':
|
||||||
|
{
|
||||||
|
if (lines[line].len > 0 || *lastbreak != '\t')
|
||||||
|
{
|
||||||
|
x += w;
|
||||||
|
if (x > maxw)
|
||||||
|
maxw = x;
|
||||||
|
|
||||||
|
x = 0;
|
||||||
|
y += chr_h;
|
||||||
|
if (y >= height || line >= MAXLINES-1)
|
||||||
|
{
|
||||||
|
break; /* out of lines */
|
||||||
|
}
|
||||||
|
line++;
|
||||||
|
}
|
||||||
|
/* /t as last char left justifies only */
|
||||||
|
if (lastbreak[0] == '\t' && lastbreak[1] != '\0')
|
||||||
|
{
|
||||||
|
/* add offset for tab */
|
||||||
|
lines[line].x += space_w * 2;
|
||||||
|
x += space_w * 2;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case '\b': /*fallthrough*/
|
||||||
|
case '\f': /*fallthrough*/
|
||||||
|
case '\v': /*fallthrough*/
|
||||||
|
case '\r':
|
||||||
|
break; /* acts the same as a space character */
|
||||||
|
default: /* No valid break chars */
|
||||||
|
lastbreak = " "; /* exit */
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
lastbreak++;
|
||||||
}
|
}
|
||||||
x += w;
|
#endif
|
||||||
|
if (lines[line].len > 0)
|
||||||
lastbreak = next + next_len;
|
{
|
||||||
lastbrkchr = *lastbreak;
|
x += w;
|
||||||
|
|
||||||
next = strptokspn_r(NULL, matchstr, &next_len, &store);
|
|
||||||
|
|
||||||
if (!next)
|
|
||||||
{ /* no more words */
|
|
||||||
if (x > maxw)
|
if (x > maxw)
|
||||||
maxw = x;
|
maxw = x;
|
||||||
|
x = 0;
|
||||||
|
y += chr_h;
|
||||||
|
if (y >= height || line >= MAXLINES-1)
|
||||||
|
{
|
||||||
|
if (y > maxh)
|
||||||
|
maxh = y;
|
||||||
|
break; /* out of lines */
|
||||||
|
}
|
||||||
|
line++;
|
||||||
|
}
|
||||||
|
|
||||||
|
next = strptokspn_r(buf, matchstr, &next_len, &store);
|
||||||
|
|
||||||
|
if (!next)
|
||||||
|
{
|
||||||
|
x += w;
|
||||||
|
if (x > maxw)
|
||||||
|
maxw = x;
|
||||||
|
if (y > maxh)
|
||||||
|
maxh = y;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
buf = NULL; /* uses store for continuation */
|
||||||
|
|
||||||
|
lines[line].str = next;
|
||||||
|
lines[line].len = next_len;
|
||||||
|
|
||||||
|
w = font_getstringnsize(next, next_len, NULL, NULL, fontnum);
|
||||||
|
if (w > width)
|
||||||
|
{
|
||||||
|
const char *nxp, *nx = next;
|
||||||
|
int nw, newlen;
|
||||||
|
int oldlen = next_len;
|
||||||
|
|
||||||
|
while (nx - next < oldlen) /* try to split at a space char */
|
||||||
|
{
|
||||||
|
nxp = nx;
|
||||||
|
nx++;
|
||||||
|
if (*nxp != ' ' && *nx != '\0') /* split on space or EOL */
|
||||||
|
continue;
|
||||||
|
newlen = nxp - next;
|
||||||
|
nw = font_getstringnsize(next, newlen, NULL, NULL, fontnum);
|
||||||
|
|
||||||
|
if (nw > width)
|
||||||
|
{
|
||||||
|
/* is next word larger than max width & room left on this line? */
|
||||||
|
if (nw - w > width && w + space_w * 8 < width)
|
||||||
|
w = nw;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
w = nw;
|
||||||
|
next_len = newlen;
|
||||||
|
store = nx; /* we want to skip the space char */
|
||||||
|
}
|
||||||
|
if (w > width) /* split when it fits */
|
||||||
|
{
|
||||||
|
w = width;
|
||||||
|
next_len = font_measurestring(next, oldlen, w, &w, NULL, fontnum);
|
||||||
|
store = next + next_len;
|
||||||
|
}
|
||||||
|
|
||||||
|
lines[line].len = next_len;
|
||||||
|
}
|
||||||
|
lastbreak = next + next_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepare viewport
|
/* prepare viewport
|
||||||
|
|
@ -151,22 +277,25 @@ static bool splash_internal(struct screen * screen, const char *fmt, va_list ap,
|
||||||
screen->scroll_stop();
|
screen->scroll_stop();
|
||||||
|
|
||||||
width = maxw + 2*RECT_SPACING;
|
width = maxw + 2*RECT_SPACING;
|
||||||
height = y + 2*RECT_SPACING;
|
height = maxh + 2*RECT_SPACING;
|
||||||
|
|
||||||
if (width > vp->width)
|
if (width > vp->width)
|
||||||
width = vp->width;
|
width = vp->width;
|
||||||
if (height > vp->height)
|
if (height > vp->height)
|
||||||
height = vp->height;
|
height = vp->height;
|
||||||
|
|
||||||
|
/* center the vp in the screen area */
|
||||||
vp->x += (vp->width - width) / 2;
|
vp->x += (vp->width - width) / 2;
|
||||||
vp->y += (vp->height - height) / 2;
|
vp->y += (vp->height - height) / 2;
|
||||||
vp->width = width;
|
vp->width = width;
|
||||||
vp->height = height;
|
vp->height = height;
|
||||||
|
if (!has_tabs)
|
||||||
|
vp->flags |= VP_FLAG_ALIGN_CENTER;
|
||||||
|
|
||||||
/* prevent artifacts by locking to max width observed on repeated calls */
|
/* prevent artifacts by locking to max width & height observed on repeated calls */
|
||||||
max_width[screen->screen_type] = width;
|
max_width[screen->screen_type] = width - 2*RECT_SPACING;
|
||||||
|
max_height[screen->screen_type] = height - 2*RECT_SPACING;
|
||||||
|
|
||||||
vp->flags |= VP_FLAG_ALIGN_CENTER;
|
|
||||||
#if LCD_DEPTH > 1
|
#if LCD_DEPTH > 1
|
||||||
unsigned fg = 0, bg = 0;
|
unsigned fg = 0, bg = 0;
|
||||||
bool broken = false;
|
bool broken = false;
|
||||||
|
|
@ -203,11 +332,22 @@ static bool splash_internal(struct screen * screen, const char *fmt, va_list ap,
|
||||||
|
|
||||||
screen->draw_border_viewport();
|
screen->draw_border_viewport();
|
||||||
|
|
||||||
|
/* center y within the available splash box */
|
||||||
|
if (y < maxh)
|
||||||
|
y = (maxh - y) / 2;
|
||||||
|
else
|
||||||
|
y = RECT_SPACING;
|
||||||
|
|
||||||
/* print the message to screen */
|
/* print the message to screen */
|
||||||
for(i = 0, y = RECT_SPACING; i <= line; i++, y+= chr_h)
|
for(int i = 0; i < line && y < height; i++, y+= chr_h)
|
||||||
{
|
{
|
||||||
screen->putsxyf(0, y, "%.*s", lines[i].len, lines[i].str);
|
if (lines[i].len > 0)
|
||||||
|
{
|
||||||
|
x = lines[i].x;
|
||||||
|
screen->putsxyf(x, y, "%.*s", lines[i].len, lines[i].str);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true; /* needs update */
|
return true; /* needs update */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 by Kevin Ferrare
|
* Copyright (C) 2005 by Kevin Ferrare
|
||||||
*
|
*
|
||||||
|
|
@ -29,6 +28,9 @@
|
||||||
* Puts a splash message centered on all the screens for a given period
|
* Puts a splash message centered on all the screens for a given period
|
||||||
* - ticks : how long the splash is displayed (in rb ticks)
|
* - ticks : how long the splash is displayed (in rb ticks)
|
||||||
* - fmt : what to say *printf style
|
* - fmt : what to say *printf style
|
||||||
|
* /f at the beginning of a string will reset the max width and height seen
|
||||||
|
* /n will end a line /n/n will add a blank line
|
||||||
|
* /t will start a new line and indent the string on that line
|
||||||
*/
|
*/
|
||||||
extern void splashf(int ticks, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3);
|
extern void splashf(int ticks, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 Thomas Martitz
|
* Copyright (C) 2009 Thomas Martitz
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 Thomas Martitz
|
* Copyright (C) 2009 Thomas Martitz
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) Robert E. Hak (2002), Linus Nielsen Feltzing (2002)
|
* Copyright (C) Robert E. Hak (2002), Linus Nielsen Feltzing (2002)
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 by Kevin Ferrare
|
* Copyright (C) 2005 by Kevin Ferrare
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002 Björn Stenberg
|
* Copyright (C) 2002 Björn Stenberg
|
||||||
*
|
*
|
||||||
|
|
@ -53,55 +52,63 @@
|
||||||
#include "ata_mmc.h"
|
#include "ata_mmc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USB_ENABLE_HID
|
struct usb_screen_vps_t
|
||||||
int usb_keypad_mode;
|
|
||||||
static bool usb_hid;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SIMULATOR
|
|
||||||
|
|
||||||
static int handle_usb_events(void)
|
|
||||||
{
|
{
|
||||||
#if (CONFIG_STORAGE & STORAGE_MMC)
|
struct viewport parent;
|
||||||
int next_update=0;
|
struct viewport logo;
|
||||||
#endif /* STORAGE_MMC */
|
#ifndef USB_ENABLE_HID
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
struct viewport title;
|
||||||
|
};
|
||||||
|
|
||||||
/* Don't return until we get SYS_USB_DISCONNECTED or SYS_TIMEOUT */
|
int usb_keypad_mode;
|
||||||
|
static void draw_usb_keypad_mode(struct viewport *title)
|
||||||
|
{
|
||||||
|
struct screen *screen = &screens[SCREEN_MAIN];
|
||||||
|
struct viewport *last_vp = screen->set_viewport(title);
|
||||||
|
screen->clear_viewport();
|
||||||
|
title->flags |= VP_FLAG_ALIGN_CENTER;
|
||||||
|
if (title->width > 1)
|
||||||
|
screen->puts_scroll(0, 0, str(keypad_mode_name_get(usb_keypad_mode)));
|
||||||
|
screen->set_viewport(last_vp);
|
||||||
|
}
|
||||||
|
#endif /* USB_ENABLE_HID */
|
||||||
|
|
||||||
|
static void handle_usb_events(struct viewport *title)
|
||||||
|
{
|
||||||
|
#if (CONFIG_STORAGE & STORAGE_MMC) && !defined(SIMULATOR)
|
||||||
|
int next_update = 0;
|
||||||
|
#endif /* STORAGE_MMC */
|
||||||
|
int button;
|
||||||
|
|
||||||
|
/* Don't return until we get SYS_USB_DISCONNECTED */
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
int button;
|
#ifndef USB_ENABLE_HID
|
||||||
#ifdef USB_ENABLE_HID
|
(void)title;
|
||||||
if (usb_hid)
|
#else
|
||||||
|
if (global_settings.usb_hid)
|
||||||
{
|
{
|
||||||
button = get_hid_usb_action();
|
button = get_hid_usb_action();
|
||||||
|
|
||||||
/* On mode change, we need to refresh the screen */
|
|
||||||
if (button == ACTION_USB_HID_MODE_SWITCH_NEXT ||
|
if (button == ACTION_USB_HID_MODE_SWITCH_NEXT ||
|
||||||
button == ACTION_USB_HID_MODE_SWITCH_PREV)
|
button == ACTION_USB_HID_MODE_SWITCH_PREV)
|
||||||
{
|
draw_usb_keypad_mode(title);
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
button = button_get_w_tmo(HZ/2);
|
|
||||||
/* hid emits the event in get_action */
|
/* hid emits the event in get_action */
|
||||||
send_event(GUI_EVENT_ACTIONUPDATE, NULL);
|
send_event(GUI_EVENT_ACTIONUPDATE, NULL);
|
||||||
|
button = button_get_w_tmo(HZ/2);
|
||||||
}
|
}
|
||||||
|
if (button == SYS_USB_DISCONNECTED)
|
||||||
|
return;
|
||||||
|
if (button == SYS_CHARGER_DISCONNECTED)
|
||||||
|
reset_runtime();
|
||||||
|
|
||||||
switch(button)
|
/* USB-MMC bridge can report activity */
|
||||||
{
|
#if (CONFIG_STORAGE & STORAGE_MMC) && !defined(SIMULATOR)
|
||||||
case SYS_USB_DISCONNECTED:
|
|
||||||
return 1;
|
|
||||||
case SYS_CHARGER_DISCONNECTED:
|
|
||||||
reset_runtime();
|
|
||||||
break;
|
|
||||||
case SYS_TIMEOUT:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if (CONFIG_STORAGE & STORAGE_MMC) /* USB-MMC bridge can report activity */
|
|
||||||
if(TIME_AFTER(current_tick,next_update))
|
if(TIME_AFTER(current_tick,next_update))
|
||||||
{
|
{
|
||||||
if(usb_inserted()) {
|
if(usb_inserted()) {
|
||||||
|
|
@ -111,21 +118,7 @@ static int handle_usb_events(void)
|
||||||
}
|
}
|
||||||
#endif /* STORAGE_MMC */
|
#endif /* STORAGE_MMC */
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
#endif /* SIMULATOR */
|
|
||||||
|
|
||||||
#define MODE_NAME_LEN 32
|
|
||||||
|
|
||||||
struct usb_screen_vps_t
|
|
||||||
{
|
|
||||||
struct viewport parent;
|
|
||||||
struct viewport logo;
|
|
||||||
#ifdef USB_ENABLE_HID
|
|
||||||
struct viewport title;
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
static void usb_screen_fix_viewports(struct screen *screen,
|
static void usb_screen_fix_viewports(struct screen *screen,
|
||||||
struct usb_screen_vps_t *usb_screen_vps)
|
struct usb_screen_vps_t *usb_screen_vps)
|
||||||
|
|
@ -178,7 +171,7 @@ static void usb_screen_fix_viewports(struct screen *screen,
|
||||||
logo->height = logo_height;
|
logo->height = logo_height;
|
||||||
|
|
||||||
#ifdef USB_ENABLE_HID
|
#ifdef USB_ENABLE_HID
|
||||||
if (usb_hid)
|
if (global_settings.usb_hid)
|
||||||
{
|
{
|
||||||
struct viewport *title = &usb_screen_vps->title;
|
struct viewport *title = &usb_screen_vps->title;
|
||||||
int char_height = font_get(parent->font)->height;
|
int char_height = font_get(parent->font)->height;
|
||||||
|
|
@ -211,11 +204,9 @@ static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar)
|
||||||
&bm_remote_usblogo,
|
&bm_remote_usblogo,
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
{
|
{
|
||||||
struct screen *screen = &screens[i];
|
struct screen *screen = &screens[i];
|
||||||
|
|
||||||
struct usb_screen_vps_t *usb_screen_vps = &usb_screen_vps_ar[i];
|
struct usb_screen_vps_t *usb_screen_vps = &usb_screen_vps_ar[i];
|
||||||
struct viewport *parent = &usb_screen_vps->parent;
|
struct viewport *parent = &usb_screen_vps->parent;
|
||||||
struct viewport *logo = &usb_screen_vps->logo;
|
struct viewport *logo = &usb_screen_vps->logo;
|
||||||
|
|
@ -223,29 +214,14 @@ static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar)
|
||||||
last_vp = screen->set_viewport(parent);
|
last_vp = screen->set_viewport(parent);
|
||||||
screen->clear_viewport();
|
screen->clear_viewport();
|
||||||
screen->backlight_on();
|
screen->backlight_on();
|
||||||
|
|
||||||
screen->set_viewport(logo);
|
screen->set_viewport(logo);
|
||||||
screen->bmp(logos[i], 0, 0);
|
screen->bmp(logos[i], 0, 0);
|
||||||
if (i == SCREEN_MAIN)
|
|
||||||
{
|
|
||||||
#ifdef USB_ENABLE_HID
|
|
||||||
if (usb_hid)
|
|
||||||
{
|
|
||||||
char modestring[100];
|
|
||||||
screen->set_viewport(&usb_screen_vps->title);
|
|
||||||
usb_screen_vps->title.flags |= VP_FLAG_ALIGN_CENTER;
|
|
||||||
snprintf(modestring, sizeof(modestring), "%s: %s",
|
|
||||||
str(LANG_USB_KEYPAD_MODE),
|
|
||||||
str(keypad_mode_name_get(usb_keypad_mode)));
|
|
||||||
screen->puts_scroll(0, 0, modestring);
|
|
||||||
}
|
|
||||||
#endif /* USB_ENABLE_HID */
|
|
||||||
}
|
|
||||||
screen->set_viewport(parent);
|
|
||||||
|
|
||||||
screen->set_viewport(last_vp);
|
screen->set_viewport(last_vp);
|
||||||
screen->update_viewport();
|
|
||||||
}
|
}
|
||||||
|
#ifdef USB_ENABLE_HID
|
||||||
|
if (global_settings.usb_hid)
|
||||||
|
draw_usb_keypad_mode(&usb_screen_vps_ar[SCREEN_MAIN].title);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void gui_usb_screen_run(bool early_usb, intptr_t seqnum)
|
void gui_usb_screen_run(bool early_usb, intptr_t seqnum)
|
||||||
|
|
@ -258,6 +234,7 @@ void gui_usb_screen_run(bool early_usb, intptr_t seqnum)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct usb_screen_vps_t usb_screen_vps_ar[NB_SCREENS];
|
struct usb_screen_vps_t usb_screen_vps_ar[NB_SCREENS];
|
||||||
|
struct viewport *title = NULL;
|
||||||
#if defined HAVE_TOUCHSCREEN
|
#if defined HAVE_TOUCHSCREEN
|
||||||
enum touchscreen_mode old_mode = touchscreen_get_mode();
|
enum touchscreen_mode old_mode = touchscreen_get_mode();
|
||||||
|
|
||||||
|
|
@ -269,8 +246,10 @@ void gui_usb_screen_run(bool early_usb, intptr_t seqnum)
|
||||||
push_current_activity(ACTIVITY_USBSCREEN);
|
push_current_activity(ACTIVITY_USBSCREEN);
|
||||||
|
|
||||||
#ifdef USB_ENABLE_HID
|
#ifdef USB_ENABLE_HID
|
||||||
usb_hid = global_settings.usb_hid;
|
|
||||||
usb_keypad_mode = global_settings.usb_keypad_mode;
|
usb_keypad_mode = global_settings.usb_keypad_mode;
|
||||||
|
title = &usb_screen_vps_ar[SCREEN_MAIN].title;
|
||||||
|
#else
|
||||||
|
title = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
|
|
@ -296,33 +275,13 @@ void gui_usb_screen_run(bool early_usb, intptr_t seqnum)
|
||||||
/* The font system leaves the .fnt fd's open, so we need for force close them all */
|
/* The font system leaves the .fnt fd's open, so we need for force close them all */
|
||||||
font_disable_all();
|
font_disable_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
usb_acknowledge(SYS_USB_CONNECTED_ACK, seqnum);
|
usb_acknowledge(SYS_USB_CONNECTED_ACK, seqnum);
|
||||||
|
usb_screens_draw(usb_screen_vps_ar);
|
||||||
while (1)
|
handle_usb_events(title);
|
||||||
{
|
|
||||||
usb_screens_draw(usb_screen_vps_ar);
|
|
||||||
#ifdef SIMULATOR
|
|
||||||
if (button_get_w_tmo(HZ/2))
|
|
||||||
break;
|
|
||||||
send_event(GUI_EVENT_ACTIONUPDATE, NULL);
|
|
||||||
#else
|
|
||||||
if (handle_usb_events())
|
|
||||||
break;
|
|
||||||
#endif /* SIMULATOR */
|
|
||||||
}
|
|
||||||
|
|
||||||
FOR_NB_SCREENS(i)
|
|
||||||
{
|
|
||||||
const struct viewport* vp = NULL;
|
|
||||||
|
|
||||||
#if defined(USB_ENABLE_HID)
|
#if defined(USB_ENABLE_HID)
|
||||||
vp = usb_hid ? &usb_screen_vps_ar[i].title : NULL;
|
if (global_settings.usb_hid)
|
||||||
#endif
|
screens[SCREEN_MAIN].scroll_stop_viewport(title);
|
||||||
if (vp)
|
|
||||||
screens[i].scroll_stop_viewport(vp);
|
|
||||||
}
|
|
||||||
#ifdef USB_ENABLE_HID
|
|
||||||
if (global_settings.usb_keypad_mode != usb_keypad_mode)
|
if (global_settings.usb_keypad_mode != usb_keypad_mode)
|
||||||
{
|
{
|
||||||
global_settings.usb_keypad_mode = usb_keypad_mode;
|
global_settings.usb_keypad_mode = usb_keypad_mode;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002 Björn Stenberg
|
* Copyright (C) 2002 Björn Stenberg
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008 by Jonathan Gordon
|
* Copyright (C) 2008 by Jonathan Gordon
|
||||||
*
|
*
|
||||||
|
|
@ -83,7 +82,7 @@ static void evt_toggle(bool enable, unsigned short id,
|
||||||
|
|
||||||
static void toggle_events(bool enable)
|
static void toggle_events(bool enable)
|
||||||
{
|
{
|
||||||
evt_toggle(enable, GUI_EVENT_ACTIONUPDATE, viewportmanager_redraw);
|
evt_toggle(enable, GUI_EVENT_ACTIONREDRAW, viewportmanager_redraw);
|
||||||
evt_toggle(enable, PLAYBACK_EVENT_TRACK_CHANGE, do_sbs_update_callback);
|
evt_toggle(enable, PLAYBACK_EVENT_TRACK_CHANGE, do_sbs_update_callback);
|
||||||
evt_toggle(enable, PLAYBACK_EVENT_NEXTTRACKID3_AVAILABLE, do_sbs_update_callback);
|
evt_toggle(enable, PLAYBACK_EVENT_NEXTTRACKID3_AVAILABLE, do_sbs_update_callback);
|
||||||
#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
|
#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
|
||||||
|
|
@ -113,14 +112,14 @@ static void toggle_theme(enum screen_type screen, bool force)
|
||||||
if (!sb_get_persistent_title(i))
|
if (!sb_get_persistent_title(i))
|
||||||
sb_set_title_text(NULL, Icon_NOICON, i);
|
sb_set_title_text(NULL, Icon_NOICON, i);
|
||||||
}
|
}
|
||||||
|
skinlist_set_cfg(screen, NULL);
|
||||||
toggle_events(enable_event);
|
toggle_events(enable_event);
|
||||||
|
|
||||||
if (is_theme_enabled(screen))
|
if (is_theme_enabled(screen))
|
||||||
{
|
{
|
||||||
last_vp = screens[screen].set_viewport(NULL);
|
last_vp = screens[screen].set_viewport(NULL);
|
||||||
bool first_boot = theme_stack_top[screen] == 0;
|
bool first_boot = theme_stack_top[screen] == 0;
|
||||||
/* remove the left overs from the previous screen.
|
/* Remove the left overs from the previous screen */
|
||||||
* could cause a tiny flicker. Redo your screen code if that happens */
|
|
||||||
#ifdef HAVE_BACKDROP_IMAGE
|
#ifdef HAVE_BACKDROP_IMAGE
|
||||||
skin_backdrop_show(sb_get_backdrop(screen));
|
skin_backdrop_show(sb_get_backdrop(screen));
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -154,9 +153,7 @@ static void toggle_theme(enum screen_type screen, bool force)
|
||||||
}
|
}
|
||||||
intptr_t force = first_boot?0:1;
|
intptr_t force = first_boot?0:1;
|
||||||
|
|
||||||
skin_defer_rendering(true);
|
send_event(GUI_EVENT_ACTIONREDRAW, (void*)force);
|
||||||
send_event(GUI_EVENT_ACTIONUPDATE, (void*)force);
|
|
||||||
skin_defer_rendering(false);
|
|
||||||
if (!first_boot)
|
if (!first_boot)
|
||||||
sb_skin_force_next_update();
|
sb_skin_force_next_update();
|
||||||
}
|
}
|
||||||
|
|
@ -166,7 +163,7 @@ static void toggle_theme(enum screen_type screen, bool force)
|
||||||
screens[screen].backdrop_show(NULL);
|
screens[screen].backdrop_show(NULL);
|
||||||
#endif
|
#endif
|
||||||
screens[screen].scroll_stop();
|
screens[screen].scroll_stop();
|
||||||
skinlist_set_cfg(screen, NULL);
|
skin_is_dirty(screen); /* remove dirty flag */
|
||||||
}
|
}
|
||||||
/* let list initialize viewport in case viewport dimensions is changed. */
|
/* let list initialize viewport in case viewport dimensions is changed. */
|
||||||
send_event(GUI_EVENT_THEME_CHANGED, NULL);
|
send_event(GUI_EVENT_THEME_CHANGED, NULL);
|
||||||
|
|
@ -219,10 +216,16 @@ static void viewportmanager_redraw(unsigned short id, void* data)
|
||||||
{
|
{
|
||||||
(void)id;
|
(void)id;
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
{
|
|
||||||
if (is_theme_enabled(i))
|
if (is_theme_enabled(i))
|
||||||
sb_skin_update(i, NULL != data);
|
sb_skin_update(i, NULL != data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void viewportmanager_update(unsigned short id, void* data)
|
||||||
|
{
|
||||||
|
viewportmanager_redraw(id, data);
|
||||||
|
FOR_NB_SCREENS(i)
|
||||||
|
if (skin_is_dirty(i))
|
||||||
|
screens[i].update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void viewportmanager_init(void)
|
void viewportmanager_init(void)
|
||||||
|
|
@ -233,6 +236,7 @@ void viewportmanager_init(void)
|
||||||
/* We always want the theme enabled by default... */
|
/* We always want the theme enabled by default... */
|
||||||
viewportmanager_theme_enable(i, true, NULL);
|
viewportmanager_theme_enable(i, true, NULL);
|
||||||
}
|
}
|
||||||
|
add_event(GUI_EVENT_ACTIONUPDATE, viewportmanager_update);
|
||||||
}
|
}
|
||||||
|
|
||||||
void viewportmanager_theme_changed(const int which)
|
void viewportmanager_theme_changed(const int which)
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008 by Jonathan Gordon
|
* Copyright (C) 2008 by Jonathan Gordon
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002 Jerome Kuptz
|
* Copyright (C) 2002 Jerome Kuptz
|
||||||
*
|
*
|
||||||
|
|
@ -533,11 +532,7 @@ static void gwps_leave_wps(bool theme_enabled)
|
||||||
viewports drawn by the WPS. May need further thought... */
|
viewports drawn by the WPS. May need further thought... */
|
||||||
struct wps_data *sbs = skin_get_gwps(CUSTOM_STATUSBAR, i)->data;
|
struct wps_data *sbs = skin_get_gwps(CUSTOM_STATUSBAR, i)->data;
|
||||||
if (gwps->data->use_extra_framebuffer && sbs->use_extra_framebuffer)
|
if (gwps->data->use_extra_framebuffer && sbs->use_extra_framebuffer)
|
||||||
{
|
|
||||||
skin_defer_rendering(true);
|
|
||||||
skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL);
|
skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL);
|
||||||
skin_defer_rendering(false);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
viewportmanager_theme_undo(i, skin_has_sbs(gwps));
|
viewportmanager_theme_undo(i, skin_has_sbs(gwps));
|
||||||
}
|
}
|
||||||
|
|
@ -599,11 +594,7 @@ static void gwps_enter_wps(bool theme_enabled)
|
||||||
skin_backdrop_show(gwps->data->backdrop_id);
|
skin_backdrop_show(gwps->data->backdrop_id);
|
||||||
#endif
|
#endif
|
||||||
display->clear_display();
|
display->clear_display();
|
||||||
if (skin_has_sbs(gwps))
|
|
||||||
skin_defer_rendering(true);
|
|
||||||
skin_update(WPS, i, SKIN_REFRESH_ALL);
|
skin_update(WPS, i, SKIN_REFRESH_ALL);
|
||||||
skin_defer_rendering(false);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#ifdef HAVE_TOUCHSCREEN
|
#ifdef HAVE_TOUCHSCREEN
|
||||||
gwps = skin_get_gwps(WPS, SCREEN_MAIN);
|
gwps = skin_get_gwps(WPS, SCREEN_MAIN);
|
||||||
|
|
@ -611,7 +602,7 @@ static void gwps_enter_wps(bool theme_enabled)
|
||||||
if (gwps->data->touchregions < 0)
|
if (gwps->data->touchregions < 0)
|
||||||
touchscreen_set_mode(TOUCHSCREEN_BUTTON);
|
touchscreen_set_mode(TOUCHSCREEN_BUTTON);
|
||||||
#endif
|
#endif
|
||||||
/* force statusbar/skin update since we just cleared the whole screen */
|
/* Screen was cleared, so redraw SBS if enabled, and update screen */
|
||||||
send_event(GUI_EVENT_ACTIONUPDATE, (void*)1);
|
send_event(GUI_EVENT_ACTIONUPDATE, (void*)1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -806,9 +797,10 @@ long gui_wps_show(void)
|
||||||
case ACTION_WPS_HOTKEY:
|
case ACTION_WPS_HOTKEY:
|
||||||
{
|
{
|
||||||
hotkey = true;
|
hotkey = true;
|
||||||
if (!global_settings.hotkey_wps)
|
int act = HK_CTX_GET(0, global_settings.context_wps);
|
||||||
|
if (act == HOTKEY_OFF)
|
||||||
break;
|
break;
|
||||||
if (get_hotkey(global_settings.hotkey_wps)->flags & HOTKEY_FLAG_NOSBS)
|
if (get_hotkey(act)->flags & HOTKEY_FLAG_NOSBS)
|
||||||
{
|
{
|
||||||
/* leave WPS without re-enabling theme */
|
/* leave WPS without re-enabling theme */
|
||||||
theme_enabled = false;
|
theme_enabled = false;
|
||||||
|
|
@ -844,7 +836,7 @@ long gui_wps_show(void)
|
||||||
{
|
{
|
||||||
restore_theme();
|
restore_theme();
|
||||||
theme_enabled = false;
|
theme_enabled = false;
|
||||||
open_plugin_run(ID2P(LANG_OPEN_PLUGIN_SET_WPS_CONTEXT_PLUGIN));
|
open_plugin_run(ID2P(LANG_ONPLAY_MENU_TITLE));
|
||||||
}
|
}
|
||||||
|
|
||||||
restore = true;
|
restore = true;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002 Björn Stenberg
|
* Copyright (C) 2002 Björn Stenberg
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 by Kevin Ferrare
|
* Copyright (C) 2005 by Kevin Ferrare
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 by Kevin Ferrare
|
* Copyright (C) 2005 by Kevin Ferrare
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Jonathan Gordon
|
* Copyright (C) 2010 Jonathan Gordon
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Thomas Martitz
|
* Copyright (C) 2010 Thomas Martitz
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Thomas Martitz
|
* Copyright (C) 2010 Thomas Martitz
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue