mirror of
https://github.com/libretro/RetroArch
synced 2025-04-03 10:21:31 +00:00
Merge pull request #12123 from crystalct/master
Add some PSL1GHT ifdefs
This commit is contained in:
commit
6e96b9647a
@ -517,6 +517,11 @@ extern int audioAddData(uint32_t portNum, float *data,
|
|||||||
#define cellNetCtlTerm netCtlTerm
|
#define cellNetCtlTerm netCtlTerm
|
||||||
|
|
||||||
#define CELL_NET_CTL_STATE_IPObtained NET_CTL_STATE_IPObtained
|
#define CELL_NET_CTL_STATE_IPObtained NET_CTL_STATE_IPObtained
|
||||||
|
#else
|
||||||
|
#define netCtlInit cellNetCtlInit
|
||||||
|
#define netCtlGetState cellNetCtlGetState
|
||||||
|
#define netCtlTerm cellNetCtlTerm
|
||||||
|
#define NET_CTL_STATE_IPObtained CELL_NET_CTL_STATE_IPObtained
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*============================================================
|
/*============================================================
|
||||||
@ -536,6 +541,9 @@ extern int audioAddData(uint32_t portNum, float *data,
|
|||||||
#include <netex/net.h>
|
#include <netex/net.h>
|
||||||
#include <np.h>
|
#include <np.h>
|
||||||
#include <np/drm.h>
|
#include <np/drm.h>
|
||||||
|
|
||||||
|
#define netInitialize sys_net_initialize_network
|
||||||
|
#define netFinalizeNetwork sys_net_finalize_network
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -599,6 +607,10 @@ extern int audioAddData(uint32_t portNum, float *data,
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
#include <cell/sysmodule.h>
|
#include <cell/sysmodule.h>
|
||||||
|
|
||||||
|
#define sysModuleLoad cellSysmoduleLoadModule
|
||||||
|
#define sysModuleUnload cellSysmoduleUnloadModule
|
||||||
|
#define SYSMODULE_NET CELL_SYSMODULE_NET
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -228,7 +228,7 @@ int getaddrinfo_retro(const char *node, const char *service,
|
|||||||
|
|
||||||
in_addr->sin_family = host->h_addrtype;
|
in_addr->sin_family = host->h_addrtype;
|
||||||
|
|
||||||
#if defined(AF_INET6) || defined(VITA)
|
#if defined(AF_INET6) && !defined(__PS3__) || defined(VITA)
|
||||||
/* TODO/FIXME - In case we ever want to support IPv6 */
|
/* TODO/FIXME - In case we ever want to support IPv6 */
|
||||||
in_addr->sin_addr.s_addr = inet_addr(host->h_addr_list[0]);
|
in_addr->sin_addr.s_addr = inet_addr(host->h_addr_list[0]);
|
||||||
#else
|
#else
|
||||||
@ -286,6 +286,29 @@ bool network_init(void)
|
|||||||
network_deinit();
|
network_deinit();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#elif defined(__PSL1GHT__) || defined(__PS3__)
|
||||||
|
int timeout_count = 10;
|
||||||
|
|
||||||
|
sysModuleLoad(SYSMODULE_NET);
|
||||||
|
netInitialize();
|
||||||
|
|
||||||
|
if (netCtlInit() < 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
int state;
|
||||||
|
if (netCtlGetState(&state) < 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (state == NET_CTL_STATE_IPObtained)
|
||||||
|
break;
|
||||||
|
|
||||||
|
retro_sleep(500);
|
||||||
|
timeout_count--;
|
||||||
|
if (timeout_count < 0)
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
#elif defined(VITA)
|
#elif defined(VITA)
|
||||||
SceNetInitParam initparam;
|
SceNetInitParam initparam;
|
||||||
|
|
||||||
@ -333,6 +356,10 @@ void network_deinit(void)
|
|||||||
{
|
{
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
WSACleanup();
|
WSACleanup();
|
||||||
|
#elif defined(__PSL1GHT__) || defined(__PS3__)
|
||||||
|
netCtlTerm();
|
||||||
|
netFinalizeNetwork();
|
||||||
|
sysModuleUnload(SYSMODULE_NET);
|
||||||
#elif defined(VITA)
|
#elif defined(VITA)
|
||||||
sceNetCtlTerm();
|
sceNetCtlTerm();
|
||||||
sceNetTerm();
|
sceNetTerm();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user