Skip to content

Commit

Permalink
(VITA) build fix for latest sdk.
Browse files Browse the repository at this point in the history
  • Loading branch information
aliaspider committed Jun 5, 2016
1 parent 5e5e1e6 commit 5a80bd6
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 46 deletions.
2 changes: 1 addition & 1 deletion Makefile.griffin
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ all: $(EXT_TARGET)

%.velf: %.elf
arm-vita-eabi-strip -g $<
vita-elf-create $< $@ $(VITASDK)/bin/db.json $(VITASDK)/bin/extra.json
vita-elf-create $< $@ $(VITASDK)/share/db.json $(VITASDK)/share/extra.json

%.elf32: %.elf
ifeq ($(platform), xenon360)
Expand Down
6 changes: 3 additions & 3 deletions audio/drivers/psp_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ typedef struct psp_audio
#define AUDIO_BUFFER_SIZE_MASK (AUDIO_BUFFER_SIZE-1)

#ifdef VITA
#define PSP_THREAD_STOPPED PSP2_THREAD_STOPPED
#define PSP_THREAD_STOPPED SCE_THREAD_STOPPED
#else
#define SceKernelThreadInfo SceKernelThreadRunStatus
#define sceKernelGetThreadInfo sceKernelReferThreadRunStatus
Expand All @@ -60,8 +60,8 @@ static int audioMainLoop(SceSize args, void* argp)
psp_audio_t* psp = *((psp_audio_t**)argp);

#ifdef VITA
int port = sceAudioOutOpenPort(PSP2_AUDIO_OUT_PORT_TYPE_MAIN, AUDIO_OUT_COUNT,
psp->rate, PSP2_AUDIO_OUT_MODE_STEREO);
int port = sceAudioOutOpenPort(SCE_AUDIO_OUT_PORT_TYPE_MAIN, AUDIO_OUT_COUNT,
psp->rate, SCE_AUDIO_OUT_MODE_STEREO);
#else
sceAudioSRCChReserve(AUDIO_OUT_COUNT, psp->rate, 2);
#endif
Expand Down
30 changes: 15 additions & 15 deletions defines/psp_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#if defined(SN_TARGET_PSP2) || defined(VITA)

#ifdef VITA
#define PSP_DISPLAY_PIXEL_FORMAT_8888 (PSP2_DISPLAY_PIXELFORMAT_A8B8G8R8)
#define PSP_DISPLAY_PIXEL_FORMAT_8888 (SCE_DISPLAY_PIXELFORMAT_A8B8G8R8)
#else
#define PSP_DISPLAY_PIXEL_FORMAT_8888 (SCE_DISPLAY_PIXELFORMAT_A8B8G8R8)
#endif
Expand Down Expand Up @@ -67,20 +67,20 @@
#define STATE_ANALOGRY(state) ((state).ry)

#if defined(VITA)
#define DEFAULT_SAMPLING_MODE (PSP2_CTRL_MODE_ANALOG)

#define PSP_CTRL_LEFT PSP2_CTRL_LEFT
#define PSP_CTRL_DOWN PSP2_CTRL_DOWN
#define PSP_CTRL_RIGHT PSP2_CTRL_RIGHT
#define PSP_CTRL_UP PSP2_CTRL_UP
#define PSP_CTRL_START PSP2_CTRL_START
#define PSP_CTRL_SELECT PSP2_CTRL_SELECT
#define PSP_CTRL_TRIANGLE PSP2_CTRL_TRIANGLE
#define PSP_CTRL_SQUARE PSP2_CTRL_SQUARE
#define PSP_CTRL_CROSS PSP2_CTRL_CROSS
#define PSP_CTRL_CIRCLE PSP2_CTRL_CIRCLE
#define PSP_CTRL_L PSP2_CTRL_LTRIGGER
#define PSP_CTRL_R PSP2_CTRL_RTRIGGER
#define DEFAULT_SAMPLING_MODE (SCE_CTRL_MODE_ANALOG)

