screen.c remove unused getstringsize

getstringsize on SEPARATOR was overwritten by another call to
getstringsize

lang files use position to decide target strings 'RTC' was after targets using
different buttons therefore in error gained precedence

Change-Id: I40edc6c99140ac81bffd4c47d5e055ebc94ab1b2
This commit is contained in:
William Wilgus 2022-11-04 11:42:24 -04:00
parent 9da3044cf7
commit 8cbe5c95a9
2 changed files with 8 additions and 10 deletions

View file

@ -3645,22 +3645,22 @@
user: core
<source>
*: none
rtc: "ON = Set"
gigabeat*,iaudiom5,iaudiox5,ipod*,iriverh10,iriverh10_5gb,mrobe100,sansac200*,sansaclip*,sansaconnect,sansae200*,sansafuze*: "SELECT = Set"
gogearsa9200,samsungyh*: "PLAY = Set"
iriverh100,iriverh120,iriverh300: "NAVI = Set"
mpiohd300: "ENTER = Set"
mrobe500: "HEART = Set"
rtc: "ON = Set"
vibe500: "OK = Set"
</source>
<dest>
*: none
rtc: "ON = Set"
gigabeat*,iaudiom5,iaudiox5,ipod*,iriverh10,iriverh10_5gb,mrobe100,sansac200*,sansaclip*,sansaconnect,sansae200*,sansafuze*: "SELECT = Set"
gogearsa9200,samsungyh*: "PLAY = Set"
iriverh100,iriverh120,iriverh300: "NAVI = Set"
mpiohd300: "ENTER = Set"
mrobe500: "HEART = Set"
rtc: "ON = Set"
vibe500: "OK = Set"
</dest>
<voice>
@ -3674,6 +3674,7 @@
user: core
<source>
*: none
rtc: "OFF = Revert"
gigabeatfx,mrobe500: "POWER = Revert"
gigabeats,sansafuzeplus: "BACK = Revert"
gogearsa9200: "LEFT = Revert"
@ -3682,12 +3683,12 @@
iriverh10,iriverh10_5gb,sansae200*,sansafuze*: "PREV = Revert"
iriverh100,iriverh120,iriverh300: "STOP = Revert"
mrobe100: "DISPLAY = Revert"
rtc: "OFF = Revert"
samsungyh*: "REW = Revert"
vibe500: "CANCEL = Revert"
</source>
<dest>
*: none
rtc: "OFF = Revert"
gigabeatfx,mrobe500: "POWER = Revert"
gigabeats,sansafuzeplus: "BACK = Revert"
gogearsa9200: "LEFT = Revert"
@ -3696,7 +3697,6 @@
iriverh10,iriverh10_5gb,sansae200*,sansafuze*: "PREV = Revert"
iriverh100,iriverh120,iriverh300: "STOP = Revert"
mrobe100: "DISPLAY = Revert"
rtc: "OFF = Revert"
samsungyh*: "REW = Revert"
vibe500: "CANCEL = Revert"
</dest>

View file

@ -233,12 +233,10 @@ bool set_time_screen(const char* title, struct tm *tm, bool set_date)
else
prev_line_height = 0;
screen->getstringsize(SEPARATOR, &separator_width, NULL);
/* weekday */
screen->getstringsize(str(LANG_WEEKDAY_SUNDAY + tm->tm_wday),
&weekday_width, NULL);
screen->getstringsize(" ", &separator_width, NULL);
weekday_width = screen->getstringsize(str(LANG_WEEKDAY_SUNDAY + tm->tm_wday),
NULL, NULL);
separator_width = screen->getstringsize(SEPARATOR, NULL, NULL);
for(i=0, j=0; i < 6; i++)
{
@ -247,7 +245,7 @@ bool set_time_screen(const char* title, struct tm *tm, bool set_date)
j = weekday_width + separator_width;
prev_line_height *= 2;
}
screen->getstringsize(ptr[i], &width, NULL);
width = screen->getstringsize(ptr[i], NULL, NULL);
cursor[i][INDEX_Y] = prev_line_height;
cursor[i][INDEX_X] = j;
j += width + separator_width;