Added recvfrom and own VPAD defines

This commit is contained in:
Maschell 2016-09-23 14:34:35 +02:00
parent f32198ee43
commit befce1016a
10 changed files with 18 additions and 22 deletions

View File

@ -33,10 +33,8 @@ void InitAcquireACP(void)
OSDynLoad_Acquire("nn_acp.rpl", &acp_handle); OSDynLoad_Acquire("nn_acp.rpl", &acp_handle);
} }
void InitACPFunctionPointers(void) void InitACPFunctionPointers(void)
{ {
InitAcquireACP(); InitAcquireACP();
OSDynLoad_FindExport(acp_handle,0,"GetMetaXml__Q2_2nn3acpFP11_ACPMetaXml",&GetMetaXml); OSDynLoad_FindExport(acp_handle,0,"GetMetaXml__Q2_2nn3acpFP11_ACPMetaXml",&GetMetaXml);
} }

View File

@ -56,4 +56,3 @@ void InitAocFunctionPointers(void)
OSDynLoad_FindExport(aoc_handle, 0, "AOC_DeleteContent", &AOC_DeleteContent); OSDynLoad_FindExport(aoc_handle, 0, "AOC_DeleteContent", &AOC_DeleteContent);
OSDynLoad_FindExport(aoc_handle, 0, "AOC_GetPurchaseInfo", &AOC_GetPurchaseInfo); OSDynLoad_FindExport(aoc_handle, 0, "AOC_GetPurchaseInfo", &AOC_GetPurchaseInfo);
} }

View File

@ -74,9 +74,9 @@ void InitAcquireAX(void)
void InitAXFunctionPointers(void) void InitAXFunctionPointers(void)
{ {
unsigned int *funcPointer = 0; unsigned int *funcPointer = 0;
InitAcquireAX(); InitAcquireAX();
OS_FIND_EXPORT(sound_handle, AXQuit); OS_FIND_EXPORT(sound_handle, AXQuit);
OS_FIND_EXPORT(sound_handle, AXVoiceBegin); OS_FIND_EXPORT(sound_handle, AXVoiceBegin);
OS_FIND_EXPORT(sound_handle, AXVoiceEnd); OS_FIND_EXPORT(sound_handle, AXVoiceEnd);

View File

@ -52,4 +52,3 @@ void InitCurlFunctionPointers(void)
n_curl_global_init(CURL_GLOBAL_ALL); n_curl_global_init(CURL_GLOBAL_ALL);
} }

View File

@ -59,4 +59,3 @@ void InitPadScoreFunctionPointers(void)
KPADInit(); KPADInit();
WPADEnableURCC(1); WPADEnableURCC(1);
} }

View File

@ -37,6 +37,7 @@ EXPORT_DECL(int, listen, s32 s,u32 backlog);
EXPORT_DECL(int, accept, s32 s,struct sockaddr *addr,s32 *addrlen); EXPORT_DECL(int, accept, s32 s,struct sockaddr *addr,s32 *addrlen);
EXPORT_DECL(int, send, int s, const void *buffer, int size, int flags); EXPORT_DECL(int, send, int s, const void *buffer, int size, int flags);
EXPORT_DECL(int, recv, int s, void *buffer, int size, int flags); EXPORT_DECL(int, recv, int s, void *buffer, int size, int flags);
EXPORT_DECL(int, recvfrom,int sockfd, void *buf, int len, int flags,struct sockaddr *src_addr, int *addrlen);
EXPORT_DECL(int, sendto, int s, const void *buffer, int size, int flags, const struct sockaddr *dest, int dest_len); EXPORT_DECL(int, sendto, int s, const void *buffer, int size, int flags, const struct sockaddr *dest, int dest_len);
EXPORT_DECL(int, setsockopt, int s, int level, int optname, void *optval, int optlen); EXPORT_DECL(int, setsockopt, int s, int level, int optname, void *optval, int optlen);
EXPORT_DECL(char *, inet_ntoa, struct in_addr in); EXPORT_DECL(char *, inet_ntoa, struct in_addr in);
@ -66,6 +67,7 @@ void InitSocketFunctionPointers(void)
OS_FIND_EXPORT(nsysnet_handle, accept); OS_FIND_EXPORT(nsysnet_handle, accept);
OS_FIND_EXPORT(nsysnet_handle, send); OS_FIND_EXPORT(nsysnet_handle, send);
OS_FIND_EXPORT(nsysnet_handle, recv); OS_FIND_EXPORT(nsysnet_handle, recv);
OS_FIND_EXPORT(nsysnet_handle, recvfrom);
OS_FIND_EXPORT(nsysnet_handle, sendto); OS_FIND_EXPORT(nsysnet_handle, sendto);
OS_FIND_EXPORT(nsysnet_handle, setsockopt); OS_FIND_EXPORT(nsysnet_handle, setsockopt);
OS_FIND_EXPORT(nsysnet_handle, inet_ntoa); OS_FIND_EXPORT(nsysnet_handle, inet_ntoa);
@ -77,4 +79,3 @@ void InitSocketFunctionPointers(void)
socket_lib_init(); socket_lib_init();
} }

