mirror of
https://github.com/wiiu-env/ftpiiu_plugin.git
synced 2024-12-23 11:21:49 +01:00
Get local IP address on Switch correctly (#1)
This commit is contained in:
parent
10b46172fe
commit
2cb78030be
@ -2020,7 +2020,7 @@ ftp_init(void)
|
||||
|
||||
/* get address to listen on */
|
||||
serv_addr.sin_family = AF_INET;
|
||||
#ifdef _3DS
|
||||
#if defined(_3DS) || defined(SWITCH)
|
||||
serv_addr.sin_addr.s_addr = gethostid();
|
||||
serv_addr.sin_port = htons(LISTEN_PORT);
|
||||
#else
|
||||
|
@ -105,8 +105,10 @@ main(int argc,
|
||||
gfxInitDefault();
|
||||
gfxSet3D(false);
|
||||
sdmcWriteSafe(false);
|
||||
#elif defined(__SWITCH__)
|
||||
#elif defined(SWITCH)
|
||||
/* initialize needed Switch services */
|
||||
//gfxInitResolution(644, 480);
|
||||
nifmInitialize();
|
||||
gfxInitDefault();
|
||||
#endif
|
||||
|
||||
@ -176,6 +178,7 @@ log_fail:
|
||||
|
||||
/* deinitialize Switch services */
|
||||
gfxExit();
|
||||
nifmExit();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user