You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
568 B
32 lines
568 B
#include <cstdlib> |
|
#include <cstdio> |
|
#include <unistd.h> |
|
#include "platform/vita/network.h" |
|
#include <psp2/sysmodule.h> |
|
#include <psp2/net/net.h> |
|
#include <psp2/net/netctl.h> |
|
|
|
void vita_enable_network() |
|
{ |
|
SceNetInitParam param; |
|
static char memory[64 * 1024]; |
|
int ret; |
|
|
|
ret = sceSysmoduleLoadModule(SCE_SYSMODULE_NET); |
|
if (ret < 0) { |
|
return; |
|
} |
|
|
|
param.memory = memory; |
|
param.size = sizeof(memory); |
|
param.flags = 0; |
|
ret = sceNetInit(¶m); |
|
if (ret < 0) { |
|
return; |
|
} |
|
|
|
ret = sceNetCtlInit(); |
|
if (ret < 0) { |
|
return; |
|
} |
|
}
|
|
|