Conversation
Introduce client-side UI and state management plus extensive build and platform adjustments for Xbox/nxdk. Key changes: - Add app UI/state implementation (src/app/*), pairing, host records, networking, startup, logging, input navigation, streaming overlay, and many UI components. - Add compatibility shims for OpenSSL and moonlight-common-c, plus new FindNXDK_SDL2_TTF CMake module and font/logo assets. - Add many unit tests covering app, input, logging, network, startup and UI components (tests/unit/*). - Update CMake build: enable export of compile commands, add xbox mingw64 CMake presets, register SDL2_TTF, include libxboxrt, and pass compat header into moonlight-common-c build. - Revise GetOpenSSL: pin OpenSSL to 1.1.1w, add platform-aware configure/build logic for HOST vs XBOX, set configure options and env vars, and link host system libs when appropriate. - Small cmake/source tweaks: exclude shell_screen from host tests, export compile commands for child builds, and link NXDK::Net into ws2_32 target. - Enhance run-xemu scripts to support network mode and TAP interface, to propagate XEMU-related environment paths, and to include network args when launching xemu. - Update .gitmodules to track OpenSSL OpenSSL_1_1_1-stable branch and update third-party/openssl submodule reference. These changes add core UI/state functionality and platform-specific build/tooling to support building and running on Xbox (nxdk) and improve host-side OpenSSL vendoring. Some new files are large and introduce the initial app logic and tests.
Provide NXDK-specific compatibility for OpenSSL and sockets: add src/_nxdk_compat (openssl_compat.h, poll_compat.cpp, stat_compat.cpp), remove legacy openssl compat files, and wire them into CMake (include dirs, build/install commands, and source list changes). Refactor host_pairing to be cross-platform (NXDK vs Winsock): unify socket error handling, non-blocking connect helper, timeouts, TLS connect error reporting, serverinfo path construction with uniqueId, and ensure socket initialization works on NXDK. Minor UI text cleanups and include stat_compat.cpp in the final executable. Also update third-party submodule pins for moonlight-common-c and nxdk.
Introduce the first M0 client shell and supporting infrastructure: structured in-memory logging (logger + log_file), controller/keyboard input mapping, retained menu model, host records and pairing flow scaffolding, saved files and cover art cache, startup memory/video utilities, and UI state management (client_state). Adds grid/modal navigation, add-host keypad, apps view, log viewer, and many unit tests and icon assets. Also includes various refactors and helpers for host/app selection, scrolling, and menu rebuilding to enable further work on pairing, streaming and Xbox runtime integration.
Record and handle data cleanup when hosts are deleted: add pairingResetEndpoints to ClientState and new AppUpdate fields to request host-delete cleanup and carry deleted host metadata (address, port, paired flag, cover art keys). Implement helpers to remember/clear deleted host pairing and to check host_requires_manual_pairing, and clear these records when a host is successfully re-paired. Add startup APIs to delete persisted client identity and cached cover art (delete_client_identity, delete_cover_art) with basic error reporting. Wire a delete_host_data_if_requested flow that removes cached cover art, clears texture cache, and resets the shared client identity if no paired hosts remain, updating status messages accordingly. Improve settings/menu synchronization (sync_selected_settings_category_from_menu, rebuild_settings_detail_menu) and adjust UI rendering for the menu/options/detail layout and visuals. Simplify SVG asset handling and texture creation (use SDL scale hint for quality), and swap footer action icons for Exit in the view model. Update many SVG icon assets to remove text parameters (nanosvg limitation) and tweak visuals, add xbe/assets README, and extend unit tests to cover host deletion/pairing cleanup, client identity deletion, and cover art deletion. Also mark several README features as completed.
Add verbose startup debug logging and encoder diagnostics, and harden video mode selection and UI layout for widescreen/HD scenarios. - main.cpp: introduce debug_print_* helpers, log XVideoGetEncoderSettings, XVideoSetMode result, SDL initialization/window creation, and startup task lifecycle for easier diagnostics. - splash: always apply aspect correction when framebuffer vs display aspect differs; add calculate_display_width() to compute logical UI width based on effective display aspect (header and implementation), and adjust logo scaling logic. - ui/shell_screen: query encoder settings, compute logical screen width via calculate_display_width, apply horizontal SDL renderer scaling to render square-pixel UI, and restore scale after presenting. - startup/video_mode: prefer 720p progressive over 1080i interlaced when both are available; add helper is_1080i and update selection logic. - tests: add unit tests for the 4:3 correction on HD modes, calculate_display_width behavior, and preferring 720p over 1080i. - scripts/README: note widescreen tool in README and update run-xemu.sh to set display.ui aspect_ratio = 'native' in generated config. These changes improve widescreen support, ensure UI layout uses a logical square-pixel width, prefer progressive HD modes for clarity, and make startup video/debug issues easier to diagnose.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #160 +/- ##
===========================================
- Coverage 61.40% 46.06% -15.35%
===========================================
Files 2 26 +24
Lines 57 4036 +3979
Branches 13 1936 +1923
===========================================
+ Hits 35 1859 +1824
- Misses 15 1567 +1552
- Partials 7 610 +603
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
|
f8d5ab8 to
9f8a64a
Compare
Remove the imported ws2_32 target and all NXDK::ws2_32 link usages from CMake (FindNXDK.cmake, xbox-build.cmake, GetOpenSSL.cmake) and link against NXDK::Net instead. Update OpenSSL target linkage to omit ws2_32 on HOST Windows builds. Add lwIP/socket compatibility helpers to src/_nxdk_compat/openssl_compat.h: include lwip/opt.h, sys/time.h and string.h, declare lwip_select, provide defaults for LWIP_SOCKET_OFFSET and FD_SETSIZE (based on MEMP_NUM_NETCONN), and define fd_set plus FD_* macros and a select macro that maps to lwip_select. These changes remove the dependency on WinSock symbols and provide a minimal fd_set/select shim for lwIP on NXDK.
2ef36ea to
2f58f07
Compare
Introduce platform::filesystem utilities and centralize dependency preparation.
- Add src/platform/filesystem_utils.{h,cpp} to provide cross-platform path operations, directory creation, file size checks and prefix checks.
- Replace duplicated path and directory helper code in logging, startup (client_identity_storage, cover_art_cache, host_storage, saved_files) with platform:: APIs and use platform::join_path for consistent path handling.
- Make saved_files and host_pairing more portable: add POSIX directory enumeration and socket handling fallbacks, unify SOCKET handling and non-blocking configuration.
- Improve OpenSSL vendored build: add msys2 support, shell-quoting helpers and platform-specific configure/build commands in cmake/modules/GetOpenSSL.cmake; expose provider/platform info and link ws2_32 for Windows host builds when needed.
- Add cmake/moonlight-dependencies.cmake to prepare common third-party dependencies (moonlight-common-c, OpenSSL, enet) and use it from top-level CMakeLists and xbox-build.cmake.
- Tests: add tests/support/filesystem_test_utils.h and update tests to use it; require prepared Moonlight dependency targets in tests/CMakeLists and link Moonlight::OpenSSL (add ws2_32 on Windows), and add dependency on moonlight-common-c for test target.
These changes reduce duplicated filesystem/platform code, improve portability across Windows/Unix/NXDK, and centralize dependency configuration for builds and tests.
6e04711 to
806469f
Compare
Make Windows/Mingw builds more reliable and surface better logs. CI: install mingw-w64-x86_64-cmake for MinGW CMake support and expand failure debug step to print OpenSSL configure/build logs for host and Xbox builds. build.sh: collect CMake configure args into an array, require a CMake with MinGW Makefiles on Windows, and set the MinGW generator and toolchain file. cmake/modules/GetOpenSSL.cmake: introduce a deterministic external target name, clear Make-related env vars, pass MAKEFLAGS/MFLAGS/GNUMAKEFLAGS/MAKELEVEL and enforce single-job (-j1) builds for Windows/MSYS to avoid parallel build issues; properly map compiler/AR/RANLIB into MSYS2 shell commands; use the new external target name in ExternalProject_Add and add_dependencies; and emit the OpenSSL external target in status messages. cmake/moonlight-dependencies.cmake: conditionally wire moonlight-common-c to the OpenSSL external target when defined and present. These changes improve reproducibility and Windows build stability.
806469f to
fca1ab5
Compare
Add Doxygen-style comments across many public headers to document structs, functions, parameters and return values. Updated .github/copilot-instructions.md to require/mention Doxygen documentation. Files touched include openssl_compat.h, client_state.h, host_records.h, pairing_flow.h, log_file.h, logger.h, host_pairing.h, runtime_network.h, client_identity_storage.h, cover_art_cache.h, host_storage.h, saved_files.h, stats_overlay.h, menu_model.h, shell_view.h and a small SVG asset tweak. These comments improve API clarity and help enforce build-time documentation checks.
3d105cb to
afa99a2
Compare
d15ae79 to
33d944e
Compare
783f866 to
e0c4603
Compare
|
e0c4603 to
c8ad2df
Compare




Description
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage