diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f37796..67af808 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -232,7 +232,7 @@ if(NINTENDO_SWITCH) nx_generate_nacp(${FTPD_TARGET}.nacp NAME "${PROJECT_NAME} pro" - AUTHOR "(c) 2023 Michael Theall, Dave Murphy, TuxSH" + AUTHOR "(c) 2024 Michael Theall, Dave Murphy, TuxSH" VERSION ${PROJECT_VERSION} ) @@ -250,7 +250,7 @@ elseif(NINTENDO_3DS) ctr_generate_smdh(${FTPD_TARGET}.smdh NAME "${PROJECT_NAME} classic" DESCRIPTION "v${PROJECT_VERSION}" - AUTHOR "(c) 2023 Michael Theall, Dave Murphy, TuxSH" + AUTHOR "(c) 2024 Michael Theall, Dave Murphy, TuxSH" ICON meta/icon.png ) @@ -320,7 +320,7 @@ elseif(NINTENDO_3DS) ctr_generate_smdh(${FTPD_TARGET}.smdh NAME "${PROJECT_NAME} pro" DESCRIPTION "v${PROJECT_VERSION}" - AUTHOR "(c) 2023 Michael Theall, Dave Murphy, TuxSH" + AUTHOR "(c) 2024 Michael Theall, Dave Murphy, TuxSH" ICON meta/icon.png ) @@ -341,7 +341,7 @@ elseif(NINTENDO_DS) nds_create_rom(${FTPD_TARGET} NAME "${PROJECT_NAME} classic" SUBTITLE1 "v${PROJECT_VERSION}" - SUBTITLE2 "(c) 2023 mtheall" + SUBTITLE2 "(c) 2024 mtheall" ICON nds/icon.bmp ) else() diff --git a/include/sockAddr.h b/include/sockAddr.h index aa05517..7f36ba5 100644 --- a/include/sockAddr.h +++ b/include/sockAddr.h @@ -26,14 +26,6 @@ #include #include -#ifdef __NDS__ -struct sockaddr_storage -{ - unsigned short ss_family; - char ss_data[sizeof (struct sockaddr_in) - sizeof (unsigned short)]; -}; -#endif - /// \brief Socket address class SockAddr { diff --git a/include/socket.h b/include/socket.h index 1e9973f..9273765 100644 --- a/include/socket.h +++ b/include/socket.h @@ -34,8 +34,7 @@ struct pollfd int revents; }; -using socklen_t = int; -using nfds_t = unsigned int; +using nfds_t = unsigned int; extern "C" int poll (pollfd *fds_, nfds_t nfds_, int timeout_); diff --git a/source/nds/platform.cpp b/source/nds/platform.cpp index b2b3e7b..6461c18 100644 --- a/source/nds/platform.cpp +++ b/source/nds/platform.cpp @@ -52,13 +52,11 @@ bool platform::networkVisible () switch (Wifi_AssocStatus ()) { case ASSOCSTATUS_DISCONNECTED: - case ASSOCSTATUS_CANNOTCONNECT: s_addr.s_addr = 0; Wifi_AutoConnect (); break; case ASSOCSTATUS_SEARCHING: - case ASSOCSTATUS_AUTHENTICATING: case ASSOCSTATUS_ASSOCIATING: case ASSOCSTATUS_ACQUIRINGDHCP: s_addr.s_addr = 0; @@ -85,7 +83,8 @@ bool platform::networkAddress (SockAddr &addr_) bool platform::init () { - sassert (fatInitDefault (), "Failed to initialize fat"); + fatInitDefault (); + defaultExceptionHandler (); // turn off unused arm7 hardware powerOff (PM_SOUND_AMP); @@ -119,6 +118,9 @@ bool platform::init () bool platform::loop () { + if (!pmMainLoop ()) + return false; + scanKeys (); // check if the user wants to exit