Rockbox Technical Forums

Support and General Use => Theming and Appearance Customization => Topic started by: yuuiko on September 07, 2019, 07:42:15 AM

Title: Possible to skin the USB image when USB is connected?
Post by: yuuiko on September 07, 2019, 07:42:15 AM

I'm making a theme for the iPod nano 2, and I'ke to replace the USB image that appears when it is plugged in.

Is this possible?
Title: Re: Possible to skin the USB image when USB is connected?
Post by: LambdaCalculus on September 19, 2019, 04:27:24 PM
Unfortunately that image of the USB plug is hardcoded into Rockbox, and can only really be changed at the source code level.

You could change it there and roll your own build with your own custom USB image if you desire, but there's no theme that will
skin that part of the user interface for you.
Title: Re: Possible to skin the USB image when USB is connected?
Post by: gevaerts on September 19, 2019, 05:17:41 PM
The main issue is that while USB is connected, nothing on the rockbox side is allowed to touch the filesystem, which means e.g. not having dynamic text because that might need to access font files to get new characters, and similar restrictions I don't remember. In the end we felt the complications and possible bugs were not worth it.
Title: Re: Possible to skin the USB image when USB is connected?
Post by: yuuiko on September 19, 2019, 05:58:47 PM
Interesting, thanks for your answers!
Title: Re: Possible to skin the USB image when USB is connected?
Post by: yuuiko on September 22, 2019, 08:51:06 PM
The main issue is that while USB is connected, nothing on the rockbox side is allowed to touch the filesystem, which means e.g. not having dynamic text because that might need to access font files to get new characters, and similar restrictions I don't remember. In the end we felt the complications and possible bugs were not worth it.

Just had a thought, but isn't the backdrop and font loaded in the USB screen? If this is so, why can't a USB image be cached and displayed as themed elements can be seen while on the USB screen
Title: Re: Possible to skin the USB image when USB is connected?
Post by: LambdaCalculus on September 22, 2019, 09:00:33 PM
Just had a thought, but isn't the backdrop and font loaded in the USB screen? If this is so, why can't a USB image be cached and displayed as themed elements can be seen while on the USB screen

As I had mentioned, the image of the USB plug that shows up is hardcoded as part of the Rockbox source code and is not a theme element. The backdrop that is shown is whatever is part of the current theme, which is already in memory. The USB image is displayed immediately before USB access is granted to the OS.

You can change that image yourself from within the Rockbox source code and compile your own build that includes it, but like I mentioned, there's no real easy way to do it otherwise.