Commit graph

58 commits

Author SHA1 Message Date
Wolfram Sang
e7a01ca4b2 usb screen: honor HAVE_LCD_SPLIT
Clip+ displays the logo with the LCD split inbetween. Calculate the y
offset to be directly after the split if possible. Thanks go to William
Wilgus for fixing a similar issue and pointing me to macros I was
looking for.

Change-Id: I2183aec1149ce74ffb840716910d2051e4a284ed
2023-02-15 22:43:33 -05:00
William Wilgus
6b87bfadff wps.c cleanup gui_show_wps
remove some old cruft move a few things around clean-up flow

Change-Id: I138c6cd9e2d58ef526eb686333da413819df725d
2022-12-14 22:35:33 -05:00
Christian Soffke
dfd9c10589 Eliminate skin updates in between activities
1) Adds way to pop activity without refreshing the skin at
the same time.

Activities are sometimes popped in immediate succession,
or one activity is popped before another one is pushed right
away. This can lead to the UI appearing glitchy, due to an
activity only appearing for a split-second, which is especially
noticeable with complex skins that change the dimensions
of the UI viewport depending on the current activity

To fix this, prevent superfluous skin updates

* when switching between:
- WPS and browser
- WPS and Playlist Catalogue
- WPS and playlist
- WPS and Settings/System/Plugins

* when accessing Track Info or when displaying
bookmarks using the context menu on the WPS

* when switching from QuickScreen to Shortcuts Menu

2) The playlist viewer activity was pushed & popped
redundantly by playlist_view.

----
NB:
Behavior has remained unchanged in all instances of the
code where pop_current_activity() has been replaced by
pop_current_activity(ACTIVITY_REFRESH_NOW).

Change-Id: I56b517b8c9dba823a9fed3a3f558d7469dcea9fd
2022-12-11 11:50:33 +01:00
William Wilgus
3237ae4a4f LCD core move buf ptr and address look up function viewport struct
I'm currently running up against the limitations of the lcd_draw functions
I want these functions to be able to be used on any size buffer not
just buffers with a stride matching the underlying device

[DONE] allow the framebuffer to be decoupled from the device framebuffer
[DONE need examples] allow for some simple blit like transformations
[DONE] remove the device framebuffer from the plugin api
[DONE}ditto remote framebuffer
[DONE] remove _viewport_get_framebuffer you can call struct *vp = lcd_set_viewport(NULL) and vp->buffer->fb_ptr

while remote lcds may compile (and work in the sim) its not been tested on targets

[FIXED] backdrops need work to be screen agnostic

[FIXED] screen statusbar is not being combined into the main viewport correctly yet

[FIXED] screen elements are displayed incorrectly  after switch to void*

[FIXED] core didn't restore proper viewport on splash etc.

[NEEDS TESTING] remote lcd garbled data

[FIXED] osd lib garbled screen on bmp_part

[FIXED] grey_set_vp needs to return old viewport like lcd_set_viewport

[FIXED] Viewport update now handles viewports with differing buffers/strides by copying to the main buffer

