Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display hours in ETA if the remaining seconds is >= 3600 #866

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion arm9/source/common/ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -1431,7 +1431,11 @@ bool ShowProgress(u64 current, u64 total, const char* opstr)
ResizeString(progstr, tempstr, bar_width / FONT_WIDTH_EXT, 8, false);
DrawString(MAIN_SCREEN, progstr, bar_pos_x, text_pos_y, COLOR_STD_FONT, COLOR_STD_BG);
if (sec_elapsed >= 1) {
snprintf(tempstr, sizeof(tempstr), STR_ETA_N_MIN_N_SEC, sec_remain / 60, sec_remain % 60);
if (sec_remain >= 3600) {
snprintf(tempstr, sizeof(tempstr), STR_ETA_N_HOUR_N_MIN_N_SEC, (sec_remain / 3600), (sec_remain / 60) % 60, sec_remain % 60);
} else {
snprintf(tempstr, sizeof(tempstr), STR_ETA_N_MIN_N_SEC, sec_remain / 60, sec_remain % 60);
}
ResizeString(progstr, tempstr, 16, 8, true);
DrawString(MAIN_SCREEN, progstr, bar_pos_x + bar_width - 1 - (FONT_WIDTH_EXT * 16),
bar_pos_y - line_height - 1, COLOR_STD_FONT, COLOR_STD_BG);
Expand Down
1 change: 1 addition & 0 deletions arm9/source/language.inl
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ STRING(N_MORE, " [%d more]")
STRING(CANCEL, "cancel")
STRING(R_FAST_SCROLL_L_CLEAR_DATA, "R - (↑↓) fast scroll\nL - clear data")
STRING(X_REMOVE_CHAR_Y_INSERT_CHAR, "X - remove char\nY - insert char")
STRING(ETA_N_HOUR_N_MIN_N_SEC, "ETA %02lluh%02llum%02lluh")
STRING(ETA_N_MIN_N_SEC, "ETA %02llum%02llus")
STRING(BRIGHTNESS_CONTROLS, "[←] Decrease brightness\n[→] Increase brightness\n \n[X] Use volume slider control\n[A] Set current brightness\n[B] Cancel")
STRING(SEARCHING_PLEASE_WAIT, "Searching, please wait...")
Expand Down
1 change: 1 addition & 0 deletions resources/languages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@
"CANCEL": "abbrechen",
"R_FAST_SCROLL_L_CLEAR_DATA": "R - (↑↓) schnelles scrollen\nL - Eingabe leeren",
"X_REMOVE_CHAR_Y_INSERT_CHAR": "X - Zeichen entfernen\nY - Zeichen einfügen",
"STR_ETA_N_HOUR_N_MIN_N_SEC": "ETA %02lluh%02llum%02llus",
"ETA_N_MIN_N_SEC": "ETA %02llum%02llus",
"BRIGHTNESS_CONTROLS": "[←] Helligkeit verringern\n[→] Helligkeit erhöhen\n \n[X] Nutze Lautstärkeregler\n[A] Aktuelle Helligkeit einstellen\n[B] Abbrechen",
"SEARCHING_PLEASE_WAIT": "Suche, bitte warten...",
Expand Down
1 change: 1 addition & 0 deletions resources/languages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@
"CANCEL": "cancel",
"R_FAST_SCROLL_L_CLEAR_DATA": "R - (↑↓) fast scroll\nL - clear data",
"X_REMOVE_CHAR_Y_INSERT_CHAR": "X - remove char\nY - insert char",
"STR_ETA_N_HOUR_N_MIN_N_SEC": "ETA %02lluh%02llum%02llus",
"ETA_N_MIN_N_SEC": "ETA %02llum%02llus",
"BRIGHTNESS_CONTROLS": "[←] Decrease brightness\n[→] Increase brightness\n \n[X] Use volume slider control\n[A] Set current brightness\n[B] Cancel",
"SEARCHING_PLEASE_WAIT": "Searching, please wait...",
Expand Down
1 change: 1 addition & 0 deletions resources/languages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@
"CANCEL": "annuler",
"R_FAST_SCROLL_L_CLEAR_DATA": "R - (↑↓) défilement rapide\nL - effacer les données",
"X_REMOVE_CHAR_Y_INSERT_CHAR": "X - supprimer le caractère\nY - insérer le caractère",
"STR_ETA_N_HOUR_N_MIN_N_SEC": "ETA %02lluh%02llum%02llus",
"ETA_N_MIN_N_SEC": "ETA %02llum%02llus",
"BRIGHTNESS_CONTROLS": "[←] Decrease brightness\n[→] Increase brightness\n \n[X] Use volume slider control\n[A] Set current brightness\n[B] Cancel",
"SEARCHING_PLEASE_WAIT": "Recherche en cours, veuillez patienter…",
Expand Down
1 change: 1 addition & 0 deletions resources/languages/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@
"CANCEL": "batal",
"R_FAST_SCROLL_L_CLEAR_DATA": "R - (↑↓) gulir cepat\nL - kosongkan data",
"X_REMOVE_CHAR_Y_INSERT_CHAR": "X - hapus karakter\nY - sisip karakter",
"STR_ETA_N_HOUR_N_MIN_N_SEC": "Sisa %02lluh%02llumnt%02lludtk",
"ETA_N_MIN_N_SEC": "Sisa %02llumnt%02lludtk",
"BRIGHTNESS_CONTROLS": "[←] Kurangi kecerahan\n[→] Tingkatkan kecerahan\n \n[X] Pakai penggeser volume\n[A] Atur kecerahan saat ini\n[B] Batal",
"SEARCHING_PLEASE_WAIT": "Mencari, mohon tunggu...",
Expand Down
1 change: 1 addition & 0 deletions resources/languages/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@
"CANCEL": "キャンセル",
"R_FAST_SCROLL_L_CLEAR_DATA": "R - (↑↓) 高速スクロール\nL - データをクリア",
"X_REMOVE_CHAR_Y_INSERT_CHAR": "X - 文字を削除\nY - 文字を挿入",
"STR_ETA_N_HOUR_N_MIN_N_SEC": "残り%02llu時%02llu分%02llu秒",
"ETA_N_MIN_N_SEC": "残り%02llu分%02llu秒",
"BRIGHTNESS_CONTROLS": "[→] 明るさを上げる\n[←] 明るさを下げる\n \n[X] 音量スライダーでコントロール\n[A] 現在の明るさを設定\n[B] キャンセル",
"SEARCHING_PLEASE_WAIT": "検索中です。お待ちください。",
Expand Down
1 change: 1 addition & 0 deletions resources/languages/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@
"CANCEL": "cancel",
"R_FAST_SCROLL_L_CLEAR_DATA": "R - (↑↓) fast scroll\nL - clear data",
"X_REMOVE_CHAR_Y_INSERT_CHAR": "X - remove char\nY - insert char",
"STR_ETA_N_HOUR_N_MIN_N_SEC": "ETA %02lluh%02llum%02llus",
"ETA_N_MIN_N_SEC": "ETA %02llum%02llus",
"BRIGHTNESS_CONTROLS": "[←] Decrease brightness\n[→] Increase brightness\n \n[X] Use volume slider control\n[A] Set current brightness\n[B] Cancel",
"SEARCHING_PLEASE_WAIT": "Searching, please wait...",
Expand Down
1 change: 1 addition & 0 deletions resources/languages/source.json
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@
"CANCEL": "cancel",
"R_FAST_SCROLL_L_CLEAR_DATA": "R - (↑↓) fast scroll\nL - clear data",
"X_REMOVE_CHAR_Y_INSERT_CHAR": "X - remove char\nY - insert char",
"STR_ETA_N_HOUR_N_MIN_N_SEC": "ETA %02lluh%02llum%02llus",
"ETA_N_MIN_N_SEC": "ETA %02llum%02llus",
"BRIGHTNESS_CONTROLS": "[←] Decrease brightness\n[→] Increase brightness\n \n[X] Use volume slider control\n[A] Set current brightness\n[B] Cancel",
"SEARCHING_PLEASE_WAIT": "Searching, please wait...",
Expand Down