mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-25 06:05:56 +00:00
Count play time across runs and show it on the Game tab
A host thread adds each second in which the window has the focus and the game presents frames, keeps the total in <profile>/playtime.txt (every 30 s and at exit) and the Game tab of the settings menu shows it with this run's share. Texts in English, Russian, Brazilian Portuguese and Simplified Chinese. Closes #720. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a959eab275
commit
d850c2116d
10 files changed
+163
No files matched your search
@@ -192,6 +192,10 @@ static const char *const text_en[UI_TEXT_COUNT] = {
|
||||
"window loses focus, as on the Switch when Home is pressed; a load interrupted that "
|
||||
"way can stop for good.",
|
||||
|
||||
[UI_MENU_PLAY_TIME] = "Play time",
|
||||
[UI_MENU_PLAY_TIME_DESC] = "Time in the game over all runs, counted while the game window has the focus and the game "
|
||||
"draws frames. Kept in playtime.txt in the profile folder, next to the saves.",
|
||||
[UI_MENU_PLAY_TIME_HM] = "%llu h %02u min", [UI_MENU_PLAY_TIME_SESSION] = "this run: %s",
|
||||
[UI_MENU_MODS_BUILTIN] = "Built into the port", [UI_MENU_MODS_INSTALLED] = "Installed mods",
|
||||
[UI_MENU_MODS_NONE] = "No mods yet. Unpack a mod into the mods folder, one folder per mod with its romfs folder "
|
||||
"inside, and restart the game. TKMM can export its merged mods into a folder there too.",
|
||||
@@ -662,6 +666,10 @@ static const char *const text_ru[UI_TEXT_COUNT] = {
|
||||
"когда окно теряет фокус, как на Switch при нажатии Home; прерванная так загрузка "
|
||||
"может остановиться насовсем.",
|
||||
|
||||
[UI_MENU_PLAY_TIME] = "Время в игре",
|
||||
[UI_MENU_PLAY_TIME_DESC] = "Время в игре за все запуски. Считается, пока окно игры в фокусе и игра рисует кадры. "
|
||||
"Хранится в playtime.txt в папке профиля, рядом с сохранениями.",
|
||||
[UI_MENU_PLAY_TIME_HM] = "%llu ч %02u мин", [UI_MENU_PLAY_TIME_SESSION] = "в этом запуске: %s",
|
||||
[UI_MENU_MODS_BUILTIN] = "Встроенные в порт", [UI_MENU_MODS_INSTALLED] = "Установленные моды",
|
||||
[UI_MENU_MODS_NONE] = "Модов пока нет. Распакуйте мод в папку mods, каждый мод в свою папку с папкой romfs внутри, и "
|
||||
"перезапустите игру. TKMM тоже может выгрузить туда объединённые моды отдельной папкой.",
|
||||
@@ -983,6 +991,10 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_TAB_SCREEN] = "Tela", [UI_MENU_TAB_GAME] = "Jogo", [UI_MENU_TAB_SOUND] = "Som",
|
||||
[UI_MENU_TAB_CONTROLS] = "Controles", [UI_MENU_TAB_AMIIBO] = "Amiibo", [UI_MENU_TAB_MENU] = "Menu", [UI_MENU_TAB_ADVANCED] = "Avançado",
|
||||
[UI_MENU_TAB_MODS] = "Mods",
|
||||
[UI_MENU_PLAY_TIME] = "Tempo de jogo",
|
||||
[UI_MENU_PLAY_TIME_DESC] = "Tempo no jogo somando todas as sessões, contado enquanto a janela do jogo está em foco e o "
|
||||
"jogo desenha quadros. Fica em playtime.txt na pasta do perfil, junto dos saves.",
|
||||
[UI_MENU_PLAY_TIME_HM] = "%llu h %02u min", [UI_MENU_PLAY_TIME_SESSION] = "nesta sessão: %s",
|
||||
[UI_MENU_MODS_BUILTIN] = "Embutidos no port", [UI_MENU_MODS_INSTALLED] = "Mods instalados",
|
||||
[UI_MENU_MODS_NONE] = "Nenhum mod ainda. Descompacte um mod na pasta mods, uma pasta por mod com a pasta romfs dentro, "
|
||||
"e reinicie o jogo. O TKMM também pode exportar os mods mesclados para uma pasta ali.",
|
||||
@@ -1492,6 +1504,10 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_TAB_MENU] = "菜单",
|
||||
[UI_MENU_TAB_ADVANCED] = "高级",
|
||||
[UI_MENU_TAB_MODS] = "模组",
|
||||
[UI_MENU_PLAY_TIME] = "游戏时间",
|
||||
[UI_MENU_PLAY_TIME_DESC] = "所有运行累计的游戏时间,仅在游戏窗口处于焦点且游戏正在绘制画面时计时。"
|
||||
"保存在配置文件夹的 playtime.txt 中,与存档放在一起。",
|
||||
[UI_MENU_PLAY_TIME_HM] = "%llu 小时 %02u 分钟", [UI_MENU_PLAY_TIME_SESSION] = "本次运行:%s",
|
||||
[UI_MENU_MODS_BUILTIN] = "移植版内置", [UI_MENU_MODS_INSTALLED] = "已安装的模组",
|
||||
[UI_MENU_MODS_NONE] = "还没有模组。把模组解压到 mods 文件夹,每个模组一个文件夹,里面放 romfs 文件夹,然后重启游戏。"
|
||||
"TKMM 也可以把合并后的模组导出到那里的一个文件夹。",
|
||||
|
||||
Reference in new issue
Block a user