diff --git a/projects/APPLaunch/main/hal/sdl/hal_filesystem_sdl.cpp b/projects/APPLaunch/main/hal/sdl/hal_filesystem_sdl.cpp index 943cbc1c..1232d540 100644 --- a/projects/APPLaunch/main/hal/sdl/hal_filesystem_sdl.cpp +++ b/projects/APPLaunch/main/hal/sdl/hal_filesystem_sdl.cpp @@ -1,4 +1,5 @@ #include "../hal_filesystem.h" +#include // snprintf #include #include diff --git a/projects/APPLaunch/main/hal/sdl/hal_settings_sdl.cpp b/projects/APPLaunch/main/hal/sdl/hal_settings_sdl.cpp index 00a56b45..25ce75c0 100644 --- a/projects/APPLaunch/main/hal/sdl/hal_settings_sdl.cpp +++ b/projects/APPLaunch/main/hal/sdl/hal_settings_sdl.cpp @@ -53,6 +53,8 @@ int hal_wifi_connect(const char *ssid, const char *password) (void)ssid; (void)password; return 0; } +int hal_wifi_disconnect(void) { return 0; } + hal_bt_status_t hal_bt_get_status(void) { hal_bt_status_t st; diff --git a/projects/APPLaunch/main/ui/components/page_app/ui_app_setup.hpp b/projects/APPLaunch/main/ui/components/page_app/ui_app_setup.hpp index 5d3298bf..d665ac4c 100644 --- a/projects/APPLaunch/main/ui/components/page_app/ui_app_setup.hpp +++ b/projects/APPLaunch/main/ui/components/page_app/ui_app_setup.hpp @@ -1,5 +1,11 @@ #pragma once -#if !defined(HAL_PLATFORM_SDL) +// Note: this file used to be wrapped in `#if !defined(HAL_PLATFORM_SDL)` to +// exclude it from the emulator build, but ui_app_launch.cpp references +// UISetupPage unconditionally. The class body is HAL-clean (uses hal_wifi_*, +// hal_battery_*, hal_volume_*); residual raw syscalls (i2c ioctl, popen for +// IP/whoami, sudo date) are either already inside #ifdef __linux__ or only +// triggered by user actions that the emulator never performs. Keeping the +// class compiled on every platform lets the emulator open the SETTING page. #define _STRINGIFY(x) #x #define STRINGIFY(x) _STRINGIFY(x) #ifndef LAUNCHER_GIT_COMMIT_RAW @@ -1728,15 +1734,3 @@ class UISetupPage : public app_base } } }; - -#else // HAL_PLATFORM_SDL — stub for emulator builds -#include "../ui_app_page.hpp" - -class UISetupPage : public app_base -{ -public: - UISetupPage() : app_base() { set_page_title("SETTING"); } - ~UISetupPage() {} -}; - -#endif // !HAL_PLATFORM_SDL