View File

@ -49,6 +49,7 @@ extern unsigned int nsysnet_handle;
#define SO_REUSEADDR 0x0004 #define SO_REUSEADDR 0x0004
#define SO_NONBLOCK 0x1016 #define SO_NONBLOCK 0x1016
#define SO_MYADDR 0x1013 #define SO_MYADDR 0x1013
#define SO_RCVTIMEO 0x1006
#define SOL_SOCKET -1 #define SOL_SOCKET -1
#define MSG_DONTWAIT 32 #define MSG_DONTWAIT 32
@ -88,6 +89,8 @@ extern int (*listen)(s32 s,u32 backlog);
extern int (*accept)(s32 s,struct sockaddr *addr,s32 *addrlen); extern int (*accept)(s32 s,struct sockaddr *addr,s32 *addrlen);
extern int (*send)(int s, const void *buffer, int size, int flags); extern int (*send)(int s, const void *buffer, int size, int flags);
extern int (*recv)(int s, void *buffer, int size, int flags); extern int (*recv)(int s, void *buffer, int size, int flags);
extern int (*recvfrom)(int sockfd, void *buf, int len, int flags,struct sockaddr *src_addr, int *addrlen);
extern int (*sendto)(int s, const void *buffer, int size, int flags, const struct sockaddr *dest, int dest_len); extern int (*sendto)(int s, const void *buffer, int size, int flags, const struct sockaddr *dest, int dest_len);
extern int (*setsockopt)(int s, int level, int optname, void *optval, int optlen); extern int (*setsockopt)(int s, int level, int optname, void *optval, int optlen);

View File

@ -47,4 +47,3 @@ void InitSysFunctionPointers(void)
OS_FIND_EXPORT(sysapp_handle, SYSCheckTitleExists); OS_FIND_EXPORT(sysapp_handle, SYSCheckTitleExists);
OS_FIND_EXPORT(sysapp_handle, SYSLaunchTitle); OS_FIND_EXPORT(sysapp_handle, SYSLaunchTitle);
} }

View File

@ -53,4 +53,3 @@ void InitVPadFunctionPointers(void)
OS_FIND_EXPORT(vpadbase_handle, VPADBASEGetMotorOnRemainingCount); OS_FIND_EXPORT(vpadbase_handle, VPADBASEGetMotorOnRemainingCount);
OS_FIND_EXPORT(vpadbase_handle, VPADBASESetMotorOnRemainingCount); OS_FIND_EXPORT(vpadbase_handle, VPADBASESetMotorOnRemainingCount);
} }

View File

@ -53,21 +53,20 @@ extern unsigned int vpadbase_handle;
#define VPAD_BUTTON_STICK_L 0x00040000 #define VPAD_BUTTON_STICK_L 0x00040000
#define VPAD_BUTTON_TV 0x00010000 #define VPAD_BUTTON_TV 0x00010000
#define VPAD_STICK_R_EMULATION_LEFT 0x04000000
#define VPAD_STICK_R_EMULATION_RIGHT 0x02000000
#define VPAD_STICK_R_EMULATION_UP 0x01000000
#define VPAD_STICK_R_EMULATION_DOWN 0x00800000
#define VPAD_STICK_L_EMULATION_LEFT 0x40000000
#define VPAD_STICK_R_EMULATION_LEFT 0x04000000 #define VPAD_STICK_L_EMULATION_RIGHT 0x20000000
#define VPAD_STICK_R_EMULATION_RIGHT 0x02000000 #define VPAD_STICK_L_EMULATION_UP 0x10000000
#define VPAD_STICK_R_EMULATION_UP 0x01000000 #define VPAD_STICK_L_EMULATION_DOWN 0x08000000
#define VPAD_STICK_R_EMULATION_DOWN 0x00800000
#define VPAD_STICK_L_EMULATION_LEFT 0x40000000
#define VPAD_STICK_L_EMULATION_RIGHT 0x20000000
#define VPAD_STICK_L_EMULATION_UP 0x10000000
#define VPAD_STICK_L_EMULATION_DOWN 0x08000000
//! Own definitions //! Own definitions
#define VPAD_BUTTON_TOUCH 0x00080000 #define VPAD_BUTTON_TOUCH 0x00080000
#define VPAD_MASK_EMULATED_STICKS 0x7F800000
#define VPAD_MASK_BUTTONS ~VPAD_MASK_EMULATED_STICKS
typedef struct typedef struct
{ {