[FIXED] splash on top of WPS leaves old framebuffer data (doesn't redraw)
[UPDATE] refined this a bit more to have clear_viewport set the clean bit and have skin_render do its own screen clear
scrolling viewports no longer trigger wps refresh
also fixed a bug where guisyncyesno was displaying and then disappearing

[ADDED!] New LCD macros that allow you to create properly size frame buffers in you desired size without wasting bytes
(LCD_ and LCD_REMOTE_)
LCD_STRIDE(w, h) same as STRIDE_MAIN
LCD_FBSTRIDE(w, h) returns target specific stride for a buffer W x H
LCD_NBELEMS(w, h) returns the number of fb_data sized elemenst needed for a buffer W x H
LCD_NATIVE_STRIDE(s) conversion between rockbox native vertical and lcd native stride (2bitH)
test_viewports.c has an example of usage

[FIXED!!] 2bit targets don't respect non-native strides
[FIXED] Few define snags

Change-Id: I0d04c3834e464eca84a5a715743a297a0cefd0af
2020-10-26 12:28:48 -04:00
Solomon Peachy
658026e626 [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.
Note:  I left behind lcd_bitmap in features.txt, because removing it
would require considerable work in the manual and the translations.

Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
2020-07-24 21:20:13 +00:00
Solomon Peachy
0c4f89370d [2/4] get rid of HAVE_LCD_CHARCELLS
HAVE_LCD_BITMAP is now redundant.

lcd_bitmap is always-on in features.txt so manual and lang strings
don't have to change

Change-Id: I08eeb20de48099ffc2dc23782711af368c2ec794
2020-07-24 21:20:13 +00:00
Mihail Zenkov
6228c8da18 Fix reset runtime
Change-Id: Ic1ba0c7c7883aae43100c67235dbc2db83056fe7
2016-04-04 11:05:43 +02:00
Thomas Martitz
6f2726e79a usb screen: Stop scrolling the entire display.
It's not easy for the originating screen to perform cleanup in case of USB
because the usb screen is invoked indirectly via default_event_handler(). To
avoid stale scrolling lines perform the cleanup in the usb screen itself.

Side effect should be no worse than scrolling lines to restart in SBSes that
show during USB.

Change-Id: I9aa491b3d4b649c0b3be70048ebcb9d817c0356c
2014-03-18 12:24:44 +01:00
Thomas Martitz
47f648fd92 Fix Player warning.
Change-Id: I43989c92935710b36b68891a637db2e2cafb0401
2014-01-16 00:44:06 +01:00
Thomas Martitz
aa4c2a53f3 usb screen: Crop logo to the UI viewport dimensions.
If the UI viewport is too small only the most top/left parts of the logo will
be displayed. This goes one step further than bac85f2.

Change-Id: I832b0e787e57e3b102a9c097cf1cccd7d4ad92d9
2014-01-16 00:28:18 +01:00
Thomas Martitz
a6483344f6 usb screen: Push the usb screen onto the activity stack. This enables %cs tag support for it.
Change-Id: Icecb72007aa3aba501c702e1aa65c801fcbc3857
2014-01-16 00:26:45 +01:00
Thomas Martitz
a969e1f456 usb: Do not disable themes in the USB screen.
Fonts can now be assumed (by the code) to be available during USB. Make
use of this fact in the USB screen and don't disable the skins.

Change-Id: I525359aae16660604e8fe89addc0bdf97a3fafc1
2014-01-15 23:37:39 +01:00
Szymon Dziok
bac85f2cb4 Always check, if the USB logo for remotes overrides their physical size.
This fixes displaying of the main USB screen on m:robe 100. A remote for
this particular target has no native remote USB logo and it uses a larger
one. However it's a good idea to perform this check always IMHO.

Change-Id: I56ceb2316c551269be011b60271d8da11cb8b073
2014-01-13 21:46:57 +01:00
Thomas Martitz
1c5d0b41ee scroll_engine: Rename scroll_stop* functions to be more consistent with the lcd api.
Change-Id: I8ada10b96bfb628cca0331689e8b936ae47c7e1c
2013-12-14 23:11:30 +01:00
Fred W. Bauer
53c6bab75b We should reload the playlist control file when leaving
USB mode to make sure the filedescriptor is correct.

Change-Id: I2905eaf27533d935a0458b630372584e353c7160
Reviewed-on: http://gerrit.rockbox.org/294
Reviewed-by: Michael Giacomelli <mgiacomelli@gmail.com>
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2012-08-14 06:23:24 +02:00
Boris Gjenero
694502a965 Fix FS#12423 : Rockbox access to /.rockbox/fonts after usb_enable(true). This fixes entry into USB mode on the Archos Recorder V2 and possibly also other targets using a USB to IDE bridge chip. Fred Bauer found this removes the need for a workaround in glyph_cache_save(). I'm including his patch which removes the workaround.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31155 a1c6a512-1295-4272-9138-f99709370657
2011-12-06 00:58:01 +00:00
Thomas Martitz
1645c148e3 Simulate usb plugging on the sim better using sim_tasks.
Now all threads need to ack the connection like on real target, dircache is unloaded and playback stops accordingly.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31009 a1c6a512-1295-4272-9138-f99709370657
2011-11-17 18:40:00 +00:00
Thomas Martitz
86e8f6ad23 Fix another typo. sorry.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30973 a1c6a512-1295-4272-9138-f99709370657
2011-11-13 15:51:25 +00:00
Thomas Martitz
0602dbce4e Fix typos in usb_screen.c and use lcd_remote_bmp() for showing the rockbox logo on remotes as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30972 a1c6a512-1295-4272-9138-f99709370657
2011-11-13 15:44:27 +00:00
Thomas Martitz
9a70c42241 Add the ability to create a prefilled struct bitmap along with generated images.
This allows to directly draw generated and builtin images using lcd_bmp(bm_xxx);
Also fixes builtin list icons on non-mono targets, as they didn't have the
format field set.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30971 a1c6a512-1295-4272-9138-f99709370657
2011-11-13 15:37:16 +00:00
Jonathan Gordon
f19f3efb07 Redo r30826 (and hopefully not reintroduce font issues) which cleans up the font API. FONT_UI is deprecated, use screens[screen].getuifont() instead (and .setuifont() to set it after a font has been loaded)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30932 a1c6a512-1295-4272-9138-f99709370657
2011-11-08 10:09:33 +00:00
Björn Stenberg
0942e2a0f7 Changed the FOR_NB_SCREENS macro to always be a for loop that declares its own loop variable. This removes the need to declare this variable in the outer scope.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30756 a1c6a512-1295-4272-9138-f99709370657
2011-10-15 19:35:02 +00:00
Jonathan Gordon
4f7a73aad8 fix FS#12295
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30614 a1c6a512-1295-4272-9138-f99709370657
2011-09-28 01:02:48 +00:00
Jonathan Gordon
aa0f4a4bbe FS#12273 - use buflib for font storage. thanks to the testers :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30589 a1c6a512-1295-4272-9138-f99709370657
2011-09-24 13:19:34 +00:00
Michael Sevakis
453550a687 Try to get some control over #ifdef hell in usb.c by refactoring and inline function use. SYS_USB_DISCONNECTED_ACK hasn't been doing anything useful for the USB thread; remove it. USB thread simply ignores that value. Observe only valid usb_state transitions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29084 a1c6a512-1295-4272-9138-f99709370657
2011-01-18 14:10:06 +00:00
Frank Gevaerts
c8c40c5291 Add a "early_usb" argument to gui_usb_screen_run(), and don't do skin unloading/reloading in gui_usb_screen_run() in the early usb case. Fixes the crash part of FS#11589
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28229 a1c6a512-1295-4272-9138-f99709370657
2010-10-10 13:17:39 +00:00
Jonathan Gordon
f101c8ad62 r27028 again.. properly close font fd's and reload the skins on usb exit (disk should be spinning so hopefully not disastrous!)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27077 a1c6a512-1295-4272-9138-f99709370657
2010-06-23 05:48:35 +00:00
Jonathan Gordon
6281d8e214 revert r27027,27028, 27071 - need to find a correct way to close font fd's. 27027 caused data aborts, 27028 caused multifont issues after returning from usb
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27072 a1c6a512-1295-4272-9138-f99709370657
2010-06-23 02:57:04 +00:00
Michael Sparmann
f86ee556cf Fix charcell red.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27029 a1c6a512-1295-4272-9138-f99709370657
2010-06-21 20:24:57 +00:00
Michael Sparmann
286ed6fab5 Unload fonts when entering UMS mode to close their file handles. Closes FS#11428
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27028 a1c6a512-1295-4272-9138-f99709370657
2010-06-21 20:19:30 +00:00
Jonathan Gordon
b8176a6761 redo r25569 so the screen is only cleared once instead of every update (which is ~2Hz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26196 a1c6a512-1295-4272-9138-f99709370657
2010-05-20 15:21:10 +00:00
Thomas Martitz
b91f15d842 Fix c&p error from r25853 that should've fixed some snprintf warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25857 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 22:22:47 +00:00
Thomas Martitz
77dfff5a55 Fix some more snprintf related warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25853 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 21:37:03 +00:00
Thomas Martitz
50a6ca39ad Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes).
This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 21:04:40 +00:00
Jens Arnold
268c6d1e7f Fix two viewport related charcell bugs: crashes in the yesno screen and the USB screen. This mess should really be fixed properly by enabling viewport management for charcell.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25587 a1c6a512-1295-4272-9138-f99709370657
2010-04-11 12:28:02 +00:00
Michael Chicoine
e3379ed812 Fix scrolling line artifacts on USB screen - should fix FS#11154
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25569 a1c6a512-1295-4272-9138-f99709370657
2010-04-10 15:55:31 +00:00
Torne Wuff
86dc6c1204 Change USB HID mode string from just "Multimedia Mode" (or similar) to say "USB keypad mode: Multimedia" (or similar).
This will hopefully reduce the huge confusion from new users who think that multimedia mode means it's doing MTP or some other thing which is not MSC.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25132 a1c6a512-1295-4272-9138-f99709370657
2010-03-12 17:32:24 +00:00
Thomas Martitz
61320ce0eb Make mini2440 compile again.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25081 a1c6a512-1295-4272-9138-f99709370657
2010-03-08 23:43:11 +00:00
Michael Giacomelli
1fefb48e87 Fix System/Running Time to reset the running time whenever a charger or USB cable is inserted, not just when the cable is inserted in the running time screen. Should now make the running time actually be the amount of time rockbox has run since the battery was last charged, which is as far as I can tell the original idea behind the runtime menu.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24954 a1c6a512-1295-4272-9138-f99709370657
2010-02-27 22:47:49 +00:00
Jonathan Gordon
eee5423fe1 skin rework (FS#10922) notable changes:
- simplify the setting/skin relationship. settings are used as the fallback if it's not specified in the skin
- backdrop buffers are now in the skin buffer (which has also increased slightly to accomodate 1 backdrop for each skin and 2 full colour screens for bmps (up for 1.5))
- if no %X is specified in a skin then the backdrop setting will be used. use %Xd to explicitly disable a skin from displaying a backdrop
- the base skin can now specify a backdrop.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24366 a1c6a512-1295-4272-9138-f99709370657
2010-01-29 07:52:13 +00:00
Jonathan Gordon
2565389402 futile attempt to keep the ondioSP rombox working. This will almost certainly be the last release with it. (The backdrop API is chaning very soon after release so this is no big deal)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24340 a1c6a512-1295-4272-9138-f99709370657
2010-01-27 06:47:56 +00:00
Bertrik Sikken
6fef14bd16 Set svn:keywords property on .c and .h files that didn't already have it. Correct svn:executable property on some files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24165 a1c6a512-1295-4272-9138-f99709370657
2010-01-03 14:28:09 +00:00
Jonathan Gordon
9d1832cfba fix FS#10870 - slightly change the viewportmanager theme undo-er to be able to force an update even if the theme isnt being toggled from off to on which caused WPS artifacts when leaving the WPS if the theme was enabled
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24087 a1c6a512-1295-4272-9138-f99709370657
2009-12-21 05:19:12 +00:00
Bertrik Sikken
5698674ece Code police: add missing header file, make some local functions static
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24083 a1c6a512-1295-4272-9138-f99709370657
2009-12-20 16:28:15 +00:00
Jeffrey Goode
033ed87321 Fix yellow: add braces
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23918 a1c6a512-1295-4272-9138-f99709370657
2009-12-10 16:21:29 +00:00
Frank Gevaerts
4862e28b67 Fix FS#10841. Thanks to Thomas Martitz for spotting what was wrong.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23914 a1c6a512-1295-4272-9138-f99709370657
2009-12-09 20:34:06 +00:00
Jonathan Gordon
b2eb44ce0e FS#10824 - viewport/statusbar API rework.
Hopefully the only user visible changes are:
- fm and recording screens go by the statusbar setting (sbs or inbuilt)
- plugins go back to using the theme as they should for menus and lists
- splash screens might get cut a bit... entirely theme and splash dependant.. if there is a problematic one we can look at it later.
- hopefully nothing more than very minor screen flickerings... let me know exactly where they are so they can be fixed

New GUI screen rules:
* Screens assume that the theme (sbs+ui viewport+ maybe background image) are always enabled. They may be disabled on a per display basis, but MUST be re-enabled on exit
* Screens must not be coded in a way that requires a statusbar of any type.. the inbuilt bar will be removed shortly.
ALWAYS RESPECT THE USERS SETTINGS unless the screen requires the full display to fit.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23904 a1c6a512-1295-4272-9138-f99709370657
2009-12-09 07:25:46 +00:00
Michael Chicoine
591ef80c9c FS#10781 - Scrolling doesn't stop when entering USB screen from WPS
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23687 a1c6a512-1295-4272-9138-f99709370657
2009-11-21 21:44:24 +00:00
Thomas Martitz
c5b4482ee2 Revert r23599 and r23600 and fix the early usb problem at the root. The the viewportmanager and custom statusbar was initialized too late.
Now, call it earlier and remove parts of it that caused the need to call it later. Removing that is OK since it's done again on settings loading.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23603 a1c6a512-1295-4272-9138-f99709370657
2009-11-10 20:13:24 +00:00
Teruaki Kawashima
0771686339 usb screen: show logo at center of ui viewport and try to fit logo and title to the viewoprt to avoid possible redraw issue with sbs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23601 a1c6a512-1295-4272-9138-f99709370657
2009-11-10 13:40:50 +00:00