Add more socket functions

inet_ntop and inet_pton were added.
This commit is contained in:
Crayon2000 2018-02-21 09:27:15 -05:00
parent 87d9e05888
commit c6fa9d07a1
4 changed files with 11 additions and 5 deletions

View File

@ -97,7 +97,7 @@ EXPORT_DECL(s32, GX2GetLastFrame, s32 target, GX2Texture * texture);
EXPORT_DECL(void, GX2BeginDisplayListEx,void * displayList,u32 size,s32 unkwn);
EXPORT_DECL(u32, GX2EndDisplayList, void * list);
EXPORT_DECL(void, GX2CallDisplayList, void * list, u32 size);
EXPORT_DECL(void, GX2ExpandAAColorBuffer,GX2ColorBuffer * buffer);
EXPORT_DECL(void, GX2ExpandAAColorBuffer,GX2ColorBuffer * buffer);
EXPORT_DECL(void, GX2ResolveAAColorBuffer, const GX2ColorBuffer * srcBuffer, GX2Surface * dstSurface,u32 dstMip,u32 dstSlice);
EXPORT_DECL(void, GX2ClearBuffersEx, GX2ColorBuffer * colorBuffer,GX2DepthBuffer * depthBuffer,f32 r, f32 g, f32 b, f32 a,f32 depthValue,u8 stencilValue,s32 clearFlags);
@ -179,7 +179,7 @@ void InitGX2FunctionPointers(void){
OS_FIND_EXPORT(gx2_handle, GX2BeginDisplayListEx);
OS_FIND_EXPORT(gx2_handle, GX2EndDisplayList);
OS_FIND_EXPORT(gx2_handle, GX2CallDisplayList);
OS_FIND_EXPORT(gx2_handle, GX2ExpandAAColorBuffer);
OS_FIND_EXPORT(gx2_handle, GX2ResolveAAColorBuffer);
OS_FIND_EXPORT(gx2_handle, GX2ExpandAAColorBuffer);
OS_FIND_EXPORT(gx2_handle, GX2ResolveAAColorBuffer);
OS_FIND_EXPORT(gx2_handle, GX2SetClearDepthStencil);
}

View File

@ -107,9 +107,9 @@ extern s32 (* GX2GetLastFrame)(s32 target, GX2Texture * texture);
extern void (* GX2BeginDisplayListEx)(void * displayList,u32 size,s32 unkwn);
extern u32 (*GX2EndDisplayList)(void * list);
extern void (*GX2CallDisplayList)(void * list, u32 size);
extern void (*GX2ExpandAAColorBuffer)(GX2ColorBuffer * buffer);
extern void (*GX2ExpandAAColorBuffer)(GX2ColorBuffer * buffer);
extern void (*GX2ResolveAAColorBuffer)(const GX2ColorBuffer * srcBuffer, GX2Surface * dstSurface,u32 dstMip,u32 dstSlice);
static inline void GX2InitDepthBuffer(GX2DepthBuffer *depthBuffer, s32 dimension, u32 width, u32 height, u32 depth, s32 format, s32 aa)
{
depthBuffer->surface.dimension = dimension;

View File

@ -44,6 +44,8 @@ EXPORT_DECL(s32, sendto, s32 s, const void *buffer, s32 size, s32 flags, const s
EXPORT_DECL(s32, setsockopt, s32 s, s32 level, s32 optname, void *optval, s32 optlen);
EXPORT_DECL(char *, inet_ntoa, struct in_addr in);
EXPORT_DECL(s32, inet_aton, const char *cp, struct in_addr *inp);
EXPORT_DECL(const char *, inet_ntop, s32 af, const void *src, char *dst, s32 size);
EXPORT_DECL(s32, inet_pton, s32 af, const char *src, void *dst);
EXPORT_DECL(s32, socketlasterr, void);
EXPORT_DECL(s32, NSSLWrite, s32 connection, const void* buf, s32 len,s32 * written);
@ -88,6 +90,8 @@ void InitSocketFunctionPointers(void){
OS_FIND_EXPORT(nsysnet_handle, setsockopt);
OS_FIND_EXPORT(nsysnet_handle, inet_ntoa);
OS_FIND_EXPORT(nsysnet_handle, inet_aton);
OS_FIND_EXPORT(nsysnet_handle, inet_ntop);
OS_FIND_EXPORT(nsysnet_handle, inet_pton);
OS_FIND_EXPORT(nsysnet_handle, NSSLWrite);
OS_FIND_EXPORT(nsysnet_handle, NSSLRead);

View File

@ -110,6 +110,8 @@ extern s32 (* NSSLCreateConnection)(s32 context, const char* host, s32 hotlen,s3
extern char * (*inet_ntoa)(struct in_addr in);
extern s32 (*inet_aton)(const char *cp, struct in_addr *inp);
extern const char * (*inet_ntop)(s32 af, const void *src, char *dst, s32 size);
extern s32 (*inet_pton)(s32 af, const char *src, void *dst);
#ifdef __cplusplus
}