PS3: Fix can't connect to multiplayer servers, fix crashing when trying to extract a texture pack zip on real hardware

This commit is contained in:
UnknownShadow200 2023-12-17 15:46:04 +11:00
parent 9f583dd486
commit 893e6612c0
5 changed files with 9 additions and 12 deletions

View File

@ -12,7 +12,7 @@ include $(DEVKITARM)/3ds_rules
#---------------------------------------------------------------------------------
# configurable options
#---------------------------------------------------------------------------------
APP_ICON := $(TOPDIR)/misc/CC_48x48.png
APP_ICON := $(TOPDIR)/misc/3ds/icon.png
APP_TITLE := ClassiCube
APP_DESCRIPTION := Simple block building sandbox
APP_AUTHOR := UnknownShadow200

BIN
misc/3ds/banner.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -35,15 +35,13 @@
const cc_result ReturnCode_FileShareViolation = 1000000000; // not used
const cc_result ReturnCode_FileNotFound = 0x80010006; // ENOENT;
//const cc_result ReturnCode_SocketInProgess = 0x80010032; // EINPROGRESS
//const cc_result ReturnCode_SocketWouldBlock = 0x80010001; // EWOULDBLOCK;
const cc_result ReturnCode_DirectoryExists = 0x80010014; // EEXIST
const cc_result ReturnCode_SocketInProgess = NET_EINPROGRESS;
const cc_result ReturnCode_SocketWouldBlock = NET_EWOULDBLOCK;
const cc_result ReturnCode_DirectoryExists = 0x80010014; // EEXIST
const char* Platform_AppNameSuffix = " PS3";
SYS_PROCESS_PARAM(1001, 128 * 1024); // 128kb stack size
SYS_PROCESS_PARAM(1001, 256 * 1024); // 256kb stack size
/*########################################################################################################################*
*------------------------------------------------------Logging/Time-------------------------------------------------------*
@ -415,13 +413,12 @@ void Socket_Close(cc_socket s) {
static cc_result Socket_Poll(cc_socket s, int mode, cc_bool* success) {
struct pollfd pfd;
int flags, res;
int flags;
pfd.fd = s;
pfd.events = mode == SOCKET_POLL_READ ? POLLIN : POLLOUT;
res = netPoll(&pfd, 1, 0);
if (res) return net_errno;
if (netPoll(&pfd, 1, 0) < 0) return net_errno;
/* to match select, closed socket still counts as readable */
flags = mode == SOCKET_POLL_READ ? (POLLIN | POLLHUP) : POLLOUT;
@ -438,7 +435,7 @@ cc_result Socket_CheckWritable(cc_socket s, cc_bool* writable) {
cc_result res = Socket_Poll(s, SOCKET_POLL_WRITE, writable);
if (res || *writable) return res;
/* https://stackoverflow.com/questions/29479953/so-error-value-after-successful-socket-operation */
// https://stackoverflow.com/questions/29479953/so-error-value-after-successful-socket-operation
netGetSockOpt(s, SOL_SOCKET, SO_ERROR, &res, &resultSize);
return res;
}

View File

@ -59,8 +59,8 @@ void Window_Init(void) {
WindowInfo.Exists = true;
Input.Sources = INPUT_SOURCE_GAMEPAD;
DisplayInfo.ContentOffsetX = 10;
DisplayInfo.ContentOffsetY = 10;
DisplayInfo.ContentOffsetX = 20;
DisplayInfo.ContentOffsetY = 20;
ioPadInit(MAX_PORT_NUM);
ioKbInit(MAX_KB_PORT_NUM);