mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-10 16:03:15 -04:00
Vita: Try to fix insta crash on real hardware
This commit is contained in:
parent
cf90a60117
commit
b4c30b7122
@ -1,3 +1,6 @@
|
|||||||
|
ifeq ($(strip $(PS2SDK)),)
|
||||||
|
$(error "PS2SDK must be set in your environment")
|
||||||
|
endif
|
||||||
BUILD_DIR = build-ps2
|
BUILD_DIR = build-ps2
|
||||||
|
|
||||||
CFILES := $(wildcard src/*.c)
|
CFILES := $(wildcard src/*.c)
|
||||||
|
@ -463,6 +463,7 @@ static void Networking_LoadIOPModules(void) {
|
|||||||
union SocketAddress {
|
union SocketAddress {
|
||||||
struct sockaddr raw;
|
struct sockaddr raw;
|
||||||
struct sockaddr_in v4;
|
struct sockaddr_in v4;
|
||||||
|
struct sockaddr_storage total; // matches size of addr returned by getaddrinfo
|
||||||
};
|
};
|
||||||
|
|
||||||
static int ParseHost(union SocketAddress* addr, const char* host) {
|
static int ParseHost(union SocketAddress* addr, const char* host) {
|
||||||
|
@ -387,9 +387,22 @@ cc_result Socket_CheckWritable(cc_socket s, cc_bool* writable) {
|
|||||||
/*########################################################################################################################*
|
/*########################################################################################################################*
|
||||||
*--------------------------------------------------------Platform---------------------------------------------------------*
|
*--------------------------------------------------------Platform---------------------------------------------------------*
|
||||||
*#########################################################################################################################*/
|
*#########################################################################################################################*/
|
||||||
|
static char net_memory[256 * 1024]; // TOD: 512 * 1024 ?
|
||||||
|
|
||||||
|
static void InitNetworking(void) {
|
||||||
|
SceNetInitParam param;
|
||||||
|
|
||||||
|
param.memory = net_memory;
|
||||||
|
param.size = sizeof(net_memory);
|
||||||
|
param.flags = 0;
|
||||||
|
|
||||||
|
int ret = sceNetInit(¶m);
|
||||||
|
if (ret < 0) Platform_Log1("Network init failed: %i", &ret);
|
||||||
|
}
|
||||||
|
|
||||||
void Platform_Init(void) {
|
void Platform_Init(void) {
|
||||||
/*pspDebugSioInit();*/
|
/*pspDebugSioInit();*/
|
||||||
// TODO: sceNetInit();
|
InitNetworking();
|
||||||
epoll_id = sceNetEpollCreate("CC poll", 0);
|
epoll_id = sceNetEpollCreate("CC poll", 0);
|
||||||
}
|
}
|
||||||
void Platform_Free(void) { }
|
void Platform_Free(void) { }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user