summaryrefslogtreecommitdiffstats
path: root/apps/gui/pitchscreen.c
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2009-10-10 09:57:03 +0000
committerNils Wallménius <nils@rockbox.org>2009-10-10 09:57:03 +0000
commit46a0db45dd2436442f3679b21b7cf631358be585 (patch)
tree7930bbd10629e05de3ee11671cc3e1daa2374e3e /apps/gui/pitchscreen.c
parentbb1549aad76ee096b00451ff3640748d74ab3a08 (diff)
downloadrockbox-46a0db45dd2436442f3679b21b7cf631358be585.tar.gz
rockbox-46a0db45dd2436442f3679b21b7cf631358be585.tar.bz2
rockbox-46a0db45dd2436442f3679b21b7cf631358be585.zip
Slight const police and avoid copying a lang string
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23065 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/pitchscreen.c')
-rw-r--r--apps/gui/pitchscreen.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/gui/pitchscreen.c b/apps/gui/pitchscreen.c
index 78d049be10..8f542e8f27 100644
--- a/apps/gui/pitchscreen.c
+++ b/apps/gui/pitchscreen.c
@@ -199,7 +199,7 @@ static void pitchscreen_draw(struct screen *display, int max_lines,
#endif
)
{
- unsigned char* ptr;
+ const char* ptr;
char buf[32];
int w, h;
bool show_lang_pitch;
@@ -318,10 +318,10 @@ static void pitchscreen_draw(struct screen *display, int max_lines,
{
if(at_limit)
{
- snprintf(buf, sizeof(buf), "%s", str(LANG_STRETCH_LIMIT));
- display->getstringsize(buf, &w, &h);
+ const char * const p = str(LANG_STRETCH_LIMIT);
+ display->getstringsize(p, &w, &h);
display->putsxy((pitch_viewports[PITCH_MID].width / 2) - (w / 2),
- (pitch_viewports[PITCH_MID].height / 2) + h, buf);
+ (pitch_viewports[PITCH_MID].height / 2) + h, p);
if (w > width_used)
width_used = w;
}