Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category User Interface → Simulator
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Release 3.4
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by freddyb - 2010-02-15
Last edited by freddyb - 2010-09-09

FS#11019 - Load background images with --root option on UI Simulator

The purpose of this patch is to allow the simulator to load a background image when specifying the root directory. The current code ignores the –root option and tries to load from the current working directory. This patch will try to load the image from the parent of the given root directory.

Closed by  freddyb
2010-09-09 18:40
Reason for closing:  Rejected
Additional comments about closing:  

No interest in running the UI simulator from outside the build directory.

In case there’s any confusion about this, currently if you build a simulator and try to run it from a different directory using the –root option you won’t get a background image because the simulator looks for the image in your current working directory, not the directory of the simulator executable. This patch looks for the background image in the parent of the given root directory because the directory will look like this after “make install”:

builddir/rockboxui executable
builddir/UI256.bmp background image
builddir/simdisk/ root dir of the simulator

Admin
fg commented on 2010-02-16 17:59

I’m not sure if I like this idea. The background image corresponds to the rockboxui executable, not the root directory. If anything, the code should look at the directory containing rockboxui.
Also, I think that whatever is done, the current working directory should be tried first.

I’m not sure how to get the path of the executable in a reliable and portable way. What if I just add a separate option to manually specify the image path?

argv[0] has the path of the executable.

That’s not a safe assumption. Suppose someone uses the simulator to test WPS’s and he decides to add it to his $PATH.

I rewrote this patch so that the only change is a command line option (–playerimage [FILE]) to explicitly specify the background image. I still think some change is necessary because someone without immediate access to the source code will assume that the –remote option allows running the simulator without cd’ing to the parent directory of the simdisk.

Oops. Make that –root instead of –remote.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing