(PSP) fix build.

add 7-zip support.
fix cores filenames detection in core_info_list_new.
use sceRtcGetCurrentTick instead of the less precise gettimeofday for
the performance counter.
This commit is contained in:
aliaspider 2015-02-25 13:30:46 +01:00
parent fbed3cfd27
commit 4317c4f1cb
5 changed files with 14 additions and 7 deletions

View File

@ -2,7 +2,7 @@ BUILD_PRX = 1
DEBUG = 0
HAVE_KERNEL_PRX = 1
HAVE_FILE_LOGGER = 0
HAVE_THREADS = 1
HAVE_THREADS = 0
BIG_STACK = 0
WHOLE_ARCHIVE_LINK = 0
@ -11,7 +11,7 @@ TARGET = retroarchpsp
ifeq ($(DEBUG), 1)
OPTIMIZE_LV := -O0 -g
else
OPTIMIZE_LV := -O2 -g
OPTIMIZE_LV := -O3 -g
endif
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
@ -19,11 +19,11 @@ ifeq ($(WHOLE_ARCHIVE_LINK), 1)
WHOLE_END := -Wl,--no-whole-archive
endif
INCDIR = $(PSPPATH)/include libretro-common/include
INCDIR = deps/rzlib deps/7zip libretro-common/include
CFLAGS = $(OPTIMIZE_LV) -G0 -std=gnu99 -ffast-math
ASFLAGS = $(CFLAGS)
RARCH_DEFINES = -DPSP -D_MIPS_ARCH_ALLEGREX1 -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DWANT_RPNG -DSINC_LOWEST_QUALITY -DHAVE_BUILTIN_AUTOCONFIG -DHAVE_FILTERS_BUILTIN
RARCH_DEFINES = -DPSP -D_MIPS_ARCH_ALLEGREX -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DWANT_RPNG -DSINC_LOWEST_QUALITY -DHAVE_BUILTIN_AUTOCONFIG -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP
LIBDIR =
LDFLAGS =

View File

@ -134,7 +134,7 @@ core_info_list_t *core_info_list_new(const char *modules_path)
sizeof(info_path_base));
path_remove_extension(info_path_base);
#if defined(RARCH_MOBILE) || defined(RARCH_CONSOLE)
#if defined(RARCH_MOBILE) || (defined(RARCH_CONSOLE) && !defined(PSP))
char *substr = strrchr(info_path_base, '_');
if (substr)
*substr = '\0';

2
deps/rzlib/gzguts.h vendored
View File

@ -166,7 +166,7 @@
#define MODE_COPY 1 /* copy input directly */
#define MODE_GZIP 2 /* decompress a gzip stream */
#if defined(__APPLE__) || defined(PSP) || defined(__QNX__) && !defined(HAVE_BB10)
#if defined(__APPLE__) || defined(__QNX__) && !defined(HAVE_BB10)
struct gzFile_s
{
unsigned have;

View File

@ -845,7 +845,9 @@ static const video_poke_interface_t psp_poke_interface = {
NULL, /* get_video_output_size */
NULL, /* get_video_output_prev */
NULL, /* get_video_output_next */
#ifdef HAVE_FBO
NULL,
#endif
NULL,
psp_set_aspect_ratio,
psp_apply_state_changes,

View File

@ -48,8 +48,9 @@
#define CLOCK_MONOTONIC 2
#endif
#if defined(__mips__)
#if defined(PSP)
#include <sys/time.h>
#include <psprtc.h>
#endif
#if defined(__PSL1GHT__)
@ -175,6 +176,8 @@ retro_perf_tick_t rarch_get_perf_counter(void)
asm volatile( "mrc p15, 0, %0, c9, c13, 0" : "=r"(time_ticks) );
#elif defined(__CELLOS_LV2__) || defined(GEKKO) || defined(_XBOX360) || defined(__powerpc__) || defined(__ppc__) || defined(__POWERPC__)
time_ticks = __mftb();
#elif defined(PSP)
sceRtcGetCurrentTick(&time_ticks);
#elif defined(__mips__)
struct timeval tv;
gettimeofday(&tv,NULL);
@ -343,6 +346,8 @@ unsigned rarch_get_cpu_cores(void)
return android_getCpuCount();
#elif defined(GEKKO)
return 1;
#elif defined(PSP)
return 1;
#elif defined(_SC_NPROCESSORS_ONLN)
/* Linux, most UNIX-likes. */
long ret = sysconf(_SC_NPROCESSORS_ONLN);