Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bugs
  • Category Settings
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Uchida - 2009-02-03
Last edited by jdgordon - 2009-12-18

FS#9869 - For a setting screen, if the cursor does not move, the selected item's value is invalid.

For the setting screen, I do not move the cursor and I select the current item.
Then, when option_screen() returns, *(int*)setting→setting does not set the current item’s value.

If the cursor moves, and the top item selects, then *(int*)setting→setting sets the current item’s value.

I send this bug’s patch file.

An sample program was prepared.
test_sample.c copies apps/plugins and SOURCES edits.
Then test.sample.rock builds and it runs from Rockbox.

Closed by  jdgordon
2009-12-18 06:41
Reason for closing:  Not a Bug
Additional comments about closing:  

Yoshihisa, You need to fix that patch so you dont need to know if the setting was canceled, or do your own list handling.

the reason its crashing in your patch is because you are setting val to an invalid value… *value in option_screen() does get initialised correctly. If the selection isnt changed, then neither is the value, so whatever the value was before entering the screen it will be when exiting.

To know whether the item had been selected or the selection of the item had been canceled, I set an invalid value as “val” in test_sample.c.

It is not understood whether the selection of the item had been canceled from the return value and arguments of set_option() (or option_screen()).
Therefore, different processing cannot be done whether for the item to have been selected.

Then, I thought whether be able to judge that the selection of the item was canceled if the value of “val” after set_option() was executed was an invalid value.


settings should never have invalid value.. why do you need to know if a setting was canceled?

For  FS#9892 , I made the patch that made it jump to the first page when the bookmark was not selected.
I found this bug while making the above patch file.

Does something good method exist?


Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing