diff --git a/client/hardware.h b/client/hardware.h index 48f4ab0d..38fc7fdd 100644 --- a/client/hardware.h +++ b/client/hardware.h @@ -51,7 +51,7 @@ enum class feature model guess_model(); std::string model_name(); -XrViewConfigurationView override_view(XrViewConfigurationView, model); +XrViewConfigurationView override_view(XrViewConfigurationView, model = guess_model()); bool need_srgb_conversion(model); diff --git a/client/locale/fr/wivrn.po b/client/locale/fr/wivrn.po index 99f2df2a..170fa630 100644 --- a/client/locale/fr/wivrn.po +++ b/client/locale/fr/wivrn.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: WiVRn 0.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-12-02 00:06+0100\n" +"POT-Creation-Date: 2024-12-18 23:08+0100\n" "PO-Revision-Date: 2024-05-20 13:00+0200\n" "Last-Translator: Guillaume Meunier \n" "Language: French\n" @@ -132,127 +132,132 @@ msgstr "Serveur non disponible" msgid "Refresh rate" msgstr "Taux de rafraichissement" -#: client/scenes/lobby_gui.cpp:611 +#: client/scenes/lobby_gui.cpp:610 msgid "Resolution scale" msgstr "Échelle" -#: client/scenes/lobby_gui.cpp:611 client/scenes/lobby_gui.cpp:615 +#: client/scenes/lobby_gui.cpp:610 client/scenes/lobby_gui.cpp:614 #, c++-format -msgid "{} - {}x{} per eye" -msgstr "{} - {}x{} par œil" +msgid "{}% - {}x{} per eye" +msgstr "{}% - {}x{} par œil" -#: client/scenes/lobby_gui.cpp:628 +#: client/scenes/lobby_gui.cpp:627 +#, c++-format +msgid "Resolution larger than {}x{} may not be supported by the headset" +msgstr "Les résolutions plus grandes que {}x{} pourraient ne pas fonctionner" + +#: client/scenes/lobby_gui.cpp:633 msgid "Enable microphone" msgstr "Activer le micro" -#: client/scenes/lobby_gui.cpp:638 +#: client/scenes/lobby_gui.cpp:643 msgid "Enable hand tracking" msgstr "Activer le suivi des mains" -#: client/scenes/lobby_gui.cpp:645 client/scenes/lobby_gui.cpp:658 -#: client/scenes/lobby_gui.cpp:671 client/scenes/lobby_gui.cpp:683 +#: client/scenes/lobby_gui.cpp:650 client/scenes/lobby_gui.cpp:663 +#: client/scenes/lobby_gui.cpp:676 client/scenes/lobby_gui.cpp:688 msgid "This feature is not supported by your headset" msgstr "Cette fonctionnalité n'est pas supportée par le casque" -#: client/scenes/lobby_gui.cpp:651 +#: client/scenes/lobby_gui.cpp:656 msgid "Enable eye tracking" msgstr "Activer le suivi des yeux" -#: client/scenes/lobby_gui.cpp:664 +#: client/scenes/lobby_gui.cpp:669 msgid "Enable face tracking" msgstr "Activer le suivi du visage" -#: client/scenes/lobby_gui.cpp:676 +#: client/scenes/lobby_gui.cpp:681 msgid "Enable video passthrough in lobby" msgstr "Activer la vue réelle dans l'accueil" -#: client/scenes/lobby_gui.cpp:686 +#: client/scenes/lobby_gui.cpp:691 msgid "Show performance metrics" msgstr "Afficher les métriques de performances" -#: client/scenes/lobby_gui.cpp:690 +#: client/scenes/lobby_gui.cpp:695 msgid "Overlay can be toggled by pressing both thumbsticks" msgstr "L'affichage peut être basculé en appuyant sur les deux joysticks" -#: client/scenes/lobby_gui.cpp:720 client/scenes/lobby_gui.cpp:728 +#: client/scenes/lobby_gui.cpp:725 client/scenes/lobby_gui.cpp:733 #: client/scenes/stream_stats.cpp:159 msgid "CPU time" msgstr "Temps CPU" -#: client/scenes/lobby_gui.cpp:724 +#: client/scenes/lobby_gui.cpp:729 msgid "CPU time [ms]" msgstr "Temps CPU [ms]" -#: client/scenes/lobby_gui.cpp:734 client/scenes/lobby_gui.cpp:742 +#: client/scenes/lobby_gui.cpp:739 client/scenes/lobby_gui.cpp:747 #: client/scenes/stream_stats.cpp:161 msgid "GPU time" msgstr "Temps GPU" -#: client/scenes/lobby_gui.cpp:738 +#: client/scenes/lobby_gui.cpp:743 msgid "GPU time [ms]" msgstr "Temps GPU [ms]" -#: client/scenes/lobby_gui.cpp:828 client/scenes/lobby_gui.cpp:1456 +#: client/scenes/lobby_gui.cpp:833 client/scenes/lobby_gui.cpp:1461 msgid "Licenses" msgstr "Licences" -#: client/scenes/lobby_gui.cpp:1167 +#: client/scenes/lobby_gui.cpp:1172 msgid "Microphone is enabled" msgstr "Le micro est activé" -#: client/scenes/lobby_gui.cpp:1168 +#: client/scenes/lobby_gui.cpp:1173 msgid "Microphone is disabled" msgstr "Le micro est désactivé" -#: client/scenes/lobby_gui.cpp:1177 +#: client/scenes/lobby_gui.cpp:1182 msgid "Hand tracking is enabled" msgstr "Le suivi des mains est activé" -#: client/scenes/lobby_gui.cpp:1178 +#: client/scenes/lobby_gui.cpp:1183 msgid "Hand tracking is disabled" msgstr "Le suivi des mains est désactivé" -#: client/scenes/lobby_gui.cpp:1187 +#: client/scenes/lobby_gui.cpp:1192 msgid "Eye tracking is enabled" msgstr "Le suivi des yeux est activé" -#: client/scenes/lobby_gui.cpp:1188 +#: client/scenes/lobby_gui.cpp:1193 msgid "Eye tracking is disabled" msgstr "Le suivi des yeux est désactivé" -#: client/scenes/lobby_gui.cpp:1198 +#: client/scenes/lobby_gui.cpp:1203 msgid "Face tracking is enabled" msgstr "Le suivi du visage est activé" -#: client/scenes/lobby_gui.cpp:1199 +#: client/scenes/lobby_gui.cpp:1204 msgid "Face tracking is disabled" msgstr "Le suivi du visage est désactivé" -#: client/scenes/lobby_gui.cpp:1216 +#: client/scenes/lobby_gui.cpp:1221 msgid "Add server" msgstr "Ajouter un serveur" -#: client/scenes/lobby_gui.cpp:1441 +#: client/scenes/lobby_gui.cpp:1446 msgid "Server list" msgstr "Serveurs" -#: client/scenes/lobby_gui.cpp:1444 +#: client/scenes/lobby_gui.cpp:1449 msgid "Settings" msgstr "Paramètres" -#: client/scenes/lobby_gui.cpp:1448 +#: client/scenes/lobby_gui.cpp:1453 msgid "Debug" msgstr "Debug" -#: client/scenes/lobby_gui.cpp:1453 +#: client/scenes/lobby_gui.cpp:1458 msgid "About" msgstr "À propos" -#: client/scenes/lobby_gui.cpp:1459 +#: client/scenes/lobby_gui.cpp:1464 msgid "Exit" msgstr "Quitter" -#: client/scenes/lobby_gui.cpp:1473 +#: client/scenes/lobby_gui.cpp:1478 msgid "" "Press A or X or put your palm up\n" "to move the main window" @@ -260,7 +265,7 @@ msgstr "" "Appuyez sur A ou X ou placez votre paume\n" "vers le haut pour déplacer la fenêtre principale" -#: client/scenes/lobby_gui.cpp:1475 +#: client/scenes/lobby_gui.cpp:1480 msgid "Press A or X to move the main window" msgstr "" "Appuyez sur A ou X pour\n" diff --git a/client/locale/it/wivrn.po b/client/locale/it/wivrn.po index 90a85633..528a313d 100644 --- a/client/locale/it/wivrn.po +++ b/client/locale/it/wivrn.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: WiVRn 0.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-12-02 00:12+0100\n" +"POT-Creation-Date: 2024-12-18 23:08+0100\n" "PO-Revision-Date: 2024-10-15 20:16+0100\n" "Last-Translator: Albano Battistella \n" "Language: Italian\n" @@ -131,127 +131,132 @@ msgstr "Server non disponibile" msgid "Refresh rate" msgstr "Frequenza di aggiornamento" -#: client/scenes/lobby_gui.cpp:611 +#: client/scenes/lobby_gui.cpp:610 msgid "Resolution scale" msgstr "Scala di risoluzione" -#: client/scenes/lobby_gui.cpp:611 client/scenes/lobby_gui.cpp:615 +#: client/scenes/lobby_gui.cpp:610 client/scenes/lobby_gui.cpp:614 #, c++-format -msgid "{} - {}x{} per eye" -msgstr "{} - {}x{} per occhio" +msgid "{}% - {}x{} per eye" +msgstr "{}% - {}x{} per occhio" -#: client/scenes/lobby_gui.cpp:628 +#: client/scenes/lobby_gui.cpp:627 +#, c++-format +msgid "Resolution larger than {}x{} may not be supported by the headset" +msgstr "Le risoluzioni superiori a {}x{} potrebbero non essere supportate dal visore" + +#: client/scenes/lobby_gui.cpp:633 msgid "Enable microphone" msgstr "Attiva il microfono" -#: client/scenes/lobby_gui.cpp:638 +#: client/scenes/lobby_gui.cpp:643 msgid "Enable hand tracking" msgstr "Abilita il tracciamento delle mani" -#: client/scenes/lobby_gui.cpp:645 client/scenes/lobby_gui.cpp:658 -#: client/scenes/lobby_gui.cpp:671 client/scenes/lobby_gui.cpp:683 +#: client/scenes/lobby_gui.cpp:650 client/scenes/lobby_gui.cpp:663 +#: client/scenes/lobby_gui.cpp:676 client/scenes/lobby_gui.cpp:688 msgid "This feature is not supported by your headset" msgstr "Questa funzionalità non è supportata dal visore" -#: client/scenes/lobby_gui.cpp:651 +#: client/scenes/lobby_gui.cpp:656 msgid "Enable eye tracking" msgstr "Abilita il tracciamento oculare" -#: client/scenes/lobby_gui.cpp:664 +#: client/scenes/lobby_gui.cpp:669 msgid "Enable face tracking" msgstr "Abilita il tracciamento facciale" -#: client/scenes/lobby_gui.cpp:676 +#: client/scenes/lobby_gui.cpp:681 msgid "Enable video passthrough in lobby" msgstr "Abilita la visualizzazione reale in ingresso" -#: client/scenes/lobby_gui.cpp:686 +#: client/scenes/lobby_gui.cpp:691 msgid "Show performance metrics" msgstr "Mostra metriche delle prestazioni" -#: client/scenes/lobby_gui.cpp:690 +#: client/scenes/lobby_gui.cpp:695 msgid "Overlay can be toggled by pressing both thumbsticks" msgstr "È possibile alternare la visualizzazione premendo entrambi i joystick" -#: client/scenes/lobby_gui.cpp:720 client/scenes/lobby_gui.cpp:728 +#: client/scenes/lobby_gui.cpp:725 client/scenes/lobby_gui.cpp:733 #: client/scenes/stream_stats.cpp:159 msgid "CPU time" msgstr "Tempo CPU" -#: client/scenes/lobby_gui.cpp:724 +#: client/scenes/lobby_gui.cpp:729 msgid "CPU time [ms]" msgstr "Tempo CPU [ms]" -#: client/scenes/lobby_gui.cpp:734 client/scenes/lobby_gui.cpp:742 +#: client/scenes/lobby_gui.cpp:739 client/scenes/lobby_gui.cpp:747 #: client/scenes/stream_stats.cpp:161 msgid "GPU time" msgstr "Tempo GPU" -#: client/scenes/lobby_gui.cpp:738 +#: client/scenes/lobby_gui.cpp:743 msgid "GPU time [ms]" msgstr "Tempo GPU [ms]" -#: client/scenes/lobby_gui.cpp:828 client/scenes/lobby_gui.cpp:1456 +#: client/scenes/lobby_gui.cpp:833 client/scenes/lobby_gui.cpp:1461 msgid "Licenses" msgstr "Licenze" -#: client/scenes/lobby_gui.cpp:1167 +#: client/scenes/lobby_gui.cpp:1172 msgid "Microphone is enabled" msgstr "Microfono attivo" -#: client/scenes/lobby_gui.cpp:1168 +#: client/scenes/lobby_gui.cpp:1173 msgid "Microphone is disabled" msgstr "Microfono disattivato" -#: client/scenes/lobby_gui.cpp:1177 +#: client/scenes/lobby_gui.cpp:1182 msgid "Hand tracking is enabled" msgstr "Tracciamento delle mani attivo" -#: client/scenes/lobby_gui.cpp:1178 +#: client/scenes/lobby_gui.cpp:1183 msgid "Hand tracking is disabled" msgstr "Tracciamento delle mani disattivato" -#: client/scenes/lobby_gui.cpp:1187 +#: client/scenes/lobby_gui.cpp:1192 msgid "Eye tracking is enabled" msgstr "Tracciamento oculare attivo" -#: client/scenes/lobby_gui.cpp:1188 +#: client/scenes/lobby_gui.cpp:1193 msgid "Eye tracking is disabled" msgstr "Tracciamento oculare disattivato" -#: client/scenes/lobby_gui.cpp:1198 +#: client/scenes/lobby_gui.cpp:1203 msgid "Face tracking is enabled" msgstr "Tracciamento facciale attivato" -#: client/scenes/lobby_gui.cpp:1199 +#: client/scenes/lobby_gui.cpp:1204 msgid "Face tracking is disabled" msgstr "Tracciamento facciale disattivato" -#: client/scenes/lobby_gui.cpp:1216 +#: client/scenes/lobby_gui.cpp:1221 msgid "Add server" msgstr "Aggiungi server" -#: client/scenes/lobby_gui.cpp:1441 +#: client/scenes/lobby_gui.cpp:1446 msgid "Server list" msgstr "Elenco dei server" -#: client/scenes/lobby_gui.cpp:1444 +#: client/scenes/lobby_gui.cpp:1449 msgid "Settings" msgstr "Impostazioni" -#: client/scenes/lobby_gui.cpp:1448 +#: client/scenes/lobby_gui.cpp:1453 msgid "Debug" msgstr "Debug" -#: client/scenes/lobby_gui.cpp:1453 +#: client/scenes/lobby_gui.cpp:1458 msgid "About" msgstr "Informazioni" -#: client/scenes/lobby_gui.cpp:1459 +#: client/scenes/lobby_gui.cpp:1464 msgid "Exit" msgstr "Esci" -#: client/scenes/lobby_gui.cpp:1473 +#: client/scenes/lobby_gui.cpp:1478 msgid "" "Press A or X or put your palm up\n" "to move the main window" @@ -259,7 +264,7 @@ msgstr "" "Premi A, X o punta il palmo della mano verso l'alto\n" "per spostare la finestra principale" -#: client/scenes/lobby_gui.cpp:1475 +#: client/scenes/lobby_gui.cpp:1480 msgid "Press A or X to move the main window" msgstr "Premi A o X per spostare la finestra principale" diff --git a/client/scenes/lobby_gui.cpp b/client/scenes/lobby_gui.cpp index b6f1c06d..5e6628b5 100644 --- a/client/scenes/lobby_gui.cpp +++ b/client/scenes/lobby_gui.cpp @@ -604,23 +604,28 @@ void scenes::lobby::gui_settings() } { - const auto available_scales = {0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0}; const auto current = config.resolution_scale; const auto width = stream_view.recommendedImageRectWidth; const auto height = stream_view.recommendedImageRectHeight; - if (ImGui::BeginCombo(_S("Resolution scale"), fmt::format(_F("{} - {}x{} per eye"), current, (int)(width * current), (int)(height * current)).c_str())) + if (ImGui::BeginCombo(_S("Resolution scale"), fmt::format(_F("{}% - {}x{} per eye"), int(current * 100), int(width * current), int(height * current)).c_str())) { - for (float scale: available_scales) + for (int scale = 50; scale <= 200; scale += 10) { - if (ImGui::Selectable(fmt::format(_F("{} - {}x{} per eye"), scale, (int)(width * scale), (int)(height * scale)).c_str(), scale == current, ImGuiSelectableFlags_SelectOnRelease) and scale != current) + if (ImGui::Selectable(fmt::format(_F("{}% - {}x{} per eye"), scale, (width * scale) / 100, (height * scale) / 100).c_str(), scale == current, ImGuiSelectableFlags_SelectOnRelease) and scale != current) { - config.resolution_scale = scale; + config.resolution_scale = scale * 0.01; config.save(); } } ImGui::EndCombo(); } vibrate_on_hover(); + if (width * config.resolution_scale > stream_view.maxImageRectWidth or height * config.resolution_scale > stream_view.maxImageRectHeight) + { + ImGui::TextColored(ImColor(0xf9, 0x73, 0x06) /*orange*/, ICON_FA_TRIANGLE_EXCLAMATION); + ImGui::SameLine(); + ImGui::Text("%s", fmt::format(_F("Resolution larger than {}x{} may not be supported by the headset"), stream_view.maxImageRectWidth, stream_view.maxImageRectHeight).c_str()); + } } { diff --git a/client/scenes/stream.cpp b/client/scenes/stream.cpp index 3a3f9d41..6970ff1f 100644 --- a/client/scenes/stream.cpp +++ b/client/scenes/stream.cpp @@ -1046,12 +1046,14 @@ void scenes::stream::setup_reprojection_swapchain() for (auto view: views) { XrExtent2Di extent{ - .width = std::min(view.maxImageRectWidth, swapchain_width), - .height = std::min(view.maxImageRectHeight, swapchain_height), + .width = int32_t(swapchain_width), + .height = int32_t(swapchain_height), }; swapchains.emplace_back(session, device, swapchain_format, extent.width, extent.height); spdlog::info("Created stream swapchain {}: {}x{}", swapchains.size(), extent.width, extent.height); + if (extent.width > view.maxImageRectWidth or extent.height > view.maxImageRectHeight) + spdlog::warn("Swapchain size larger than maximum {}x{}", view.maxImageRectWidth, view.maxImageRectHeight); } spdlog::info("Initializing reprojector");