mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-08 06:47:23 -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
|
||||
|
||||
CFILES := $(wildcard src/*.c)
|
||||
|
@ -463,6 +463,7 @@ static void Networking_LoadIOPModules(void) {
|
||||
union SocketAddress {
|
||||
struct sockaddr raw;
|
||||
struct sockaddr_in v4;
|
||||
struct sockaddr_storage total; // matches size of addr returned by getaddrinfo
|
||||
};
|
||||
|
||||
static int ParseHost(union SocketAddress* addr, const char* host) {
|
||||
|
@ -387,9 +387,22 @@ cc_result Socket_CheckWritable(cc_socket s, cc_bool* writable) {
|
||||
/*########################################################################################################################*
|
||||
*--------------------------------------------------------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) {
|
||||
/*pspDebugSioInit();*/
|
||||
// TODO: sceNetInit();
|
||||
InitNetworking();
|
||||
epoll_id = sceNetEpollCreate("CC poll", 0);
|
||||
}
|
||||
void Platform_Free(void) { }
|
||||
|
Loading…
x
Reference in New Issue
Block a user