Differences From Artifact [0786a18c44]:
- File src/OFFile.m — part of check-in [e61d7f5eb7] at 2022-06-05 09:13:59 on branch trunk — Remove +[OFFile fileWithURL:] (user: js, size: 11210) [annotate] [blame] [check-ins using] [more...]
To Artifact [6bda5c55f7]:
- File
src/OFFile.m
— part of check-in
[a30a0ab261]
at
2022-07-31 13:55:49
on branch nintendo-switch
— Add initial socket code for Nintendo Switch
This doesn't work yet (it crashes on recvfrom), so it's not enabled in
configure for now. (user: js, size: 11491) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | #import "OFReadFailedException.h" #import "OFSeekFailedException.h" #import "OFWriteFailedException.h" #ifdef OF_WINDOWS # include <windows.h> #endif #ifdef OF_WII # include <fat.h> #endif #ifdef OF_NINTENDO_DS # include <stdbool.h> # include <filesystem.h> #endif | > > > > > | | | > | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | #import "OFReadFailedException.h" #import "OFSeekFailedException.h" #import "OFWriteFailedException.h" #ifdef OF_WINDOWS # include <windows.h> #endif #ifdef OF_AMIGAOS # include <proto/exec.h> # include <proto/dos.h> #endif #ifdef OF_WII # include <fat.h> #endif #ifdef OF_NINTENDO_DS # include <stdbool.h> # include <filesystem.h> #endif #ifdef OF_NINTENDO_SWITCH # define id nx_id # include <switch.h> # undef id #endif #ifndef O_BINARY # define O_BINARY 0 #endif #ifndef O_CLOEXEC # define O_CLOEXEC 0 |
︙ | ︙ | |||
180 181 182 183 184 185 186 187 188 189 190 191 192 193 | #endif #ifdef OF_NINTENDO_DS if (!nitroFSInit(NULL)) @throw [OFInitializationFailedException exceptionWithClass: self]; #endif } + (instancetype)fileWithPath: (OFString *)path mode: (OFString *)mode { return [[[self alloc] initWithPath: path mode: mode] autorelease]; } | > > > > > > > > > | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | #endif #ifdef OF_NINTENDO_DS if (!nitroFSInit(NULL)) @throw [OFInitializationFailedException exceptionWithClass: self]; #endif #ifdef OF_NINTENDO_SWITCH if (R_SUCCEEDED(romfsInit())) /* * Errors are intentionally ignored, as it's possible we just * have no romfs. */ atexit((void (*)(void))romfsExit); #endif } + (instancetype)fileWithPath: (OFString *)path mode: (OFString *)mode { return [[[self alloc] initWithPath: path mode: mode] autorelease]; } |
︙ | ︙ |