libnds update

This commit is contained in:
Michael Theall 2024-11-11 18:39:34 -06:00
parent ae7f3d322c
commit 8324d8e71c
4 changed files with 10 additions and 17 deletions

View File

@ -232,7 +232,7 @@ if(NINTENDO_SWITCH)
nx_generate_nacp(${FTPD_TARGET}.nacp nx_generate_nacp(${FTPD_TARGET}.nacp
NAME "${PROJECT_NAME} pro" NAME "${PROJECT_NAME} pro"
AUTHOR "(c) 2023 Michael Theall, Dave Murphy, TuxSH" AUTHOR "(c) 2024 Michael Theall, Dave Murphy, TuxSH"
VERSION ${PROJECT_VERSION} VERSION ${PROJECT_VERSION}
) )
@ -250,7 +250,7 @@ elseif(NINTENDO_3DS)
ctr_generate_smdh(${FTPD_TARGET}.smdh ctr_generate_smdh(${FTPD_TARGET}.smdh
NAME "${PROJECT_NAME} classic" NAME "${PROJECT_NAME} classic"
DESCRIPTION "v${PROJECT_VERSION}" DESCRIPTION "v${PROJECT_VERSION}"
AUTHOR "(c) 2023 Michael Theall, Dave Murphy, TuxSH" AUTHOR "(c) 2024 Michael Theall, Dave Murphy, TuxSH"
ICON meta/icon.png ICON meta/icon.png
) )
@ -320,7 +320,7 @@ elseif(NINTENDO_3DS)
ctr_generate_smdh(${FTPD_TARGET}.smdh ctr_generate_smdh(${FTPD_TARGET}.smdh
NAME "${PROJECT_NAME} pro" NAME "${PROJECT_NAME} pro"
DESCRIPTION "v${PROJECT_VERSION}" DESCRIPTION "v${PROJECT_VERSION}"
AUTHOR "(c) 2023 Michael Theall, Dave Murphy, TuxSH" AUTHOR "(c) 2024 Michael Theall, Dave Murphy, TuxSH"
ICON meta/icon.png ICON meta/icon.png
) )
@ -341,7 +341,7 @@ elseif(NINTENDO_DS)
nds_create_rom(${FTPD_TARGET} nds_create_rom(${FTPD_TARGET}
NAME "${PROJECT_NAME} classic" NAME "${PROJECT_NAME} classic"
SUBTITLE1 "v${PROJECT_VERSION}" SUBTITLE1 "v${PROJECT_VERSION}"
SUBTITLE2 "(c) 2023 mtheall" SUBTITLE2 "(c) 2024 mtheall"
ICON nds/icon.bmp ICON nds/icon.bmp
) )
else() else()

View File

@ -26,14 +26,6 @@
#include <compare> #include <compare>
#include <cstdint> #include <cstdint>
#ifdef __NDS__
struct sockaddr_storage
{
unsigned short ss_family;
char ss_data[sizeof (struct sockaddr_in) - sizeof (unsigned short)];
};
#endif
/// \brief Socket address /// \brief Socket address
class SockAddr class SockAddr
{ {

View File

@ -34,8 +34,7 @@ struct pollfd
int revents; 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_); extern "C" int poll (pollfd *fds_, nfds_t nfds_, int timeout_);

View File

@ -52,13 +52,11 @@ bool platform::networkVisible ()
switch (Wifi_AssocStatus ()) switch (Wifi_AssocStatus ())
{ {
case ASSOCSTATUS_DISCONNECTED: case ASSOCSTATUS_DISCONNECTED:
case ASSOCSTATUS_CANNOTCONNECT:
s_addr.s_addr = 0; s_addr.s_addr = 0;
Wifi_AutoConnect (); Wifi_AutoConnect ();
break; break;
case ASSOCSTATUS_SEARCHING: case ASSOCSTATUS_SEARCHING:
case ASSOCSTATUS_AUTHENTICATING:
case ASSOCSTATUS_ASSOCIATING: case ASSOCSTATUS_ASSOCIATING:
case ASSOCSTATUS_ACQUIRINGDHCP: case ASSOCSTATUS_ACQUIRINGDHCP:
s_addr.s_addr = 0; s_addr.s_addr = 0;
@ -85,7 +83,8 @@ bool platform::networkAddress (SockAddr &addr_)
bool platform::init () bool platform::init ()
{ {
sassert (fatInitDefault (), "Failed to initialize fat"); fatInitDefault ();
defaultExceptionHandler ();
// turn off unused arm7 hardware // turn off unused arm7 hardware
powerOff (PM_SOUND_AMP); powerOff (PM_SOUND_AMP);
@ -119,6 +118,9 @@ bool platform::init ()
bool platform::loop () bool platform::loop ()
{ {
if (!pmMainLoop ())
return false;
scanKeys (); scanKeys ();
// check if the user wants to exit // check if the user wants to exit