diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-12-05 23:37:14 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-12-05 23:37:14 +0000 |
commit | b05eec8b1ea4cbad0b668a8974c87272acc78ed6 (patch) | |
tree | d3df417790fe731d9ef7f65d01a11cbd374285dc /apps/gui/quickscreen.c | |
parent | f981ea93fb411019133a022c7dd873166d66b5dd (diff) | |
download | rockbox-b05eec8b1ea4cbad0b668a8974c87272acc78ed6.tar.gz rockbox-b05eec8b1ea4cbad0b668a8974c87272acc78ed6.zip |
Big Code Police raid. Pretty pretty please, we do no macrofy simple
assignments and things just to make them appear as function calls. That makes
code harder to follow. Did some gcc4 warning fixes as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8163 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/quickscreen.c')
-rw-r--r-- | apps/gui/quickscreen.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/apps/gui/quickscreen.c b/apps/gui/quickscreen.c index ecf496241d..8c23de9dce 100644 --- a/apps/gui/quickscreen.c +++ b/apps/gui/quickscreen.c | |||
@@ -45,14 +45,14 @@ void gui_quickscreen_draw(struct gui_quickscreen * qs, struct screen * display) | |||
45 | { | 45 | { |
46 | int w,h; | 46 | int w,h; |
47 | char buffer[30]; | 47 | char buffer[30]; |
48 | const char * option; | 48 | const unsigned char *option; |
49 | const char * title; | 49 | const unsigned char *title; |
50 | #ifdef HAS_BUTTONBAR | 50 | #ifdef HAS_BUTTONBAR |
51 | display->has_buttonbar=false; | 51 | display->has_buttonbar=false; |
52 | #endif | 52 | #endif |
53 | gui_textarea_clear(display); | 53 | gui_textarea_clear(display); |
54 | display->setfont(FONT_SYSFIXED); | 54 | display->setfont(FONT_SYSFIXED); |
55 | display->getstringsize("M",&w,&h); | 55 | display->getstringsize((unsigned char *)"M",&w,&h); |
56 | /* Displays the icons */ | 56 | /* Displays the icons */ |
57 | display->mono_bitmap(bitmap_icons_7x8[Icon_FastBackward], | 57 | display->mono_bitmap(bitmap_icons_7x8[Icon_FastBackward], |
58 | display->width/2 - 16, | 58 | display->width/2 - 16, |
@@ -65,27 +65,32 @@ void gui_quickscreen_draw(struct gui_quickscreen * qs, struct screen * display) | |||
65 | display->height/2 - 4, 7, 8); | 65 | display->height/2 - 4, 7, 8); |
66 | 66 | ||
67 | /* Displays the left's text */ | 67 | /* Displays the left's text */ |
68 | title=option_select_get_title(qs->left_option); | 68 | title=(unsigned char *)qs->left_option->title; |
69 | option=option_select_get_text(qs->left_option, buffer, sizeof buffer); | 69 | option=(unsigned char *)option_select_get_text(qs->left_option, buffer, |
70 | sizeof buffer); | ||
70 | display->putsxy(0, display->height/2 - h*2, title); | 71 | display->putsxy(0, display->height/2 - h*2, title); |
71 | display->putsxy(0, display->height/2 - h, qs->left_right_title); | 72 | display->putsxy(0, display->height/2 - h, |
73 | (unsigned char *)qs->left_right_title); | ||
72 | display->putsxy(0, display->height/2, option); | 74 | display->putsxy(0, display->height/2, option); |
73 | 75 | ||
74 | /* Displays the bottom's text */ | 76 | /* Displays the bottom's text */ |
75 | title=option_select_get_title(qs->bottom_option); | 77 | title=(unsigned char *)qs->bottom_option->title; |
76 | option=option_select_get_text(qs->bottom_option, buffer, sizeof buffer); | 78 | option=(unsigned char *)option_select_get_text(qs->bottom_option, buffer, |
79 | sizeof buffer); | ||
77 | display->getstringsize(title, &w, &h); | 80 | display->getstringsize(title, &w, &h); |
78 | display->putsxy((display->width-w)/2, display->height - h*2, title); | 81 | display->putsxy((display->width-w)/2, display->height - h*2, title); |
79 | display->getstringsize(option, &w, &h); | 82 | display->getstringsize(option, &w, &h); |
80 | display->putsxy((display->width-w)/2, display->height - h, option); | 83 | display->putsxy((display->width-w)/2, display->height - h, option); |
81 | 84 | ||
82 | /* Displays the right's text */ | 85 | /* Displays the right's text */ |
83 | title=option_select_get_title(qs->right_option); | 86 | title=(unsigned char *)qs->right_option->title; |
84 | option=option_select_get_text(qs->right_option, buffer, sizeof buffer); | 87 | option=(unsigned char *)option_select_get_text(qs->right_option, buffer, |
88 | sizeof buffer); | ||
85 | display->getstringsize(title,&w,&h); | 89 | display->getstringsize(title,&w,&h); |
86 | display->putsxy(display->width - w, display->height/2 - h*2, title); | 90 | display->putsxy(display->width - w, display->height/2 - h*2, title); |
87 | display->getstringsize(qs->left_right_title,&w,&h); | 91 | display->getstringsize((unsigned char *)qs->left_right_title, &w, &h); |
88 | display->putsxy(display->width - w, display->height/2 - h, qs->left_right_title); | 92 | display->putsxy(display->width - w, display->height/2 - h, |
93 | (unsigned char *)qs->left_right_title); | ||
89 | display->getstringsize(option,&w,&h); | 94 | display->getstringsize(option,&w,&h); |
90 | display->putsxy(display->width - w, display->height/2, option); | 95 | display->putsxy(display->width - w, display->height/2, option); |
91 | 96 | ||