#define PSP_CTRL_LEFT SCE_CTRL_LEFT
#define PSP_CTRL_DOWN SCE_CTRL_DOWN
#define PSP_CTRL_RIGHT SCE_CTRL_RIGHT
#define PSP_CTRL_UP SCE_CTRL_UP
#define PSP_CTRL_START SCE_CTRL_START
#define PSP_CTRL_SELECT SCE_CTRL_SELECT
#define PSP_CTRL_TRIANGLE SCE_CTRL_TRIANGLE
#define PSP_CTRL_SQUARE SCE_CTRL_SQUARE
#define PSP_CTRL_CROSS SCE_CTRL_CROSS
#define PSP_CTRL_CIRCLE SCE_CTRL_CIRCLE
#define PSP_CTRL_L SCE_CTRL_LTRIGGER
#define PSP_CTRL_R SCE_CTRL_RTRIGGER
#else
#define DEFAULT_SAMPLING_MODE (SCE_CTRL_MODE_DIGITALANALOG)

Expand Down
2 changes: 1 addition & 1 deletion libretro-common/file/retro_dirent.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ bool retro_dirent_is_dir(struct RDIR *rdir, const char *path)
#if defined(PSP)
return (entry->d_stat.st_attr & FIO_SO_IFDIR) == FIO_SO_IFDIR;
#elif defined(VITA)
return PSP2_S_ISDIR(entry->d_stat.st_mode);
return SCE_S_ISDIR(entry->d_stat.st_mode);
#endif
#elif defined(__CELLOS_LV2__)
CellFsDirent *entry = (CellFsDirent*)&rdir->entry;
Expand Down
2 changes: 1 addition & 1 deletion libretro-common/file/retro_stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
#endif

#if defined(VITA)
#define FIO_S_ISDIR PSP2_S_ISDIR
#define FIO_S_ISDIR SCE_S_ISDIR
#endif

#if (defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)) || defined(__QNX__) || defined(PSP)
Expand Down
22 changes: 11 additions & 11 deletions libretro-common/include/net/net_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,18 @@
#define listen sceNetListen
#define send sceNetSend
#define recv sceNetRecv
#define MSG_DONTWAIT PSP2_NET_MSG_DONTWAIT
#define AF_INET PSP2_NET_AF_INET
#define MSG_DONTWAIT SCE_NET_MSG_DONTWAIT
#define AF_INET SCE_NET_AF_INET
#define AF_UNSPEC 0
#define INADDR_ANY PSP2_NET_INADDR_ANY
#define INADDR_ANY SCE_NET_INADDR_ANY
#define INADDR_NONE 0xffffffff
#define SOCK_STREAM PSP2_NET_SOCK_STREAM
#define SOCK_DGRAM PSP2_NET_SOCK_DGRAM
#define SOL_SOCKET PSP2_NET_SOL_SOCKET
#define SO_REUSEADDR PSP2_NET_SO_REUSEADDR
#define SO_SNDBUF PSP2_NET_SO_SNDBUF
#define SO_SNDTIMEO PSP2_NET_SO_SNDTIMEO
#define SO_NBIO PSP2_NET_SO_NBIO
#define SOCK_STREAM SCE_NET_SOCK_STREAM
#define SOCK_DGRAM SCE_NET_SOCK_DGRAM
#define SOL_SOCKET SCE_NET_SOL_SOCKET
#define SO_REUSEADDR SCE_NET_SO_REUSEADDR
#define SO_SNDBUF SCE_NET_SO_SNDBUF
#define SO_SNDTIMEO SCE_NET_SO_SNDTIMEO
#define SO_NBIO SCE_NET_SO_NBIO
#define htonl sceNetHtonl
#define ntohl sceNetNtohl
#define htons sceNetHtons
Expand Down Expand Up @@ -147,7 +147,7 @@ static INLINE bool isagain(int bytes)
return false;
return true;
#elif defined(VITA)
return (bytes<0 && (bytes == PSP2_NET_ERROR_EAGAIN || bytes == PSP2_NET_ERROR_EWOULDBLOCK));
return (bytes<0 && (bytes == SCE_NET_ERROR_EAGAIN || bytes == SCE_NET_ERROR_EWOULDBLOCK));
#else
return (bytes < 0 && (errno == EAGAIN || errno == EWOULDBLOCK));
#endif
Expand Down
2 changes: 1 addition & 1 deletion libretro-common/net/net_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ bool network_init(void)
#elif defined(VITA)
SceNetInitParam initparam;

