FS#9428 - Battery bench message is only correct for HW codec players.

Attached to Project: Rockbox
Opened by David Hall (Soap) - Sunday, 28 September 2008, 22:19 GMT
Last edited by Robert Menes (RMenes379) - Friday, 03 October 2008, 11:50 GMT
Task Type Bugs
Category Plugins
Status Closed
Assigned To No-one
Operating System SW-codec
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


When you attempt to load another plugin while battery bench is running a dialog pops up:

Batt.Bench is currently running.
Press OFF to cancel the test.
Anything else will resume.

"OFF" is only the correct key for HWcodec.

I know there is more than one way to fix this, perhaps one way smaller than the patch I offer, but I don't know how to concatenate strings w/o including STRING.H (which I assume nobody wants me to do here.)
This task depends upon

Closed by  Robert Menes (RMenes379)
Friday, 03 October 2008, 11:50 GMT
Reason for closing:  Accepted
Additional comments about closing:  Committed, take 2.
Comment by Bertrik Sikken (bertrik) - Monday, 29 September 2008, 18:33 GMT
String literals can be concatenated by simple putting them next to each other, for example printf("hello " "world!\n");
The patch looks fine to me otherwise.
Comment by David Hall (Soap) - Monday, 29 September 2008, 19:08 GMT
Well, I can either keep it as it is now (with the new #define BATTERY_OFF_MSG for all targets), or the other thought I had was to change BATTERY_OFF_TXT to just the name of the button involved (instead of the string it is now) and replace both the current display of BATTERY_OFF_TXT to a concatenated string as well as replacing "Press OFF to cancel the test" with a concatenated string.

I don't know which method is preferred.
Comment by David Hall (Soap) - Wednesday, 01 October 2008, 22:28 GMT
Here is a "more elegant" version of the patch, one which uses no additional #define lines, but changes one of the existing ones.
Perhaps people will like this one better.
Comment by Robert Menes (RMenes379) - Friday, 03 October 2008, 01:35 GMT
Committed, but temporarily pulled as it appears to break on the Player.