if (sceNetShowNetstat() == PSP2_NET_ERROR_ENOTINIT)
if (sceNetShowNetstat() == SCE_NET_ERROR_ENOTINIT)
{
_net_compat_net_memory = malloc(COMPAT_NET_INIT_SIZE);

Expand Down
16 changes: 8 additions & 8 deletions libretro-common/net/net_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@ int socket_select(int nfds, fd_set *readfs, fd_set *writefds,
#elif defined(VITA)
SceNetEpollEvent ev = {0};

ev.events = PSP2_NET_EPOLLIN | PSP2_NET_EPOLLHUP;
ev.events = SCE_NET_EPOLLIN | SCE_NET_EPOLLHUP;
ev.data.fd = nfds;

if((sceNetEpollControl(retro_epoll_fd, PSP2_NET_EPOLL_CTL_ADD, nfds, &ev)))
if((sceNetEpollControl(retro_epoll_fd, SCE_NET_EPOLL_CTL_ADD, nfds, &ev)))
{
int ret = sceNetEpollWait(retro_epoll_fd, &ev, 1, 0);
sceNetEpollControl(retro_epoll_fd, PSP2_NET_EPOLL_CTL_DEL, nfds, NULL);
sceNetEpollControl(retro_epoll_fd, SCE_NET_EPOLL_CTL_DEL, nfds, NULL);
return ret;
}
return 0;
Expand Down Expand Up @@ -214,7 +214,7 @@ static int domain_get(enum socket_domain type)
{
case SOCKET_DOMAIN_INET:
#ifdef VITA
return PSP2_NET_AF_INET;
return SCE_NET_AF_INET;
#else
return AF_INET;
#endif
Expand All @@ -239,10 +239,10 @@ int socket_create(
switch (socket_type)
{
case SOCKET_TYPE_DATAGRAM:
type = PSP2_NET_SOCK_DGRAM;
type = SCE_NET_SOCK_DGRAM;
break;
case SOCKET_TYPE_STREAM:
type = PSP2_NET_SOCK_STREAM;
type = SCE_NET_SOCK_STREAM;
break;
case SOCKET_TYPE_SEQPACKET:
/* TODO/FIXME - implement */
Expand All @@ -255,10 +255,10 @@ int socket_create(
protocol = 0;
break;
case SOCKET_PROTOCOL_TCP:
protocol = PSP2_NET_IPPROTO_TCP;
protocol = SCE_NET_IPPROTO_TCP;
break;
case SOCKET_PROTOCOL_UDP:
protocol = PSP2_NET_IPPROTO_UDP;
protocol = SCE_NET_IPPROTO_UDP;
break;
}

Expand Down
10 changes: 5 additions & 5 deletions libretro-common/streams/file_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
# include <psp2/io/fcntl.h>
# include <psp2/io/dirent.h>

#define PSP_O_RDONLY PSP2_O_RDONLY
#define PSP_O_RDWR PSP2_O_RDWR
#define PSP_O_CREAT PSP2_O_CREAT
#define PSP_O_WRONLY PSP2_O_WRONLY
#define PSP_O_TRUNC PSP2_O_TRUNC
#define PSP_O_RDONLY SCE_O_RDONLY
#define PSP_O_RDWR SCE_O_RDWR
#define PSP_O_CREAT SCE_O_CREAT
#define PSP_O_WRONLY SCE_O_WRONLY
#define PSP_O_TRUNC SCE_O_TRUNC
#else
# if defined(PSP)
# include <pspiofilemgr.h>
Expand Down

0 comments on commit 5a80bd6

Please sign in to comment.