Merge branch 'master' into cd-swap

This commit is contained in:
Themaister 2013-03-09 09:27:14 +01:00
commit 272ef70895
75 changed files with 4530 additions and 1382 deletions

View File

@ -2,7 +2,8 @@ include config.mk
TARGET = retroarch tools/retroarch-joyconfig tools/retrolaunch/retrolaunch
OBJ = retroarch.o \
OBJ = frontend/frontend.o \
retroarch.o \
file.o \
file_path.o \
hash.o \

View File

@ -62,7 +62,7 @@ CFLAGS += -DHAVE_FILE_LOGGER
CFLAGS += -Iconsole/logger
endif
CFLAGS += -std=gnu99 -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RMENU -DHAVE_RGUI -DRARCH_CONSOLE -DGEKKO -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_RARCH_MAIN_WRAP -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -Wno-char-subscripts
CFLAGS += -std=gnu99 -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RMENU -DHAVE_RGUI -DRARCH_CONSOLE -DGEKKO -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_RARCH_MAIN_WRAP -DHAVE_RARCH_MAIN_IMPLEMENTATION -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Wno-char-subscripts
ifeq ($(DEBUG), 1)
CFLAGS += -O0 -g

View File

@ -109,7 +109,7 @@ PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -l
PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe
DEFINES += -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RMENU -DHAVE_THREADS -DHAVE_RMENU_GUI -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_VID_CONTEXT -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_FILEBROWSER -DHAVE_FBO -DHAVE_RARCH_MAIN_WRAP -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RSOUND -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_SINC -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_OSKUTIL -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
DEFINES += -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RMENU -DHAVE_THREADS -DHAVE_RMENU_GUI -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_VID_CONTEXT -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_FILEBROWSER -DHAVE_FBO -DHAVE_RARCH_MAIN_WRAP -DHAVE_RARCH_MAIN_IMPLEMENTATION -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RSOUND -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_SINC -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_OSKUTIL -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
ifeq ($(DEBUG), 1)
PPU_OPTIMIZE_LV := -O0 -g

View File

@ -92,7 +92,7 @@ endif
RSXGL_DEFINES = -D__RSX__ -DGL3_PROTOTYPES
SHARED_FLAGS := -DHAVE_FILEBROWSER $(RSXGL_DEFINES) -DHAVE_OPENGL -DHAVE_EGL -DHAVE_OPENGL_MODERN -DHAVE_GLSL -DHAVE_VID_CONTEXT -DHAVE_FBO -DHAVE_MOUSE -DHAVE_DEFAULT_RETROPAD_INPUT -DRARCH_CONSOLE -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_RARCH_MAIN_WRAP -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_GRIFFIN=1 -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DPACKAGE_VERSION=\"0.9.8\" -Dmain=rarch_main -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -Wno-char-subscripts
SHARED_FLAGS := -DHAVE_FILEBROWSER $(RSXGL_DEFINES) -DHAVE_OPENGL -DHAVE_EGL -DHAVE_OPENGL_MODERN -DHAVE_GLSL -DHAVE_VID_CONTEXT -DHAVE_FBO -DHAVE_MOUSE -DHAVE_DEFAULT_RETROPAD_INPUT -DRARCH_CONSOLE -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_RARCH_MAIN_WRAP -DHAVE_RARCH_MAIN_IMPLEMENTATION -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_GRIFFIN=1 -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DPACKAGE_VERSION=\"0.9.8\" -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -Wno-char-subscripts
CFLAGS += -std=gnu99 $(SHARED_FLAGS)
CXXFLAGS += $(SHARED_FLAGS)

View File

@ -8,7 +8,7 @@ INCDIR =
CFLAGS = -O2 -G0 -g -std=gnu99 -ffast-math
ASFLAGS = $(CFLAGS)
RARCH_DEFINES = -DPSP -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_FILEBROWSER -DHAVE_RARCH_MAIN_WRAP -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_GRIFFIN=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -DHAVE_NULLVIDEO -DHAVE_NULLAUDIO -DHAVE_RMENU
RARCH_DEFINES = -DPSP -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_FILEBROWSER -DHAVE_RARCH_MAIN_WRAP -DHAVE_RARCH_MAIN_IMPLEMENTATION -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_GRIFFIN=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -DHAVE_NULLVIDEO -DHAVE_NULLAUDIO -DHAVE_RMENU
ifeq ($(HAVE_FILE_LOGGER), 1)
CFLAGS += -DHAVE_FILE_LOGGER

View File

@ -65,7 +65,7 @@ CFLAGS += -Iconsole/logger
endif
CFLAGS += -std=gnu99 -DHAVE_SINC -DSINC_LOWER_QUALITY -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RGUI -DRARCH_CONSOLE -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RARCH_EXEC -DHAVE_RMENU -DGEKKO -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_RARCH_MAIN_WRAP -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -Wno-char-subscripts
CFLAGS += -std=gnu99 -DHAVE_SINC -DSINC_LOWER_QUALITY -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RGUI -DRARCH_CONSOLE -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RARCH_EXEC -DHAVE_RMENU -DGEKKO -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_RARCH_MAIN_WRAP -DHAVE_RARCH_MAIN_IMPLEMENTATION -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Wno-char-subscripts
ifeq ($(DEBUG), 1)
CFLAGS += -O0 -g -DDEBUG

View File

@ -1,7 +1,8 @@
TARGET = retroarch.exe
JTARGET = tools/retroarch-joyconfig.exe
OBJ = retroarch.o \
OBJ = frontend/frontend.o \
retroarch.o \
file.o \
file_path.o \
driver.o \

View File

@ -16,7 +16,7 @@ INCDIRS = -I. -I$(DEVKITXENON)/usr/include
OBJ = console/griffin/griffin.o
LIBS = -lretro_xenon360 -lxenon -lm -lc
DEFINES = -std=gnu99 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -DRARCH_CONSOLE -DHAVE_THREADS -DHAVE_GETOPT_LONG=1 -DHAVE_GRIFFIN -Dmain=rarch_main
DEFINES = -std=gnu99 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -DRARCH_CONSOLE -DHAVE_THREADS -DHAVE_GETOPT_LONG=1 -DHAVE_GRIFFIN
DEFINES += -maltivec -mhard-float -m32 -mpowerpc64 -mcpu=cell -mtune=cell -fno-pic -g -Wall -DXENON $(INCDIRS) -Wno-char-subscripts
DEFINES += -u read -u _start -u exc_base

View File

@ -51,7 +51,7 @@ ifeq ($(PERF_TEST), 1)
LOCAL_CFLAGS += -DPERF_TEST
endif
LOCAL_CFLAGS += -Wall -pthread -Wno-unused-function -O3 -fno-stack-protector -funroll-loops -DNDEBUG -DHAVE_GRIFFIN -DANDROID -DHAVE_DYNAMIC -DHAVE_OPENGL -DHAVE_FBO -DHAVE_OVERLAY -DHAVE_OPENGLES -DHAVE_VID_CONTEXT -DHAVE_OPENGLES2 -DGLSL_DEBUG -DHAVE_GLSL -DWANT_MINIZ -DHAVE_ZLIB -DINLINE=inline -DLSB_FIRST -DHAVE_THREADS -D__LIBRETRO__ -DRARCH_PERFORMANCE_MODE -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -std=gnu99 -I../../../deps/miniz
LOCAL_CFLAGS += -Wall -pthread -Wno-unused-function -O3 -fno-stack-protector -funroll-loops -DNDEBUG -DHAVE_GRIFFIN -DANDROID -DHAVE_DYNAMIC -DHAVE_OPENGL -DHAVE_FBO -DHAVE_OVERLAY -DHAVE_OPENGLES -DHAVE_VID_CONTEXT -DHAVE_OPENGLES2 -DGLSL_DEBUG -DHAVE_GLSL -DHAVE_RMENU -DHAVE_RGUI -DHAVE_SCREENSHOTS -DWANT_MINIZ -DHAVE_ZLIB -DINLINE=inline -DLSB_FIRST -DHAVE_THREADS -D__LIBRETRO__ -DRARCH_PERFORMANCE_MODE -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -std=gnu99 -I../../../deps/miniz
LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -landroid -lEGL -lGLESv2 $(LOGGER_LDLIBS) -ldl

View File

@ -69,10 +69,6 @@ static int g_cpuCount;
# define DEFAULT_CPU_FAMILY ANDROID_CPU_FAMILY_UNKNOWN
#endif
#define D(...) \
do { \
} while (0)
#ifdef __i386__
static __inline__ void cpu_x86_cpuid(int func, int values[4])
{
@ -126,56 +122,53 @@ cpu_read_file(const char* pathname, char* buffer, size_t buffsize)
static char*
extract_cpuinfo_field(char* buffer, int buflen, const char* field)
{
int fieldlen = strlen(field);
char* bufend = buffer + buflen;
char* result = NULL;
int len;
const char *p, *q;
int fieldlen = strlen(field);
char* bufend = buffer + buflen;
char* result = NULL;
int len;
const char *p, *q;
/* Look for first field occurence, and ensures it starts the line.
*/
p = buffer;
bufend = buffer + buflen;
for (;;) {
p = memmem(p, bufend-p, field, fieldlen);
if (p == NULL)
goto EXIT;
/* Look for first field occurence, and ensures it starts the line.
*/
p = buffer;
bufend = buffer + buflen;
for (;;)
{
p = memmem(p, bufend-p, field, fieldlen);
if (p == NULL)
goto EXIT;
if (p == buffer || p[-1] == '\n')
break;
if (p == buffer || p[-1] == '\n')
break;
p += fieldlen;
}
p += fieldlen;
}
/* Skip to the first column followed by a space */
p += fieldlen;
p = memchr(p, ':', bufend-p);
if (p == NULL || p[1] != ' ')
goto EXIT;
/* Skip to the first column followed by a space */
p += fieldlen;
p = memchr(p, ':', bufend-p);
if (p == NULL || p[1] != ' ')
goto EXIT;
/* Find the end of the line */
p += 2;
q = memchr(p, '\n', bufend-p);
if (q == NULL)
q = bufend;
/* Find the end of the line */
p += 2;
q = memchr(p, '\n', bufend-p);
if (q == NULL)
q = bufend;
/* Copy the line into a heap-allocated buffer */
len = q-p;
result = malloc(len+1);
if (result == NULL)
goto EXIT;
/* Copy the line into a heap-allocated buffer */
len = q-p;
result = malloc(len+1);
if (result == NULL)
goto EXIT;
memcpy(result, p, len);
result[len] = '\0';
memcpy(result, p, len);
result[len] = '\0';
EXIT:
return result;
return result;
}
/* Like strlen(), but for constant string literals */
#define STRLEN_CONST(x) ((sizeof(x)-1)
/* Checks that a space-separated list of items contains one given 'item'.
* Returns 1 if found, 0 otherwise.
*/
@ -188,7 +181,8 @@ has_list_item(const char* list, const char* item)
if (list == NULL)
return 0;
while (*p) {
while (*p)
{
const char* q;
/* skip spaces */
@ -224,7 +218,8 @@ parse_decimal(const char* input, const char* limit, int* result)
{
const char* p = input;
int val = 0;
while (p < limit) {
while (p < limit)
{
int d = (*p - '0');
if ((unsigned)d >= 10U)
break;
@ -248,28 +243,6 @@ typedef struct {
uint32_t mask;
} CpuList;
static __inline__ void
cpulist_init(CpuList* list) {
list->mask = 0;
}
static __inline__ void
cpulist_and(CpuList* list1, CpuList* list2) {
list1->mask &= list2->mask;
}
static __inline__ void
cpulist_set(CpuList* list, int index) {
if ((unsigned)index < 32) {
list->mask |= (uint32_t)(1U << index);
}
}
static __inline__ int
cpulist_count(CpuList* list) {
return __builtin_popcount(list->mask);
}
/* Parse a textual list of cpus and store the result inside a CpuList object.
* Input format is the following:
* - comma-separated list of items (no spaces)
@ -280,73 +253,76 @@ cpulist_count(CpuList* list) {
* 2,4-127,128-143
* 0-1
*/
static void
cpulist_parse(CpuList* list, const char* line, int line_len)
static void cpulist_parse(CpuList* list, const char* line, int line_len)
{
const char* p = line;
const char* end = p + line_len;
const char* q;
const char* p = line;
const char* end = p + line_len;
const char* q;
/* NOTE: the input line coming from sysfs typically contains a
* trailing newline, so take care of it in the code below
*/
while (p < end && *p != '\n')
{
int val, start_value, end_value;
/* NOTE: the input line coming from sysfs typically contains a
* trailing newline, so take care of it in the code below
*/
while (p < end && *p != '\n')
{
int val, start_value, end_value;
/* Find the end of current item, and put it into 'q' */
q = memchr(p, ',', end-p);
if (q == NULL) {
q = end;
}
/* Find the end of current item, and put it into 'q' */
q = memchr(p, ',', end-p);
if (q == NULL)
q = end;
/* Get first value */
p = parse_decimal(p, q, &start_value);
if (p == NULL)
/* Get first value */
p = parse_decimal(p, q, &start_value);
if (p == NULL)
goto BAD_FORMAT;
end_value = start_value;
/* If we're not at the end of the item, expect a dash and
* and integer; extract end value.
*/
if (p < q && *p == '-')
{
p = parse_decimal(p+1, q, &end_value);
if (p == NULL)
goto BAD_FORMAT;
}
end_value = start_value;
/* Set bits CPU list bits */
for (val = start_value; val <= end_value; val++)
{
if ((unsigned)val < 32)
list->mask |= (uint32_t)(1U << val);
}
/* If we're not at the end of the item, expect a dash and
* and integer; extract end value.
*/
if (p < q && *p == '-') {
p = parse_decimal(p+1, q, &end_value);
if (p == NULL)
goto BAD_FORMAT;
}
/* Set bits CPU list bits */
for (val = start_value; val <= end_value; val++) {
cpulist_set(list, val);
}
/* Jump to next item */
p = q;
if (p < end)
p++;
}
/* Jump to next item */
p = q;
if (p < end)
p++;
}
BAD_FORMAT:
;
;
}
/* Read a CPU list from one sysfs file */
static void
cpulist_read_from(CpuList* list, const char* filename)
{
char file[64];
int filelen;
char file[64];
int filelen;
cpulist_init(list);
list->mask = 0;
filelen = cpu_read_file(filename, file, sizeof file);
if (filelen < 0) {
D("Could not read %s: %s\n", filename, strerror(errno));
return;
}
filelen = cpu_read_file(filename, file, sizeof file);
cpulist_parse(list, file, filelen);
if (filelen < 0)
{
RARCH_ERR("Could not read %s: %s\n", filename, strerror(errno));
return;
}
cpulist_parse(list, file, filelen);
}
/* Return the number of cpus present on a given device.
@ -355,192 +331,179 @@ cpulist_read_from(CpuList* list, const char* filename)
* intersection of the 'present' and 'possible' CPU lists and count
* the result.
*/
static int
get_cpu_count(void)
static int get_cpu_count(void)
{
CpuList cpus_present[1];
CpuList cpus_possible[1];
CpuList cpus_present[1];
CpuList cpus_possible[1];
cpulist_read_from(cpus_present, "/sys/devices/system/cpu/present");
cpulist_read_from(cpus_possible, "/sys/devices/system/cpu/possible");
cpulist_read_from(cpus_present, "/sys/devices/system/cpu/present");
cpulist_read_from(cpus_possible, "/sys/devices/system/cpu/possible");
/* Compute the intersection of both sets to get the actual number of
* CPU cores that can be used on this device by the kernel.
*/
cpulist_and(cpus_present, cpus_possible);
/* Compute the intersection of both sets to get the actual number of
* CPU cores that can be used on this device by the kernel.
*/
cpus_present->mask &= cpus_possible->mask;
return cpulist_count(cpus_present);
return __builtin_popcount(cpus_present->mask);
}
static void
android_cpuInit(void)
static void android_cpuInit(void)
{
char cpuinfo[4096];
int cpuinfo_len;
char cpuinfo[4096];
int cpuinfo_len;
g_cpuFamily = DEFAULT_CPU_FAMILY;
g_cpuFeatures = 0;
g_cpuCount = 1;
g_cpuFamily = DEFAULT_CPU_FAMILY;
g_cpuFeatures = 0;
g_cpuCount = 1;
cpuinfo_len = cpu_read_file("/proc/cpuinfo", cpuinfo, sizeof cpuinfo);
D("cpuinfo_len is (%d):\n%.*s\n", cpuinfo_len,
cpuinfo_len >= 0 ? cpuinfo_len : 0, cpuinfo);
cpuinfo_len = cpu_read_file("/proc/cpuinfo", cpuinfo, sizeof cpuinfo);
RARCH_LOG("cpuinfo_len is (%d):\n%.*s\n", cpuinfo_len,
cpuinfo_len >= 0 ? cpuinfo_len : 0, cpuinfo);
if (cpuinfo_len < 0) /* should not happen */ {
return;
}
if (cpuinfo_len < 0)
return;
/* Count the CPU cores, the value may be 0 for single-core CPUs */
g_cpuCount = get_cpu_count();
if (g_cpuCount == 0) {
g_cpuCount = 1;
}
/* Count the CPU cores, the value may be 0 for single-core CPUs */
g_cpuCount = get_cpu_count();
if (g_cpuCount == 0)
g_cpuCount = 1;
D("found cpuCount = %d\n", g_cpuCount);
RARCH_LOG("found cpuCount = %d\n", g_cpuCount);
#ifdef __ARM_ARCH__
{
/* Extract architecture from the "CPU Architecture" field.
* The list is well-known, unlike the the output of
* the 'Processor' field which can vary greatly.
*
* See the definition of the 'proc_arch' array in
* $KERNEL/arch/arm/kernel/setup.c and the 'c_show' function in
* same file.
*/
char* cpuArch = extract_cpuinfo_field(cpuinfo, cpuinfo_len, "CPU architecture");
/* Extract architecture from the "CPU Architecture" field.
* The list is well-known, unlike the the output of
* the 'Processor' field which can vary greatly.
*
* See the definition of the 'proc_arch' array in
* $KERNEL/arch/arm/kernel/setup.c and the 'c_show' function in
* same file.
*/
char* cpuArch = extract_cpuinfo_field(cpuinfo, cpuinfo_len, "CPU architecture");
if (cpuArch != NULL) {
char* end;
long archNumber;
int hasARMv7 = 0;
if (cpuArch != NULL)
{
char* end;
long archNumber;
int hasARMv7 = 0;
D("found cpuArch = '%s'\n", cpuArch);
RARCH_LOG("found cpuArch = '%s'\n", cpuArch);
/* read the initial decimal number, ignore the rest */
archNumber = strtol(cpuArch, &end, 10);
/* read the initial decimal number, ignore the rest */
archNumber = strtol(cpuArch, &end, 10);
/* Here we assume that ARMv8 will be upwards compatible with v7
* in the future. Unfortunately, there is no 'Features' field to
* indicate that Thumb-2 is supported.
*/
if (end > cpuArch && archNumber >= 7) {
hasARMv7 = 1;
/* Here we assume that ARMv8 will be upwards compatible with v7
* in the future. Unfortunately, there is no 'Features' field to
* indicate that Thumb-2 is supported.
*/
if (end > cpuArch && archNumber >= 7)
hasARMv7 = 1;
/* Unfortunately, it seems that certain ARMv6-based CPUs
* report an incorrect architecture number of 7!
*
* See http://code.google.com/p/android/issues/detail?id=10812
*
* We try to correct this by looking at the 'elf_format'
* field reported by the 'Processor' field, which is of the
* form of "(v7l)" for an ARMv7-based CPU, and "(v6l)" for
* an ARMv6-one.
*/
if (hasARMv7)
{
char* cpuProc = extract_cpuinfo_field(cpuinfo, cpuinfo_len,
"Processor");
if (cpuProc != NULL)
{
RARCH_LOG("found cpuProc = '%s'\n", cpuProc);
if (has_list_item(cpuProc, "(v6l)"))
{
RARCH_ERR("CPU processor and architecture mismatch!!\n");
hasARMv7 = 0;
}
free(cpuProc);
}
}
/* Unfortunately, it seems that certain ARMv6-based CPUs
* report an incorrect architecture number of 7!
*
* See http://code.google.com/p/android/issues/detail?id=10812
*
* We try to correct this by looking at the 'elf_format'
* field reported by the 'Processor' field, which is of the
* form of "(v7l)" for an ARMv7-based CPU, and "(v6l)" for
* an ARMv6-one.
*/
if (hasARMv7) {
char* cpuProc = extract_cpuinfo_field(cpuinfo, cpuinfo_len,
"Processor");
if (cpuProc != NULL) {
D("found cpuProc = '%s'\n", cpuProc);
if (has_list_item(cpuProc, "(v6l)")) {
D("CPU processor and architecture mismatch!!\n");
hasARMv7 = 0;
}
free(cpuProc);
}
}
if (hasARMv7)
g_cpuFeatures |= ANDROID_CPU_ARM_FEATURE_ARMv7;
if (hasARMv7) {
g_cpuFeatures |= ANDROID_CPU_ARM_FEATURE_ARMv7;
}
/* The LDREX / STREX instructions are available from ARMv6 */
if (archNumber >= 6)
g_cpuFeatures |= ANDROID_CPU_ARM_FEATURE_LDREX_STREX;
/* The LDREX / STREX instructions are available from ARMv6 */
if (archNumber >= 6) {
g_cpuFeatures |= ANDROID_CPU_ARM_FEATURE_LDREX_STREX;
}
free(cpuArch);
}
free(cpuArch);
}
/* Extract the list of CPU features from 'Features' field */
char* cpuFeatures = extract_cpuinfo_field(cpuinfo, cpuinfo_len, "Features");
/* Extract the list of CPU features from 'Features' field */
char* cpuFeatures = extract_cpuinfo_field(cpuinfo, cpuinfo_len, "Features");
if (cpuFeatures != NULL)
{
RARCH_LOG("found cpuFeatures = '%s'\n", cpuFeatures);
if (cpuFeatures != NULL) {
if (has_list_item(cpuFeatures, "vfpv3"))
g_cpuFeatures |= ANDROID_CPU_ARM_FEATURE_VFPv3;
D("found cpuFeatures = '%s'\n", cpuFeatures);
else if (has_list_item(cpuFeatures, "vfpv3d16"))
g_cpuFeatures |= ANDROID_CPU_ARM_FEATURE_VFPv3;
if (has_list_item(cpuFeatures, "vfpv3"))
g_cpuFeatures |= ANDROID_CPU_ARM_FEATURE_VFPv3;
else if (has_list_item(cpuFeatures, "vfpv3d16"))
g_cpuFeatures |= ANDROID_CPU_ARM_FEATURE_VFPv3;
if (has_list_item(cpuFeatures, "neon")) {
/* Note: Certain kernels only report neon but not vfpv3
* in their features list. However, ARM mandates
* that if Neon is implemented, so must be VFPv3
* so always set the flag.
*/
g_cpuFeatures |= ANDROID_CPU_ARM_FEATURE_NEON |
ANDROID_CPU_ARM_FEATURE_VFPv3;
}
free(cpuFeatures);
}
}
if (has_list_item(cpuFeatures, "neon"))
{
/* Note: Certain kernels only report neon but not vfpv3
* in their features list. However, ARM mandates
* that if Neon is implemented, so must be VFPv3
* so always set the flag.
*/
g_cpuFeatures |= ANDROID_CPU_ARM_FEATURE_NEON |
ANDROID_CPU_ARM_FEATURE_VFPv3;
}
free(cpuFeatures);
}
#endif /* __ARM_ARCH__ */
#ifdef __i386__
g_cpuFamily = ANDROID_CPU_FAMILY_X86;
g_cpuFamily = ANDROID_CPU_FAMILY_X86;
int regs[4];
int regs[4];
/* According to http://en.wikipedia.org/wiki/CPUID */
/* According to http://en.wikipedia.org/wiki/CPUID */
#define VENDOR_INTEL_b 0x756e6547
#define VENDOR_INTEL_c 0x6c65746e
#define VENDOR_INTEL_d 0x49656e69
cpu_x86_cpuid(0, regs);
int vendorIsIntel = (regs[1] == VENDOR_INTEL_b &&
regs[2] == VENDOR_INTEL_c &&
regs[3] == VENDOR_INTEL_d);
cpu_x86_cpuid(0, regs);
int vendorIsIntel = (regs[1] == VENDOR_INTEL_b &&
regs[2] == VENDOR_INTEL_c &&
regs[3] == VENDOR_INTEL_d);
cpu_x86_cpuid(1, regs);
if ((regs[2] & (1 << 9)) != 0) {
g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_SSSE3;
}
if ((regs[2] & (1 << 23)) != 0) {
g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_POPCNT;
}
if (vendorIsIntel && (regs[2] & (1 << 22)) != 0) {
g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_MOVBE;
}
cpu_x86_cpuid(1, regs);
if ((regs[2] & (1 << 9)) != 0)
g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_SSSE3;
if ((regs[2] & (1 << 23)) != 0)
g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_POPCNT;
if (vendorIsIntel && (regs[2] & (1 << 22)) != 0)
g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_MOVBE;
#endif
#ifdef _MIPS_ARCH
g_cpuFamily = ANDROID_CPU_FAMILY_MIPS;
g_cpuFamily = ANDROID_CPU_FAMILY_MIPS;
#endif /* _MIPS_ARCH */
}
AndroidCpuFamily
android_getCpuFamily(void)
AndroidCpuFamily android_getCpuFamily(void)
{
pthread_once(&g_once, android_cpuInit);
return g_cpuFamily;
}
uint64_t
android_getCpuFeatures(void)
uint64_t android_getCpuFeatures(void)
{
pthread_once(&g_once, android_cpuInit);
return g_cpuFeatures;
}
int
android_getCpuCount(void)
int android_getCpuCount(void)
{
pthread_once(&g_once, android_cpuInit);
return g_cpuCount;

View File

@ -16,6 +16,7 @@
#include <android/keycodes.h>
#include <unistd.h>
#include <dlfcn.h>
#include "input_autodetect.h"
#include "../../../frontend/frontend_android.h"
#include "../../../input/input_common.h"
@ -25,14 +26,16 @@
#define MAX_TOUCH 16
#define PRESSED_UP(x, y) ((-0.80f > y) && (x >= -1.00f))
#define PRESSED_DOWN(x, y) ((0.80f < y) && (y <= 1.00f))
#define PRESSED_LEFT(x, y) ((-0.80f > x) && (x >= -1.00f))
#define PRESSED_RIGHT(x, y) ((0.80f < x) && (x <= 1.00f))
#define PRESSED_UP(x, y) ((y <= dzone_min))
#define PRESSED_DOWN(x, y) ((y >= dzone_max))
#define PRESSED_LEFT(x, y) ((x <= dzone_min))
#define PRESSED_RIGHT(x, y) ((x >= dzone_max))
static unsigned pads_connected;
static int state_device_ids[MAX_PADS];
static uint64_t state[MAX_PADS];
uint64_t keycode_lut[LAST_KEYCODE];
dpad_values_t dpad_state[MAX_PADS];
struct input_pointer
{
@ -43,218 +46,421 @@ struct input_pointer
static struct input_pointer pointer[MAX_TOUCH];
static unsigned pointer_count;
enum
{
AXIS_X = 0,
AXIS_Y = 1,
AXIS_Z = 11,
AXIS_RZ = 14
};
void (*engine_handle_dpad)(AInputEvent*, size_t, int, char*, size_t, int, bool);
extern float AMotionEvent_getAxisValue(const AInputEvent* motion_event,
int32_t axis, size_t pointer_index);
static typeof(AMotionEvent_getAxisValue) *p_AMotionEvent_getAxisValue;
#define AMotionEvent_getAxisValue (*p_AMotionEvent_getAxisValue)
/**
* Process the next main command.
*/
void engine_handle_cmd(void)
{
struct android_app *android_app = (struct android_app*)g_android;
int8_t cmd;
if (read(android_app->msgread, &cmd, sizeof(cmd)) != sizeof(cmd))
cmd = -1;
switch (cmd)
{
case APP_CMD_INPUT_CHANGED:
pthread_mutex_lock(&android_app->mutex);
if (android_app->inputQueue != NULL)
AInputQueue_detachLooper(android_app->inputQueue);
android_app->inputQueue = android_app->pendingInputQueue;
if (android_app->inputQueue != NULL)
{
RARCH_LOG("Attaching input queue to looper");
AInputQueue_attachLooper(android_app->inputQueue,
android_app->looper, LOOPER_ID_INPUT, NULL,
NULL);
}
pthread_cond_broadcast(&android_app->cond);
pthread_mutex_unlock(&android_app->mutex);
break;
case APP_CMD_INIT_WINDOW:
pthread_mutex_lock(&android_app->mutex);
android_app->window = android_app->pendingWindow;
pthread_cond_broadcast(&android_app->cond);
pthread_mutex_unlock(&android_app->mutex);
if (g_extern.lifecycle_state & (1ULL << RARCH_PAUSE_TOGGLE))
init_drivers();
break;
case APP_CMD_RESUME:
pthread_mutex_lock(&android_app->mutex);
android_app->activityState = cmd;
pthread_cond_broadcast(&android_app->cond);
pthread_mutex_unlock(&android_app->mutex);
break;
case APP_CMD_START:
pthread_mutex_lock(&android_app->mutex);
android_app->activityState = cmd;
pthread_cond_broadcast(&android_app->cond);
pthread_mutex_unlock(&android_app->mutex);
break;
case APP_CMD_PAUSE:
pthread_mutex_lock(&android_app->mutex);
android_app->activityState = cmd;
pthread_cond_broadcast(&android_app->cond);
pthread_mutex_unlock(&android_app->mutex);
if (!(g_extern.lifecycle_state & (1ULL << RARCH_QUIT_KEY)))
{
RARCH_LOG("Pausing RetroArch.\n");
g_extern.lifecycle_state |= (1ULL << RARCH_PAUSE_TOGGLE);
}
break;
case APP_CMD_STOP:
pthread_mutex_lock(&android_app->mutex);
android_app->activityState = cmd;
pthread_cond_broadcast(&android_app->cond);
pthread_mutex_unlock(&android_app->mutex);
break;
case APP_CMD_CONFIG_CHANGED:
break;
case APP_CMD_TERM_WINDOW:
pthread_mutex_lock(&android_app->mutex);
/* The window is being hidden or closed, clean it up. */
/* terminate display/EGL context here */
if (g_extern.lifecycle_state & (1ULL << RARCH_PAUSE_TOGGLE))
uninit_drivers();
else
RARCH_WARN("Window is terminated outside PAUSED state.\n");
android_app->window = NULL;
pthread_cond_broadcast(&android_app->cond);
pthread_mutex_unlock(&android_app->mutex);
break;
case APP_CMD_GAINED_FOCUS:
g_extern.lifecycle_state &= ~(1ULL << RARCH_PAUSE_TOGGLE);
break;
case APP_CMD_LOST_FOCUS:
break;
case APP_CMD_DESTROY:
g_extern.lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
break;
}
}
static void engine_handle_dpad_default(AInputEvent *event,
size_t motion_pointer, int state_id, char *msg, size_t msg_sizeof,
int source, bool debug_enable)
{
uint64_t *state_cur = &state[state_id];
float dzone_min = dpad_state[state_id].dzone_min;
float dzone_max = dpad_state[state_id].dzone_max;
float x = AMotionEvent_getX(event, motion_pointer);
float y = AMotionEvent_getY(event, motion_pointer);
*state_cur &= ~((1ULL << RETRO_DEVICE_ID_JOYPAD_LEFT) |
(1ULL << RETRO_DEVICE_ID_JOYPAD_RIGHT) | (1ULL << RETRO_DEVICE_ID_JOYPAD_UP) |
(1ULL << RETRO_DEVICE_ID_JOYPAD_DOWN));
*state_cur |= PRESSED_LEFT(x, y) ? (1ULL << RETRO_DEVICE_ID_JOYPAD_LEFT) : 0;
*state_cur |= PRESSED_RIGHT(x, y) ? (1ULL << RETRO_DEVICE_ID_JOYPAD_RIGHT) : 0;
*state_cur |= PRESSED_UP(x, y) ? (1ULL << RETRO_DEVICE_ID_JOYPAD_UP) : 0;
*state_cur |= PRESSED_DOWN(x, y) ? (1ULL << RETRO_DEVICE_ID_JOYPAD_DOWN) : 0;
if (debug_enable)
snprintf(msg, msg_sizeof, "Pad %d : x = %.2f, y = %.2f, src %d.\n",
state_id, x, y, source);
}
static void engine_handle_dpad_getaxisvalue(AInputEvent *event,
size_t motion_pointer, int state_id, char *msg, size_t msg_sizeof, int source,
bool debug_enable)
{
uint64_t *state_cur = &state[state_id];
float dzone_min = dpad_state[state_id].dzone_min;
float dzone_max = dpad_state[state_id].dzone_max;
float x = AMotionEvent_getAxisValue(event, AXIS_X, motion_pointer);
float y = AMotionEvent_getAxisValue(event, AXIS_Y, motion_pointer);
float z = AMotionEvent_getAxisValue(event, AXIS_Z, motion_pointer);
float rz = AMotionEvent_getAxisValue(event, AXIS_RZ, motion_pointer);
*state_cur &= ~((1ULL << RETRO_DEVICE_ID_JOYPAD_LEFT) |
(1ULL << RETRO_DEVICE_ID_JOYPAD_RIGHT) | (1ULL << RETRO_DEVICE_ID_JOYPAD_UP) |
(1ULL << RETRO_DEVICE_ID_JOYPAD_DOWN));
*state_cur |= PRESSED_LEFT(x, y) ? (1ULL << RETRO_DEVICE_ID_JOYPAD_LEFT) : 0;
*state_cur |= PRESSED_RIGHT(x, y) ? (1ULL << RETRO_DEVICE_ID_JOYPAD_RIGHT) : 0;
*state_cur |= PRESSED_UP(x, y) ? (1ULL << RETRO_DEVICE_ID_JOYPAD_UP) : 0;
*state_cur |= PRESSED_DOWN(x, y) ? (1ULL << RETRO_DEVICE_ID_JOYPAD_DOWN) : 0;
if (debug_enable)
snprintf(msg, msg_sizeof, "Pad %d : x %.2f, y %.2f, z %.2f, rz %.2f, src %d.\n",
state_id, x, y, z, rz, source);
}
static void *android_input_init(void)
{
unsigned i, j;
pads_connected = 0;
input_autodetect_init();
for(unsigned player = 0; player < 4; player++)
for(unsigned i = 0; i < RARCH_FIRST_META_KEY; i++)
for(i = 0; i < MAX_PADS; i++)
{
for(j = 0; j < RARCH_FIRST_META_KEY; j++)
{
g_settings.input.binds[player][i].id = i;
g_settings.input.binds[player][i].joykey = 0;
g_settings.input.binds[i][j].id = i;
g_settings.input.binds[i][j].joykey = 0;
}
for(int player = 0; player < 4; player++)
{
g_settings.input.binds[player][RETRO_DEVICE_ID_JOYPAD_B].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_B);
g_settings.input.binds[player][RETRO_DEVICE_ID_JOYPAD_Y].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_Y);
g_settings.input.binds[player][RETRO_DEVICE_ID_JOYPAD_SELECT].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_SELECT);
g_settings.input.binds[player][RETRO_DEVICE_ID_JOYPAD_START].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_START);
g_settings.input.binds[player][RETRO_DEVICE_ID_JOYPAD_UP].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_UP);
g_settings.input.binds[player][RETRO_DEVICE_ID_JOYPAD_DOWN].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_DOWN);
g_settings.input.binds[player][RETRO_DEVICE_ID_JOYPAD_LEFT].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_LEFT);
g_settings.input.binds[player][RETRO_DEVICE_ID_JOYPAD_RIGHT].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_RIGHT);
g_settings.input.binds[player][RETRO_DEVICE_ID_JOYPAD_A].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_A);
g_settings.input.binds[player][RETRO_DEVICE_ID_JOYPAD_X].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_X);
g_settings.input.binds[player][RETRO_DEVICE_ID_JOYPAD_L].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_L);
g_settings.input.binds[player][RETRO_DEVICE_ID_JOYPAD_R].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_R);
g_settings.input.binds[player][RETRO_DEVICE_ID_JOYPAD_L2].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_L2);
g_settings.input.binds[player][RETRO_DEVICE_ID_JOYPAD_R2].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_R2);
g_settings.input.binds[player][RETRO_DEVICE_ID_JOYPAD_L3].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_L3);
g_settings.input.binds[player][RETRO_DEVICE_ID_JOYPAD_R3].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_R3);
g_settings.input.binds[i][RETRO_DEVICE_ID_JOYPAD_B].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_B);
g_settings.input.binds[i][RETRO_DEVICE_ID_JOYPAD_Y].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_Y);
g_settings.input.binds[i][RETRO_DEVICE_ID_JOYPAD_SELECT].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_SELECT);
g_settings.input.binds[i][RETRO_DEVICE_ID_JOYPAD_START].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_START);
g_settings.input.binds[i][RETRO_DEVICE_ID_JOYPAD_UP].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_UP);
g_settings.input.binds[i][RETRO_DEVICE_ID_JOYPAD_DOWN].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_DOWN);
g_settings.input.binds[i][RETRO_DEVICE_ID_JOYPAD_LEFT].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_LEFT);
g_settings.input.binds[i][RETRO_DEVICE_ID_JOYPAD_RIGHT].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_RIGHT);
g_settings.input.binds[i][RETRO_DEVICE_ID_JOYPAD_A].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_A);
g_settings.input.binds[i][RETRO_DEVICE_ID_JOYPAD_X].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_X);
g_settings.input.binds[i][RETRO_DEVICE_ID_JOYPAD_L].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_L);
g_settings.input.binds[i][RETRO_DEVICE_ID_JOYPAD_R].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_R);
g_settings.input.binds[i][RETRO_DEVICE_ID_JOYPAD_L2].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_L2);
g_settings.input.binds[i][RETRO_DEVICE_ID_JOYPAD_R2].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_R2);
g_settings.input.binds[i][RETRO_DEVICE_ID_JOYPAD_L3].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_L3);
g_settings.input.binds[i][RETRO_DEVICE_ID_JOYPAD_R3].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_R3);
dpad_state[i].dzone_min = -0.99f;
dpad_state[i].dzone_max = 0.99f;
g_settings.input.dpad_emulation[i] = DPAD_EMULATION_LSTICK;
}
g_settings.input.dpad_emulation[0] = DPAD_EMULATION_LSTICK;
if ((dlopen("/system/lib/libandroid.so", RTLD_LOCAL | RTLD_LAZY)) == 0)
{
RARCH_WARN("Unable to open libandroid.so\n");
return (void*)-1;
}
else
{
p_AMotionEvent_getAxisValue = dlsym(RTLD_DEFAULT, "AMotionEvent_getAxisValue");
if (p_AMotionEvent_getAxisValue != NULL)
{
RARCH_LOG("Setting engine_handle_dpad to 'Get Axis Value' (for reading extra analog sticks)");
engine_handle_dpad = engine_handle_dpad_getaxisvalue;
}
else
{
RARCH_LOG("Setting engine_handle_dpad to 'Default'");
engine_handle_dpad = engine_handle_dpad_default;
}
}
return (void*)-1;
}
// Handle all events. If our activity is in pause state, block until we're unpaused.
static void android_input_poll(void *data)
{
(void)data;
RARCH_PERFORMANCE_INIT(input_poll);
RARCH_PERFORMANCE_START(input_poll);
bool debug_enable = g_settings.input.debug_enable;
struct android_app* android_app = (struct android_app*)g_android;
int ident;
uint64_t *lifecycle_state = &g_extern.lifecycle_state;
*lifecycle_state &= ~((1ULL << RARCH_RESET) | (1ULL << RARCH_REWIND) | (1ULL << RARCH_FAST_FORWARD_KEY) | (1ULL << RARCH_FAST_FORWARD_HOLD_KEY) | (1ULL << RARCH_MUTE) | (1ULL << RARCH_SAVE_STATE_KEY) | (1ULL << RARCH_LOAD_STATE_KEY) | (1ULL << RARCH_STATE_SLOT_PLUS) | (1ULL << RARCH_STATE_SLOT_MINUS) | (1ULL << RARCH_QUIT_KEY) | (1ULL << RARCH_RMENU_TOGGLE));
*lifecycle_state &= ~((1ULL << RARCH_RESET) | (1ULL << RARCH_REWIND) | (1ULL << RARCH_FAST_FORWARD_KEY) | (1ULL << RARCH_FAST_FORWARD_HOLD_KEY) | (1ULL << RARCH_MUTE) | (1ULL << RARCH_SAVE_STATE_KEY) | (1ULL << RARCH_LOAD_STATE_KEY) | (1ULL << RARCH_STATE_SLOT_PLUS) | (1ULL << RARCH_STATE_SLOT_MINUS));
// Read all pending events.
while (AInputQueue_hasEvents(android_app->inputQueue) > 0)
while ((ident = ALooper_pollAll((input_key_pressed_func(RARCH_PAUSE_TOGGLE)) ? -1 : 0,
NULL, NULL, NULL)) >= 0)
{
AInputEvent* event = NULL;
if (AInputQueue_getEvent(android_app->inputQueue, &event) < 0)
break;
bool long_msg_enable = false;
int32_t handled = 1;
int action = 0;
char msg[128];
msg[0] = 0;
int source = AInputEvent_getSource(event);
int id = AInputEvent_getDeviceId(event);
if (id == zeus_second_id)
id = zeus_id;
int keycode = AKeyEvent_getKeyCode(event);
int type_event = AInputEvent_getType(event);
int state_id = -1;
if (source & (AINPUT_SOURCE_TOUCHSCREEN | AINPUT_SOURCE_MOUSE | AINPUT_SOURCE_TOUCHPAD))
state_id = 0; // touch overlay is always player 1
else
if (ident == LOOPER_ID_INPUT)
{
for (unsigned i = 0; i < pads_connected; i++)
if (state_device_ids[i] == id)
state_id = i;
}
bool debug_enable = g_settings.input.debug_enable;
struct android_app *android_app = (struct android_app*)g_android;
AInputEvent* event = NULL;
if (state_id < 0)
{
state_id = pads_connected;
state_device_ids[pads_connected++] = id;
input_autodetect_setup(android_app, msg, sizeof(msg), state_id, id, source);
long_msg_enable = true;
}
if (keycode == AKEYCODE_BACK)
{
uint8_t unpacked = (keycode_lut[AKEYCODE_BACK] >> ((state_id+1) << 3)) - 1;
uint64_t input_state = (1ULL << unpacked);
if (type_event == AINPUT_EVENT_TYPE_KEY && input_state < (1ULL << RARCH_FIRST_META_KEY)
&& input_state > 0)
// Read all pending events.
while (AInputQueue_hasEvents(android_app->inputQueue))
{
}
else
{
int meta = AKeyEvent_getMetaState(event);
if (!(meta & AMETA_ALT_ON))
if (AInputQueue_getEvent(android_app->inputQueue, &event) >= 0)
{
*lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
AInputQueue_finishEvent(android_app->inputQueue, event, handled);
break;
}
}
}
bool long_msg_enable = false;
int32_t handled = 1;
int action = 0;
char msg[128];
int source, id, keycode, type_event, state_id;
//int predispatched;
if (type_event == AINPUT_EVENT_TYPE_MOTION)
{
float x = 0.0f;
float y = 0.0f;
action = AMotionEvent_getAction(event);
size_t motion_pointer = action >> AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT;
action &= AMOTION_EVENT_ACTION_MASK;
msg[0] = 0;
//predispatched =AInputQueue_preDispatchEvent(android_app->inputQueue,event);
if (source & ~(AINPUT_SOURCE_TOUCHSCREEN | AINPUT_SOURCE_MOUSE))
{
if (g_settings.input.dpad_emulation[state_id] != DPAD_EMULATION_NONE)
{
uint64_t *state_cur = &state[state_id];
x = AMotionEvent_getX(event, motion_pointer);
y = AMotionEvent_getY(event, motion_pointer);
*state_cur &= ~((1ULL << RETRO_DEVICE_ID_JOYPAD_LEFT) | (1ULL << RETRO_DEVICE_ID_JOYPAD_RIGHT) |
(1ULL << RETRO_DEVICE_ID_JOYPAD_UP) | (1ULL << RETRO_DEVICE_ID_JOYPAD_DOWN));
*state_cur |= PRESSED_LEFT(x, y) ? (1ULL << RETRO_DEVICE_ID_JOYPAD_LEFT) : 0;
*state_cur |= PRESSED_RIGHT(x, y) ? (1ULL << RETRO_DEVICE_ID_JOYPAD_RIGHT) : 0;
*state_cur |= PRESSED_UP(x, y) ? (1ULL << RETRO_DEVICE_ID_JOYPAD_UP) : 0;
*state_cur |= PRESSED_DOWN(x, y) ? (1ULL << RETRO_DEVICE_ID_JOYPAD_DOWN) : 0;
}
}
else
{
bool keyup = (action == AMOTION_EVENT_ACTION_UP ||
action == AMOTION_EVENT_ACTION_CANCEL || action == AMOTION_EVENT_ACTION_POINTER_UP) ||
(source == AINPUT_SOURCE_MOUSE && action != AMOTION_EVENT_ACTION_DOWN);
//if (predispatched)
//continue;
if (keyup && motion_pointer < MAX_TOUCH)
{
memmove(pointer + motion_pointer, pointer + motion_pointer + 1, (MAX_TOUCH - motion_pointer - 1) * sizeof(struct input_pointer));
if (pointer_count > 0)
pointer_count--;
}
else
{
int pointer_max = min(AMotionEvent_getPointerCount(event), MAX_TOUCH);
for (motion_pointer = 0; motion_pointer < pointer_max; motion_pointer++)
source = AInputEvent_getSource(event);
id = AInputEvent_getDeviceId(event);
if (id == zeus_second_id)
id = zeus_id;
keycode = AKeyEvent_getKeyCode(event);
type_event = AInputEvent_getType(event);
state_id = -1;
if (source & (AINPUT_SOURCE_TOUCHSCREEN | AINPUT_SOURCE_MOUSE | AINPUT_SOURCE_TOUCHPAD))
state_id = 0; // touch overlay is always player 1
else
{
x = AMotionEvent_getX(event, motion_pointer);
y = AMotionEvent_getY(event, motion_pointer);
input_translate_coord_viewport(x, y,
&pointer[motion_pointer].x, &pointer[motion_pointer].y,
&pointer[motion_pointer].full_x, &pointer[motion_pointer].full_y);
pointer_count = max(pointer_count, motion_pointer + 1);
for (unsigned i = 0; i < pads_connected; i++)
if (state_device_ids[i] == id)
state_id = i;
}
if (state_id < 0)
{
state_id = pads_connected;
state_device_ids[pads_connected++] = id;
input_autodetect_setup(android_app, msg, sizeof(msg), state_id, id, source);
long_msg_enable = true;
}
if (keycode == AKEYCODE_BACK)
{
uint8_t unpacked = (keycode_lut[AKEYCODE_BACK] >> ((state_id+1) << 3)) - 1;
uint64_t input_state = (1ULL << unpacked);
if (g_extern.lifecycle_mode_state & (1ULL << MODE_INPUT_XPERIA_PLAY_HACK))
{
int meta = AKeyEvent_getMetaState(event);
if (!(meta & AMETA_ALT_ON))
{
*lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
AInputQueue_finishEvent(android_app->inputQueue, event, handled);
break;
}
}
else if (type_event == AINPUT_EVENT_TYPE_KEY && input_state < (1ULL << RARCH_FIRST_META_KEY)
&& input_state > 0)
{
}
else if (g_settings.input.back_behavior == BACK_BUTTON_MENU_TOGGLE)
{
*lifecycle_state |= (1ULL << RARCH_RMENU_TOGGLE);
AInputQueue_finishEvent(android_app->inputQueue, event, handled);
break;
}
else
{
*lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
AInputQueue_finishEvent(android_app->inputQueue, event, handled);
break;
}
}
if (type_event == AINPUT_EVENT_TYPE_MOTION)
{
action = AMotionEvent_getAction(event);
size_t motion_pointer = action >> AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT;
action &= AMOTION_EVENT_ACTION_MASK;
if (source & ~(AINPUT_SOURCE_TOUCHSCREEN | AINPUT_SOURCE_MOUSE))
{
if (g_settings.input.dpad_emulation[state_id] != DPAD_EMULATION_NONE)
engine_handle_dpad(event, motion_pointer, state_id, msg, sizeof(msg), source, debug_enable);
}
else
{
float x = 0.0f;
float y = 0.0f;
bool keyup = (action == AMOTION_EVENT_ACTION_UP ||
action == AMOTION_EVENT_ACTION_CANCEL || action == AMOTION_EVENT_ACTION_POINTER_UP) ||
(source == AINPUT_SOURCE_MOUSE && action != AMOTION_EVENT_ACTION_DOWN);
if (keyup && motion_pointer < MAX_TOUCH)
{
memmove(pointer + motion_pointer, pointer + motion_pointer + 1, (MAX_TOUCH - motion_pointer - 1) * sizeof(struct input_pointer));
if (pointer_count > 0)
pointer_count--;
}
else
{
int pointer_max = min(AMotionEvent_getPointerCount(event), MAX_TOUCH);
for (motion_pointer = 0; motion_pointer < pointer_max; motion_pointer++)
{
x = AMotionEvent_getX(event, motion_pointer);
y = AMotionEvent_getY(event, motion_pointer);
input_translate_coord_viewport(x, y,
&pointer[motion_pointer].x, &pointer[motion_pointer].y,
&pointer[motion_pointer].full_x, &pointer[motion_pointer].full_y);
pointer_count = max(pointer_count, motion_pointer + 1);
}
}
if (debug_enable)
snprintf(msg, sizeof(msg), "Pad %d : x = %.2f, y = %.2f, src %d.\n", state_id, x, y, source);
}
}
else if (type_event == AINPUT_EVENT_TYPE_KEY)
{
if (debug_enable)
snprintf(msg, sizeof(msg), "Pad %d : %d, ac = %d, src = %d.\n", state_id, keycode, action, source);
/* Hack - we have to decrease the unpacked value by 1
* because we 'added' 1 to each entry in the LUT -
* RETRO_DEVICE_ID_JOYPAD_B is 0
*/
uint8_t unpacked = (keycode_lut[keycode] >> ((state_id+1) << 3)) - 1;
uint64_t input_state = (1ULL << unpacked);
int action = AKeyEvent_getAction(event);
uint64_t *key = NULL;
if(input_state < (1ULL << RARCH_FIRST_META_KEY))
key = &state[state_id];
else if(input_state)
key = &g_extern.lifecycle_state;
if(key != NULL)
{
if (action == AKEY_EVENT_ACTION_UP)
*key &= ~(input_state);
else if (action == AKEY_EVENT_ACTION_DOWN)
*key |= input_state;
}
if((keycode == AKEYCODE_VOLUME_UP || keycode == AKEYCODE_VOLUME_DOWN) && keycode_lut[keycode] == 0)
handled = 0;
}
if (msg[0] != 0)
msg_queue_push(g_extern.msg_queue, msg, 0, long_msg_enable ? 180 : 30);
AInputQueue_finishEvent(android_app->inputQueue, event, handled);
}
}
if (debug_enable)
snprintf(msg, sizeof(msg), "Pad %d : x = %.2f, y = %.2f, src %d.\n", state_id, x, y, source);
}
else if (type_event == AINPUT_EVENT_TYPE_KEY)
{
if (debug_enable)
snprintf(msg, sizeof(msg), "Pad %d : %d, ac = %d, src = %d.\n", state_id, keycode, action, source);
/* Hack - we have to decrease the unpacked value by 1
* because we 'added' 1 to each entry in the LUT -
* RETRO_DEVICE_ID_JOYPAD_B is 0
*/
uint8_t unpacked = (keycode_lut[keycode] >> ((state_id+1) << 3)) - 1;
uint64_t input_state = (1ULL << unpacked);
int action = AKeyEvent_getAction(event);
uint64_t *key = NULL;
if(input_state < (1ULL << RARCH_FIRST_META_KEY))
key = &state[state_id];
else if(input_state)
key = &g_extern.lifecycle_state;
if(key != NULL)
{
if (action == AKEY_EVENT_ACTION_UP)
*key &= ~(input_state);
else if (action == AKEY_EVENT_ACTION_DOWN)
*key |= input_state;
}
if((keycode == AKEYCODE_VOLUME_UP || keycode == AKEYCODE_VOLUME_DOWN) && keycode_lut[keycode] == 0)
handled = 0;
}
if (msg[0] != 0)
msg_queue_push(g_extern.msg_queue, msg, 0, long_msg_enable ? 180 : 30);
AInputQueue_finishEvent(android_app->inputQueue, event, handled);
else if (ident == LOOPER_ID_MAIN)
engine_handle_cmd();
}
#if 0
{
char msg[64];
snprintf(msg, sizeof(msg), "Pointers: %u", pointer_count);
msg_queue_clear(g_extern.msg_queue);
msg_queue_push(g_extern.msg_queue, msg, 0, 30);
}
#endif
RARCH_PERFORMANCE_STOP(input_poll);
}
static int16_t android_input_state(void *data, const struct retro_keybind **binds, unsigned port, unsigned device, unsigned index, unsigned id)

View File

@ -18,9 +18,7 @@
#include "jni_macros.h"
#include "input_autodetect.h"
uint64_t keycode_lut[LAST_KEYCODE];
bool volume_enable;
extern dpad_values_t dpad_state[MAX_PADS];
static void input_autodetect_get_device_name(void *data, char *buf, size_t size, int id)
{
@ -77,7 +75,6 @@ void input_autodetect_init (void)
for(j = 0; j < LAST_KEYCODE; j++)
keycode_lut[j] = 0;
volume_enable = true;
if (g_settings.input.autodetect_enable)
return;
@ -142,6 +139,8 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned
}
}
keycode_lut[AKEYCODE_MENU] |= ((RARCH_RMENU_TOGGLE + 1) << shift);
if (g_settings.input.autodetect_enable)
{
@ -210,20 +209,28 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned
}
else if (strstr(name_buf, "TTT THT Arcade console 2P USB Play"))
{
/* same as Rumblepad 2 - merge? */
keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift);
keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift);
keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift);
keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift);
keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift);
keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift);
keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift);
keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
keycode_lut[AKEYCODE_BUTTON_10] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift);
dpad_state[id].dzone_min = -2.00f;
dpad_state[id].dzone_max = 1.00f;
/* unsure about pad 2 still */
shift = 8 + ((port + 1) * 8);
/* same as Rumblepad 2 - merge? */
//keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift);
keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift);
keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift);
keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift);
keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift);
keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift);
keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift);
keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift);
/* TODO - unsure about pad 2 still */
#if 0
keycode_lut[AKEYCODE_BUTTON_Z] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift);
keycode_lut[AKEYCODE_BUTTON_Y] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift);
keycode_lut[AKEYCODE_BUTTON_C] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift);
keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift);
keycode_lut[AKEYCODE_BUTTON_11] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift);
keycode_lut[AKEYCODE_BUTTON_12] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
@ -235,6 +242,21 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned
keycode_lut[AKEYCODE_BUTTON_B] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift);
keycode_lut[AKEYCODE_BUTTON_C] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift);
#endif
}
else if (strstr(name_buf, "TOMMO NEOGEOX Arcade Stick"))
{
g_settings.input.dpad_emulation[port] = DPAD_EMULATION_NONE;
keycode_lut[AKEYCODE_DPAD_UP] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift);
keycode_lut[AKEYCODE_DPAD_DOWN] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift);
keycode_lut[AKEYCODE_DPAD_LEFT] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift);
keycode_lut[AKEYCODE_DPAD_RIGHT] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift);
keycode_lut[AKEYCODE_BUTTON_A] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
keycode_lut[AKEYCODE_BUTTON_B] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift);
keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift);
keycode_lut[AKEYCODE_BUTTON_C] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift);
keycode_lut[AKEYCODE_BUTTON_R2] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift);
keycode_lut[AKEYCODE_BUTTON_L2] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
}
else if (strstr(name_buf, "MadCatz"))
{
@ -279,6 +301,40 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned
keycode_lut[AKEYCODE_BUTTON_R1] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift);
}
}
else if (strstr(name_buf, "Sun4i-keypad"))
{
// iDroid x360
g_settings.input.dpad_emulation[port] = DPAD_EMULATION_NONE;
keycode_lut[AKEYCODE_DPAD_UP] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift);
keycode_lut[AKEYCODE_DPAD_DOWN] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift);
keycode_lut[AKEYCODE_DPAD_LEFT] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift);
keycode_lut[AKEYCODE_DPAD_RIGHT] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift);
keycode_lut[AKEYCODE_INSERT] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
keycode_lut[AKEYCODE_MINUS] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift);
keycode_lut[AKEYCODE_SLASH] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift);
keycode_lut[AKEYCODE_MOVE_END] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift);
keycode_lut[AKEYCODE_LEFT_BRACKET] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift);
keycode_lut[AKEYCODE_FORWARD_DEL] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift);
keycode_lut[AKEYCODE_MEDIA_PLAY] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift);
keycode_lut[AKEYCODE_EQUALS] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
// use this for the RGUI toggle
keycode_lut[AKEYCODE_MENU] |= ((RARCH_RMENU_TOGGLE+1) << shift);
// Left Analog Up: 152
// Left Analog Down: 146
// Left Analog Right: 150
// Left Analog Left: 148
// Right Analog Up: 92 (AKEYCODE_PAGE_UP)
// Right Analog Down: 93 (AKEYCODE_PAGE_DOWN)
// Right Analog Right: 113 (AKEYCODE_CTRL_LEFT)
// Right Analog Left: 72 (AKEYCODE_RIGHT_BRACKET)
keycode_lut[AKEYCODE_NUMPAD_8] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift);
keycode_lut[AKEYCODE_NUMPAD_2] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift);
keycode_lut[AKEYCODE_NUMPAD_6] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift);
keycode_lut[AKEYCODE_NUMPAD_4] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift);
}
else if (strstr(name_buf, "Zeemote"))
{
if (strstr(name_buf, "Steelseries free"))
@ -299,6 +355,9 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned
else if (strstr(name_buf, "HuiJia USB GamePad") ||
strstr(name_buf, "Smartjoy Family Super Smartjoy 2"))
{
dpad_state[id].dzone_min = -1.00f;
dpad_state[id].dzone_max = 1.00f;
keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift);
@ -389,13 +448,18 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned
keycode_lut[AKEYCODE_BUTTON_14] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift);
keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift);
keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift);
keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift);
if (strstr(name_buf, "WiseGroup"))
keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift);
else
keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift);
keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift);
keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift);
keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift);
if (strstr(name_buf, "JC-PS102U"))
if (strstr(name_buf, "JC-PS102U") || strstr(name_buf, "WiseGroup"))
keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift);
else
keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift);
@ -427,6 +491,8 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned
}
else
{
//PS button will be used for RGUI toggle
keycode_lut[AKEYCODE_BUTTON_1] |= ((RARCH_RMENU_TOGGLE+1) << shift);
keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
keycode_lut[AKEYCODE_BUTTON_A] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift);
}
@ -480,6 +546,31 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned
keycode_lut[AKEYCODE_BUTTON_14] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift);
keycode_lut[AKEYCODE_UNKNOWN] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift);
}
else if (strstr(name_buf, "adc joystick"))
{
/* JXD S7300B */
g_settings.input.dpad_emulation[port] = DPAD_EMULATION_NONE;
keycode_lut[AKEYCODE_DPAD_UP] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift);
keycode_lut[AKEYCODE_DPAD_DOWN] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift);
keycode_lut[AKEYCODE_DPAD_LEFT] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift);
keycode_lut[AKEYCODE_DPAD_RIGHT] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift);
keycode_lut[AKEYCODE_BUTTON_A] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift);
keycode_lut[AKEYCODE_BUTTON_B] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
keycode_lut[AKEYCODE_BUTTON_Y] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift);
keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift);
keycode_lut[AKEYCODE_BUTTON_L1] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift);
keycode_lut[AKEYCODE_BUTTON_R1] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift);
keycode_lut[AKEYCODE_BUTTON_L2] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift);
keycode_lut[AKEYCODE_BUTTON_R2] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift);
keycode_lut[AKEYCODE_ENTER] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift);
keycode_lut[AKEYCODE_SPACE] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
//keycode_lut[AKEYCODE_VOLUME_UP] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
//keycode_lut[AKEYCODE_VOLUME_DOWN] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
}
else if (strstr(name_buf, "idroid:con"))
{
keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
@ -527,6 +618,11 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned
else if (strstr(name_buf, "USB,2-axis 8-button gamepad") ||
strstr(name_buf, "BUFFALO BGC-FC801"))
{
if (strstr(name_buf, "BUFFALO BGC-FC801"))
{
dpad_state[id].dzone_min = -1.00f;
dpad_state[id].dzone_max = 1.00f;
}
keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift);
keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift);
@ -650,6 +746,7 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned
}
else if (strstr(name_buf, "keypad-zeus") || (strstr(name_buf, "keypad-game-zeus")))
{
g_extern.lifecycle_mode_state |= (1ULL << MODE_INPUT_XPERIA_PLAY_HACK);
/* Xperia Play */
/* X/o/square/triangle/R1/L1/D-pad */
keycode_lut[AKEYCODE_DPAD_CENTER] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
@ -665,7 +762,6 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned
/* Xperia Play */
/* Start/select */
volume_enable = false;
/* TODO: menu button */
/* Menu : 82 */
@ -815,7 +911,6 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned
//player 2
shift += 8;
volume_enable = false;
keycode_lut[AKEYCODE_I] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift);
keycode_lut[AKEYCODE_K] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift);
keycode_lut[AKEYCODE_J] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift);

View File

@ -29,11 +29,17 @@ enum {
enum {
AKEYCODE_META_FUNCTION_ON = 8,
AKEYCODE_ESCAPE = 111,
AKEYCODE_FORWARD_DEL = 112,
AKEYCODE_CTRL_LEFT = 113,
AKEYCODE_CTRL_RIGHT = 114,
AKEYCODE_CAPS_LOCK = 115,
AKEYCODE_SCROLL_LOCK = 116,
AKEYCODE_SYSRQ = 120,
AKEYCODE_BREAK = 121,
AKEYCODE_MOVE_HOME = 122,
AKEYCODE_MOVE_END = 123,
AKEYCODE_INSERT = 124,
AKEYCODE_FORWARD = 125,
AKEYCODE_MEDIA_PLAY = 126,
AKEYCODE_MEDIA_PAUSE = 127,
AKEYCODE_F2 = 132,
@ -44,6 +50,15 @@ enum {
AKEYCODE_F7 = 137,
AKEYCODE_F8 = 138,
AKEYCODE_F9 = 139,
AKEYCODE_NUMPAD_1 = 145,
AKEYCODE_NUMPAD_2 = 146,
AKEYCODE_NUMPAD_3 = 147,
AKEYCODE_NUMPAD_4 = 148,
AKEYCODE_NUMPAD_5 = 149,
AKEYCODE_NUMPAD_6 = 150,
AKEYCODE_NUMPAD_7 = 151,
AKEYCODE_NUMPAD_8 = 152,
AKEYCODE_NUMPAD_9 = 153,
AKEYCODE_BUTTON_1 = 188,
AKEYCODE_BUTTON_2 = 189,
AKEYCODE_BUTTON_3 = 190,
@ -65,6 +80,12 @@ enum {
#define LAST_KEYCODE AKEYCODE_ASSIST
typedef struct
{
float dzone_min;
float dzone_max;
} dpad_values_t;
extern uint64_t keycode_lut[LAST_KEYCODE];
extern bool volume_enable;
extern int zeus_id;

View File

@ -13,3 +13,4 @@ libretro_nestopia = "Nestopia (Nintendo NES)"
libretro_pcsx_rearmed-neon = "PCSX-reARMed (PlayStation1) [NEON]"
libretro_pcsx_rearmed = "PCSX-reARMed (PlayStation1)"
libretro_nxengine = "NXEngine (Cave Story/Doukutsu Monogatari)"
libretro_tyrquake = "TyrQuake (Quake 1)"

View File

@ -1,5 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="back_options">
<item>Quit</item>
<item>Menu toggle</item>
</string-array>
<string-array name="back_options_values">
<item>0</item>
<item>1</item>
</string-array>
<string-array name="aspect_ratios">
<item>Full screen</item>
<item>Auto</item>

View File

@ -187,6 +187,14 @@
</PreferenceCategory>
</PreferenceScreen>
<PreferenceScreen android:title="Input Settings" >
<PreferenceCategory android:title="General" >
<ListPreference
android:entries="@array/back_options"
android:entryValues="@array/back_options_values"
android:key="input_back_behavior"
android:summary="Select how you want the Back button to behave."
android:title="Back behavior" />
</PreferenceCategory>
<PreferenceCategory android:title="Configuration Autodetect" >
<CheckBoxPreference
android:defaultValue="true"

View File

@ -59,13 +59,11 @@ public class RetroArch extends Activity implements
AdapterView.OnItemClickListener {
private IconAdapter<ModuleWrapper> adapter;
static private final int ACTIVITY_LOAD_ROM = 0;
static private final int ACTIVITY_NATIVE_ACTIVITY = 1;
static private String libretro_path;
static private Double report_refreshrate;
static private final String TAG = "RetroArch-Phoenix";
private ConfigFile config;
private ConfigFile core_config;
private String return_file;
private final double getDisplayRefreshRate() {
// Android is *very* likely to screw this up.
@ -284,12 +282,6 @@ public class RetroArch extends Activity implements
}
}
if (getCacheDir() != null && getCacheDir().getAbsolutePath() != null) {
return_file = getCacheDir().getAbsolutePath() + File.pathSeparator + ".return";
} else {
return_file = getDefaultConfigPath() + ".ret";
}
this.setVolumeControlStream(AudioManager.STREAM_MUSIC);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
@ -356,7 +348,7 @@ public class RetroArch extends Activity implements
else if (getCacheDir() != null && getCacheDir().getAbsolutePath() != null)
return getCacheDir().getAbsolutePath() + File.separator + "retroarch.cfg";
else // emergency fallback, all else failed
return "/mnt/sdcard/retroarch.cfg";
return "/mnt/sd/retroarch.cfg";
}
private void updateConfigFile() {
@ -371,6 +363,7 @@ public class RetroArch extends Activity implements
config.setBoolean("video_vsync", prefs.getBoolean("video_vsync", true));
config.setBoolean("input_autodetect_enable", prefs.getBoolean("input_autodetect_enable", true));
config.setBoolean("input_debug_enable", prefs.getBoolean("input_debug_enable", false));
config.setInt("input_back_behavior", Integer.valueOf(prefs.getString("input_back_behavior", "0")));
config.setInt("input_autodetect_icade_profile_pad1", Integer.valueOf(prefs.getString("input_autodetect_icade_profile_pad1", "0")));
config.setInt("input_autodetect_icade_profile_pad2", Integer.valueOf(prefs.getString("input_autodetect_icade_profile_pad2", "0")));
config.setInt("input_autodetect_icade_profile_pad3", Integer.valueOf(prefs.getString("input_autodetect_icade_profile_pad3", "0")));
@ -460,7 +453,6 @@ public class RetroArch extends Activity implements
switch (requestCode) {
case ACTIVITY_LOAD_ROM:
if (data.getStringExtra("PATH") != null) {
new File(return_file).delete();
Toast.makeText(this,
"Loading: [" + data.getStringExtra("PATH") + "]...",
Toast.LENGTH_SHORT).show();
@ -468,27 +460,10 @@ public class RetroArch extends Activity implements
myIntent.putExtra("ROM", data.getStringExtra("PATH"));
myIntent.putExtra("LIBRETRO", libretro_path);
myIntent.putExtra("CONFIGFILE", getDefaultConfigPath());
myIntent.putExtra("RETURN", return_file);
myIntent.putExtra("IME", current_ime);
startActivityForResult(myIntent, ACTIVITY_NATIVE_ACTIVITY);
startActivity(myIntent);
}
break;
case ACTIVITY_NATIVE_ACTIVITY:
AlertDialog.Builder builder = new AlertDialog.Builder(this).setNeutralButton("OK", null);
try {
DataInputStream cacheStream = new DataInputStream(new FileInputStream(return_file));
int value = cacheStream.readInt();
cacheStream.close();
if (value != 0) {
throw new IOException();
}
} catch (FileNotFoundException e) {
builder.setTitle("Crash").setMessage("RetroArch Crashed").show();
} catch (IOException e) {
builder.setTitle("Error").setMessage("RetroArch Could not load the chosen ROM.\n\nCheck the Cores Guide for details on valid ROMs for this emulator.").show();
}
new File(return_file).delete();
break;
}
}

View File

@ -23,17 +23,25 @@
int main(int argc, char *argv[])
{
srand(time(NULL));
int16_t input_i[1024];
int16_t output_i[1024 * 8];
float input_f[1024];
float output_f[1024 * 8];
if (argc != 3)
double ratio_max_deviation = 0.0;
if (argc < 3 || argc > 4)
{
fprintf(stderr, "Usage: %s <in-rate> <out-rate> (max ratio: 8.0)\n", argv[0]);
fprintf(stderr, "Usage: %s <in-rate> <out-rate> [ratio deviation] (max ratio: 8.0)\n", argv[0]);
return 1;
}
else if (argc == 4)
{
ratio_max_deviation = fabs(strtod(argv[3], NULL));
fprintf(stderr, "Ratio deviation: %.4f.\n", ratio_max_deviation);
}
double in_rate = strtod(argv[1], NULL);
double out_rate = strtod(argv[2], NULL);
@ -58,13 +66,16 @@ int main(int argc, char *argv[])
if (fread(input_i, sizeof(int16_t), 1024, stdin) != 1024)
break;
double uniform = (2.0 * rand()) / RAND_MAX - 1.0;
double rate_mod = 1.0 + ratio_max_deviation * uniform;
audio_convert_s16_to_float(input_f, input_i, 1024, 1.0f);
struct resampler_data data = {
.data_in = input_f,
.data_out = output_f,
.input_frames = sizeof(input_f) / (2 * sizeof(float)),
.ratio = ratio,
.ratio = ratio * rate_mod,
};
rarch_resampler_process(resampler, re, &data);

View File

@ -0,0 +1,3 @@
#!/bin/sh
ffmpeg -i "$1" -f s16le - | ./test-sinc-highest 44100 48000 $3 | ffmpeg -y -ar 48000 -f s16le -ac 2 -i - "$2"

View File

@ -47,7 +47,7 @@ void audio_convert_float_to_s16_C(int16_t *out,
void audio_convert_s16_to_float_SSE2(float *out,
const int16_t *in, size_t samples, float gain)
{
float fgain = gain / (0x7fff * 0x10000);
float fgain = gain / UINT32_C(0x80000000);
__m128 factor = _mm_set1_ps(fgain);
size_t i;
for (i = 0; i + 8 <= samples; i += 8, in += 8, out += 8)
@ -73,7 +73,7 @@ void audio_convert_s16_to_float_SSE2(float *out,
void audio_convert_float_to_s16_SSE2(int16_t *out,
const float *in, size_t samples)
{
__m128 factor = _mm_set1_ps((float)0x7fff);
__m128 factor = _mm_set1_ps((float)0x8000);
size_t i;
for (i = 0; i + 8 <= samples; i += 8, in += 8, out += 8)
{

View File

@ -110,12 +110,13 @@ static char *extract_value(char *line, bool is_value)
line++;
char *save;
char *tok;
// We have a full string. Read until next ".
if (*line == '"')
{
line++;
char *tok = strtok_r(line, "\"", &save);
tok = strtok_r(line, "\"", &save);
if (!tok)
return NULL;
return strdup(tok);
@ -124,7 +125,7 @@ static char *extract_value(char *line, bool is_value)
return NULL;
else // We don't have that... Read till next space.
{
char *tok = strtok_r(line, " \n\t\f\r\v", &save);
tok = strtok_r(line, " \n\t\f\r\v", &save);
if (tok)
return strdup(tok);
else

View File

@ -163,7 +163,7 @@ enum
#if defined(XENON) || defined(_XBOX360) || defined(__CELLOS_LV2__)
#define DEFAULT_ASPECT_RATIO 1.7778f
#elif defined(_XBOX1) || defined(GEKKO) || defined(ANDROID)
#elif defined(_XBOX1) || defined(GEKKO) || defined(ANDROID) || defined(__BLACKBERRY_QNX__)
#define DEFAULT_ASPECT_RATIO 1.3333f
#else
#define DEFAULT_ASPECT_RATIO -1.0f
@ -240,7 +240,8 @@ static const bool aspect_ratio_auto = false; // 1:1 PAR
static const bool crop_overscan = true;
// Font size for on-screen messages.
#ifdef HAVE_RMENU
// TODO: use RARCH_CONSOLE instead? need to test
#if defined(HAVE_RMENU) && !defined(HAVE_RGUI)
static const float font_size = 1.0f;
#else
static const float font_size = 48;

View File

@ -33,8 +33,6 @@ CONSOLE EXTENSIONS
============================================================ */
#ifdef RARCH_CONSOLE
#include "../rarch_console_video.c"
#ifdef HW_DOL
#include "../../ngc/ssaram.c"
#endif
@ -106,6 +104,8 @@ VIDEO CONTEXT
#include "../../gfx/context/xdk_ctx.c"
#elif defined(ANDROID)
#include "../../gfx/context/androidegl_ctx.c"
#elif defined(__BLACKBERRY_QNX__)
#include "../../gfx/context/bbqnx_ctx.c"
#endif
#endif
@ -134,7 +134,7 @@ VIDEO IMAGE
#include "../../ps3/image.c"
#elif defined(_XBOX1)
#include "../../xdk/image.c"
#elif defined(ANDROID)
#elif defined(ANDROID) || defined(__BLACKBERRY_QNX__)
#include "../../gfx/image.c"
#include "../../gfx/rpng/rpng.c"
#endif
@ -194,11 +194,11 @@ FONTS
#if defined(HAVE_OPENGL) || defined(HAVE_D3D8) || defined(HAVE_D3D9)
#ifdef HAVE_FREETYPE
#if defined(HAVE_FREETYPE)
#include "../../gfx/fonts/freetype.c"
#endif
#ifndef DONT_HAVE_BITMAPFONTS
#if !defined(DONT_HAVE_BITMAPFONTS)
#include "../../gfx/fonts/fonts.c"
#include "../../gfx/fonts/bitmapfont.c"
#endif
@ -315,6 +315,10 @@ AUDIO
#include "../../audio/opensl.c"
#endif
#ifdef HAVE_AL
#include "../../audio/openal.c"
#endif
#if defined(HAVE_NULLAUDIO)
#include "../../audio/null.c"
#endif
@ -377,10 +381,16 @@ MAIN
#include "../../frontend/frontend_xenon.c"
#elif defined(RARCH_CONSOLE) || defined(PSP)
#include "../../frontend/frontend_console.c"
#elif defined(__BLACKBERRY_QNX__)
#include "../../frontend/frontend_bbqnx.c"
#elif defined(ANDROID)
#include "../../frontend/frontend_android.c"
#endif
#ifndef ANDROID
#include "../../frontend/frontend.c"
#endif
/*============================================================
RETROARCH
============================================================ */
@ -432,8 +442,8 @@ MENU
#if defined(_XBOX360)
#include "../../frontend/menu/rmenu_xui.cpp"
#elif defined(GEKKO)
#include "../../frontend/menu/rmenu_gx.c"
#elif defined(HAVE_RGUI)
#include "../../frontend/menu/rmenu_generic.c"
#endif
#endif

View File

@ -42,6 +42,7 @@
#ifdef HAVE_RMENU
#define context_rmenu_init_func() gl->ctx_driver->rmenu_init()
#define context_rmenu_frame_func(ctx) gl->ctx_driver->rmenu_frame(ctx)
#define context_rmenu_free_func() gl->ctx_driver->rmenu_free()
#endif
#ifdef HAVE_EGL

View File

@ -17,34 +17,6 @@
#ifndef CONSOLE_EXT_H__
#define CONSOLE_EXT_H__
#define EXT_IMAGES "png|PNG|jpg|JPG|JPEG|jpeg"
#define EXT_SHADERS "cg|CG"
#define EXT_CGP_PRESETS "cgp|CGP"
#define EXT_INPUT_PRESETS "cfg|CFG"
enum {
MENU_ITEM_LOAD_STATE = 0,
MENU_ITEM_SAVE_STATE,
MENU_ITEM_KEEP_ASPECT_RATIO,
MENU_ITEM_OVERSCAN_AMOUNT,
MENU_ITEM_ORIENTATION,
#ifdef HAVE_FBO
MENU_ITEM_SCALE_FACTOR,
#endif
MENU_ITEM_RESIZE_MODE,
MENU_ITEM_FRAME_ADVANCE,
MENU_ITEM_SCREENSHOT_MODE,
MENU_ITEM_RESET,
MENU_ITEM_RETURN_TO_GAME,
MENU_ITEM_RETURN_TO_MENU,
MENU_ITEM_CHANGE_LIBRETRO,
#ifdef HAVE_MULTIMAN
MENU_ITEM_RETURN_TO_MULTIMAN,
#endif
MENU_ITEM_QUIT_RARCH,
MENU_ITEM_LAST
};
enum
{
SOUND_MODE_NORMAL,

View File

@ -20,6 +20,7 @@
#include <string.h>
#include "../boolean.h"
#include "../general.h"
#include "rarch_console_input.h"
struct platform_bind

View File

@ -1,88 +0,0 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2013 - Hans-Kristian Arntzen
* Copyright (C) 2011-2013 - Daniel De Matteis
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include "../general.h"
#include "rarch_console_video.h"
struct aspect_ratio_elem aspectratio_lut[ASPECT_RATIO_END] = {
{ "1:1", 1.0f },
{ "2:1", 2.0f },
{ "3:2", 1.5f },
{ "3:4", 0.75f },
{ "4:1", 4.0f },
{ "4:3", 1.3333f },
{ "4:4", 1.0f },
{ "5:4", 1.25f },
{ "6:5", 1.2f },
{ "7:9", 0.7777f },
{ "8:3", 2.6666f },
{ "8:7", 1.1428f },
{ "16:9", 1.7778f },
{ "16:10", 1.6f },
{ "16:15", 3.2f },
{ "19:12", 1.5833f },
{ "19:14", 1.3571f },
{ "30:17", 1.7647f },
{ "32:9", 3.5555f },
{ "Auto", 1.0f },
{ "Core Provided", 1.0f },
{ "Custom", 0.0f }
};
char rotation_lut[ASPECT_RATIO_END][32] =
{
"Normal",
"Vertical",
"Flipped",
"Flipped Rotated"
};
void rarch_set_auto_viewport(unsigned width, unsigned height)
{
if(width == 0 || height == 0)
return;
unsigned aspect_x, aspect_y, len, highest, i;
len = width < height ? width : height;
highest = 1;
for (i = 1; i < len; i++)
{
if ((width % i) == 0 && (height % i) == 0)
highest = i;
}
aspect_x = width / highest;
aspect_y = height / highest;
snprintf(aspectratio_lut[ASPECT_RATIO_AUTO].name, sizeof(aspectratio_lut[ASPECT_RATIO_AUTO].name), "%d:%d (Auto)", aspect_x, aspect_y);
aspectratio_lut[ASPECT_RATIO_AUTO].value = (float) aspect_x / aspect_y;
}
void rarch_set_core_viewport(void)
{
if (!g_extern.main_is_init)
return;
// fallback to 1:1 pixel ratio if none provided
if (g_extern.system.av_info.geometry.aspect_ratio == 0.0)
aspectratio_lut[ASPECT_RATIO_CORE].value = (float) g_extern.system.av_info.geometry.base_width / g_extern.system.av_info.geometry.base_height;
else
aspectratio_lut[ASPECT_RATIO_CORE].value = g_extern.system.av_info.geometry.aspect_ratio;
}

View File

@ -1,103 +0,0 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2013 - Hans-Kristian Arntzen
* Copyright (C) 2011-2013 - Daniel De Matteis
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef RARCH_CONSOLE_VIDEO_H__
#define RARCH_CONSOLE_VIDEO_H__
#define MIN_SCALING_FACTOR (1.0f)
#if defined(__CELLOS_LV2__)
#define MAX_SCALING_FACTOR (5.0f)
#else
#define MAX_SCALING_FACTOR (2.0f)
#endif
enum
{
FBO_DEINIT = 0,
FBO_INIT,
FBO_REINIT
};
enum aspect_ratio
{
ASPECT_RATIO_1_1 = 0,
ASPECT_RATIO_2_1,
ASPECT_RATIO_3_2,
ASPECT_RATIO_3_4,
ASPECT_RATIO_4_1,
ASPECT_RATIO_4_3,
ASPECT_RATIO_4_4,
ASPECT_RATIO_5_4,
ASPECT_RATIO_6_5,
ASPECT_RATIO_7_9,
ASPECT_RATIO_8_3,
ASPECT_RATIO_8_7,
ASPECT_RATIO_16_9,
ASPECT_RATIO_16_10,
ASPECT_RATIO_16_15,
ASPECT_RATIO_19_12,
ASPECT_RATIO_19_14,
ASPECT_RATIO_30_17,
ASPECT_RATIO_32_9,
ASPECT_RATIO_AUTO,
ASPECT_RATIO_CORE,
ASPECT_RATIO_CUSTOM,
ASPECT_RATIO_END,
};
#define LAST_ASPECT_RATIO ASPECT_RATIO_CUSTOM
enum rotation
{
ORIENTATION_NORMAL = 0,
ORIENTATION_VERTICAL,
ORIENTATION_FLIPPED,
ORIENTATION_FLIPPED_ROTATED,
ORIENTATION_END
};
#define LAST_ORIENTATION (ORIENTATION_END-1)
extern char rotation_lut[ASPECT_RATIO_END][32];
/* ABGR color format defines */
#define WHITE 0xffffffffu
#define RED 0xff0000ffu
#define GREEN 0xff00ff00u
#define BLUE 0xffff0000u
#define YELLOW 0xff00ffffu
#define PURPLE 0xffff00ffu
#define CYAN 0xffffff00u
#define ORANGE 0xff0063ffu
#define SILVER 0xff8c848cu
#define LIGHTBLUE 0xFFFFE0E0U
#define LIGHTORANGE 0xFFE0EEFFu
struct aspect_ratio_elem
{
char name[64];
float value;
};
extern struct aspect_ratio_elem aspectratio_lut[ASPECT_RATIO_END];
extern void rarch_set_auto_viewport(unsigned width, unsigned height);
extern void rarch_set_core_viewport(void);
#endif

View File

@ -10,27 +10,17 @@ extern "C" {
#endif
#ifndef MSVC
// MAX that works with side effects. Just in case.
#define MAX(A,B) ({ \
__typeof__(A) At=(A); \
__typeof__(B) Bt=(B); \
At>Bt?At:Bt; })
#define MIN(A,B) ({ \
__typeof__(A) At=(A); \
__typeof__(B) Bt=(B); \
At<Bt?At:Bt; })
#define RGL_LIKELY(COND) __builtin_expect((COND),1)
#define RGL_UNLIKELY(COND) __builtin_expect((COND),0)
#else
#define MAX(A,B) ((A)>(B)?(A):(B))
#define MIN(A,B) ((A)<(B)?(A):(B))
#define RGL_LIKELY(COND) (COND)
#define RGL_UNLIKELY(COND) (COND)
#endif
#define MAX(A,B) ((A)>(B)?(A):(B))
#define MIN(A,B) ((A)<(B)?(A):(B))
#define _RGL_FLOAT_AS_UINT(x) ({union {float f; unsigned int i;} u; u.f=(x); u.i;})
static inline float rglClampf( const float value )

View File

@ -7049,9 +7049,7 @@ static unsigned int stringTableAddUnique( std::vector<char> &stringTable, const
return ret;
}
template<class Type> static size_t array_size(std::vector<Type> &array);
template<class Type> static void array_push(char* &parameterOffset, std::vector<Type> &array);
inline static uint32_t swap16(const uint32_t v);
static unsigned short getFlags(CGenum var, CGenum dir, int no, bool is_referenced, bool is_shared, int paramIndex);
//////////////////////////////////////////////////////////////////////////////
@ -7091,6 +7089,11 @@ int convertNvToElfFromFile(const char *sourceFile, int endianness, int constTabl
return -1;
}
static inline uint32_t swap16(const uint32_t v)
{
return (v>>16) | (v<<16);
}
int convertNvToElfFromMemory(const void *sourceData, size_t size, int endianness, int constTableOffset, void **binaryShader, int *binarySize,
std::vector<char> &stringTable, std::vector<float> &defaultValues)
{
@ -7201,7 +7204,8 @@ int convertNvToElfFromMemory(const void *sourceData, size_t size, int endianness
{
int size = (int)nvbr->ucode_size()/sizeof(uint32_t);
buffer = new uint32_t[size];
for (int i=0;i<size;i++)
for (int i = 0; i < size; i++)
{
uint32_t val = ENDSWAP(tmp[i]);
if (!bIsVertexProgram)
@ -7217,10 +7221,9 @@ int convertNvToElfFromMemory(const void *sourceData, size_t size, int endianness
// that manifests as a memory overwrite in properly allocated memory during a std::vector resize
int size = (int)nvbr->ucode_size()/sizeof(uint32_t);
buffer = new uint32_t[size];
for (int i=0;i<size;i++)
{
for (int i = 0; i < size; i++)
buffer[i] = tmp[i];
}
ucode = (const char*)buffer;
// end workaround
}
@ -7785,12 +7788,12 @@ int convertNvToElfFromMemory(const void *sourceData, size_t size, int endianness
//fill the parameter section
size_t parameterTableSize = sizeof(CgParameterTableHeader);
parameterTableSize += array_size(parameterEntries);
parameterTableSize += array_size(parameterResources);
parameterTableSize += array_size(containers._resources);
//parameterTableSize += array_size(containers._defaultValuesIndices);
parameterTableSize += array_size(containers._elfDefaultsIndices);
parameterTableSize += array_size(containers._semanticIndices);
parameterTableSize += (unsigned int)parameterEntries.size() * sizeof(parameterEntries[0]);
parameterTableSize += (unsigned int)parameterResources.size() * sizeof(parameterResources[0]);
parameterTableSize += (unsigned int)containers._resources.size() * sizeof(containers._resources[0]);
//parameterTableSize += (unsigned int)containers._defaultValuesIndices.size() * sizeof(containers._defaultValuesIndices[0]);
parameterTableSize += (unsigned int)containers._elfDefaultsIndices.size() * sizeof(containers._elfDefaultsIndices[0]);
parameterTableSize += (unsigned int)containers._semanticIndices.size() * sizeof(containers._semanticIndices[0]);
//Allocate the binary file
int ucodeOffset = (((sizeof(CgProgramHeader)-1)/16)+1)*16;
@ -8185,10 +8188,8 @@ static int getSizeofSubArray(_CGNVCONTAINERS &containers, int dimensionIndex, in
unsigned char elfEndianness = endianness; //used in the macro CNVEND
int res = 1;
int i;
for (i=0;i<dimensionCount;i++)
{
for ( i=0; i < dimensionCount; i++)
res *= (int)CNV2END(containers._dimensions[dimensionIndex + i]);
}
return res;
}
@ -8209,11 +8210,6 @@ _constTable.push_back(*(_float4*)value);
return constTableSize;
}*/
template<class Type> static size_t array_size(std::vector<Type> &array)
{
return (unsigned int)array.size()*sizeof(array[0]);
}
template<class Type> static void array_push(char* &parameterOffset, std::vector<Type> &array)
{
size_t dataSize = array.size()*sizeof(array[0]);
@ -8221,10 +8217,6 @@ template<class Type> static void array_push(char* &parameterOffset, std::vector<
parameterOffset += dataSize;
}
uint32_t inline static swap16(const uint32_t v)
{
return (v>>16) | (v<<16);
}
unsigned short getFlags(CGenum var, CGenum dir, int no, bool is_referenced, bool is_shared, int paramIndex)
{

View File

@ -73,7 +73,7 @@ When loading a rom from stdin, the path must be a full path, however.
If a config cannot be found when using directory path, the default config path will be used instead.
.IP
Unix-like systems will look in $XDG_CONFIG_HOME/retroarch/retroarch.cfg first. Then it will try $HOME/.retroarch.cfg. Last, it will try /etc/retroarch.cfg. If no configuration is found, default settings will be assumed. A configuration file does not need to define every possible option, only those that should be overridden.
Unix-like systems will look in $XDG_CONFIG_HOME/retroarch/retroarch.cfg first. If $XDG_CONFIG_HOME is not defined, it is assumed to be $HOME/.config as per specification. Then it will try $HOME/.retroarch.cfg. Last, it will try /etc/retroarch.cfg. If no configuration is found, default settings will be assumed. A configuration file does not need to define every possible option, only those that should be overridden.
.IP
Windows will look in retroarch.cfg in same folder where retroarch.exe resides.

View File

@ -18,17 +18,17 @@
#ifndef _RARCH_DRIVER_FUNCS_H
#define _RARCH_DRIVER_FUNCS_H
#if !defined(HAVE_GRIFFIN) || defined(ANDROID) /* Normal */
#define audio_init_func(device, rate, latency) driver.audio->init(device, rate, latency)
#define audio_write_func(buf, size) driver.audio->write(driver.audio_data, buf, size)
#define audio_stop_func() driver.audio->stop(driver.audio_data)
#define audio_start_func() driver.audio->start(driver.audio_data)
#define audio_set_nonblock_state_func(state) driver.audio->set_nonblock_state(driver.audio_data, state)
#define audio_free_func() driver.audio->free(driver.audio_data)
#define audio_use_float_func() driver.audio->use_float(driver.audio_data)
#define audio_write_avail_func() driver.audio->write_avail(driver.audio_data)
#define audio_buffer_size_func() driver.audio->buffer_size(driver.audio_data)
#define audio_init_func(device, rate, latency) driver.audio->init(device, rate, latency)
#define audio_write_func(buf, size) driver.audio->write(driver.audio_data, buf, size)
#define audio_stop_func() driver.audio->stop(driver.audio_data)
#define audio_start_func() driver.audio->start(driver.audio_data)
#define audio_set_nonblock_state_func(state) driver.audio->set_nonblock_state(driver.audio_data, state)
#define audio_free_func() driver.audio->free(driver.audio_data)
#define audio_use_float_func() driver.audio->use_float(driver.audio_data)
#define audio_write_avail_func() driver.audio->write_avail(driver.audio_data)
#define audio_buffer_size_func() driver.audio->buffer_size(driver.audio_data)
#if !defined(RARCH_CONSOLE) /* Normal */
#define video_init_func(video_info, input, input_data) \
driver.video->init(video_info, input, input_data)
@ -45,7 +45,13 @@
#define video_overlay_interface_func(iface) driver.video->overlay_interface(driver.video_data, iface)
#define video_free_func() driver.video->free(driver.video_data)
#define input_init_func() driver.input->init()
#ifdef HAVE_ASYNC_POLL
#define input_async_poll_func() driver.input->poll(driver.input_data)
#define input_poll_func()
#else
#define input_poll_func() driver.input->poll(driver.input_data)
#define input_async_poll_func()
#endif
#define input_input_state_func(retro_keybinds, port, device, index, id) \
driver.input->input_state(driver.input_data, retro_keybinds, port, device, index, id)
#define input_free_func() driver.input->free(driver.input_data)
@ -69,34 +75,8 @@ static inline bool input_key_pressed_func(int key)
return ret;
}
#else /* for Griffin */
#if !defined(HAVE_RSOUND) && defined(HAVE_SL)
#define audio_init_func(device, rate, latency) sl_init(device, rate, latency)
#define audio_write_func(buf, size) sl_write(driver.audio_data, buf, size)
#define audio_stop_func() sl_stop(driver.audio_data)
#define audio_start_func() sl_start(driver.audio_data)
#define audio_set_nonblock_state_func(state) sl_set_nonblock_state(driver.audio_data, state)
#define audio_free_func() sl_free(driver.audio_data)
#define audio_use_float_func() driver.audio->use_float(driver.audio_data)
#define audio_write_avail_func() sl_write_avail(driver.audio_data)
#define audio_buffer_size_func() (BUFFER_SIZE * ((sl_t*)driver.audio_data)->buf_count)
#else
#define audio_init_func(device, rate, latency) driver.audio->init(device, rate, latency)
#define audio_write_func(buf, size) driver.audio->write(driver.audio_data, buf, size)
#define audio_stop_func() driver.audio->stop(driver.audio_data)
#define audio_start_func() driver.audio->start(driver.audio_data)
#define audio_set_nonblock_state_func(state) driver.audio->set_nonblock_state(driver.audio_data, state)
#define audio_free_func() driver.audio->free(driver.audio_data)
#define audio_use_float_func() driver.audio->use_float(driver.audio_data)
#define audio_write_avail_func() driver.audio->write_avail(driver.audio_data)
#define audio_buffer_size_func() driver.audio->buffer_size(driver.audio_data)
#endif
/*============================================================
VIDEO
============================================================ */
@ -175,6 +155,7 @@ static inline bool input_key_pressed_func(int key)
#define gfx_ctx_window_has_focus() (true)
#define input_init_func() MAKENAME_INPUT(_input_init)()
#define input_async_poll_func()
#define input_poll_func() MAKENAME_INPUT(_input_poll)(driver.input_data)
#define input_input_state_func(retro_keybinds, port, device, index, id) \
MAKENAME_INPUT(_input_state)(driver.input_data, retro_keybinds, port, device, index, id)

View File

@ -22,7 +22,7 @@
#include "compat/strl.h"
#include "compat/posix_string.h"
#if defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
#if defined(__CELLOS_LV2__) && !defined(__PSL1GHT__) || defined(__BLACKBERRY_QNX__)
#include <unistd.h> //stat() is defined here
#define S_ISDIR(x) (x & CELL_FS_S_IFDIR)
#endif

46
frontend/frontend.c Normal file
View File

@ -0,0 +1,46 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2013 - Hans-Kristian Arntzen
* Copyright (C) 2011-2013 - Daniel De Matteis
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "../general.h"
#ifdef __APPLE__
#include "SDL.h"
// OSX seems to really need -lSDLmain,
// so we include SDL.h here so it can hack our main.
// We want to use -mconsole in Win32, so we need main().
#endif
int main(int argc, char *argv[])
{
#ifdef HAVE_RARCH_MAIN_IMPLEMENTATION
// Consoles use the higher level API.
return rarch_main(argc, argv);
#else
int init_ret;
if ((init_ret = rarch_main_init(argc, argv))) return init_ret;
rarch_init_msg_queue();
while ((g_extern.is_paused && !g_extern.is_oneshot) ? rarch_main_idle_iterate() : rarch_main_iterate());
rarch_main_deinit();
rarch_deinit_msg_queue();
#ifdef PERF_TEST
rarch_perf_log();
#endif
rarch_main_clear_state();
return 0;
#endif
}

View File

@ -19,13 +19,13 @@
#include <unistd.h>
#include <string.h>
#include <sys/resource.h>
#include <byteswap.h>
#include "frontend_android.h"
#include "../android/native/jni/jni_macros.h"
#include "../general.h"
#include "../performance.h"
#include "../driver.h"
#include "menu/rmenu.h"
#include "../config.def.h"
@ -58,149 +58,14 @@ static void print_cur_config (void *data)
AConfiguration_getUiModeNight(android_app->config));
}
/**
* Process the next main command.
*/
void engine_handle_cmd (void *data, int32_t cmd)
{
struct android_app *android_app = (struct android_app*)data;
switch (cmd)
{
case APP_CMD_INPUT_CHANGED:
RARCH_LOG("APP_CMD_INPUT_CHANGED\n");
pthread_mutex_lock(&android_app->mutex);
if (android_app->inputQueue != NULL)
AInputQueue_detachLooper(android_app->inputQueue);
android_app->inputQueue = android_app->pendingInputQueue;
if (android_app->inputQueue != NULL)
{
RARCH_LOG("Attaching input queue to looper");
AInputQueue_attachLooper(android_app->inputQueue,
android_app->looper, LOOPER_ID_INPUT, NULL,
NULL);
}
pthread_cond_broadcast(&android_app->cond);
pthread_mutex_unlock(&android_app->mutex);
break;
case APP_CMD_INIT_WINDOW:
RARCH_LOG("engine_handle_cmd: APP_CMD_INIT_WINDOW.\n");
pthread_mutex_lock(&android_app->mutex);
android_app->window = android_app->pendingWindow;
pthread_cond_broadcast(&android_app->cond);
pthread_mutex_unlock(&android_app->mutex);
break;
case APP_CMD_RESUME:
RARCH_LOG("engine_handle_cmd: APP_CMD_RESUME.\n");
pthread_mutex_lock(&android_app->mutex);
android_app->activityState = cmd;
pthread_cond_broadcast(&android_app->cond);
pthread_mutex_unlock(&android_app->mutex);
break;
case APP_CMD_START:
RARCH_LOG("engine_handle_cmd: APP_CMD_START.\n");
pthread_mutex_lock(&android_app->mutex);
android_app->activityState = cmd;
pthread_cond_broadcast(&android_app->cond);
pthread_mutex_unlock(&android_app->mutex);
break;
case APP_CMD_PAUSE:
RARCH_LOG("engine_handle_cmd: APP_CMD_PAUSE.\n");
pthread_mutex_lock(&android_app->mutex);
android_app->activityState = cmd;
pthread_cond_broadcast(&android_app->cond);
pthread_mutex_unlock(&android_app->mutex);
if (!(g_extern.lifecycle_state & (1ULL << RARCH_QUIT_KEY)))
{
RARCH_LOG("Pausing RetroArch.\n");
g_extern.lifecycle_state |= (1ULL << RARCH_PAUSE_TOGGLE);
}
break;
case APP_CMD_STOP:
RARCH_LOG("engine_handle_cmd: APP_CMD_STOP.\n");
pthread_mutex_lock(&android_app->mutex);
android_app->activityState = cmd;
pthread_cond_broadcast(&android_app->cond);
pthread_mutex_unlock(&android_app->mutex);
break;
case APP_CMD_CONFIG_CHANGED:
RARCH_LOG("engine_handle_cmd: APP_CMD_CONFIG_CHANGED.\n");
break;
case APP_CMD_TERM_WINDOW:
RARCH_LOG("engine_handle_cmd: APP_CMD_TERM_WINDOW.\n");
pthread_mutex_lock(&android_app->mutex);
/* The window is being hidden or closed, clean it up. */
/* terminate display/EGL context here */
if (g_extern.lifecycle_state & (1ULL << RARCH_PAUSE_TOGGLE))
uninit_drivers();
else
RARCH_WARN("Window is terminated outside PAUSED state.\n");
android_app->window = NULL;
pthread_cond_broadcast(&android_app->cond);
pthread_mutex_unlock(&android_app->mutex);
break;
case APP_CMD_GAINED_FOCUS:
RARCH_LOG("engine_handle_cmd: APP_CMD_GAINED_FOCUS.\n");
g_extern.lifecycle_state &= ~(1ULL << RARCH_PAUSE_TOGGLE);
break;
case APP_CMD_LOST_FOCUS:
RARCH_LOG("engine_handle_cmd: APP_CMD_LOST_FOCUS.\n");
break;
case APP_CMD_DESTROY:
RARCH_LOG("engine_handle_cmd: APP_CMD_DESTROY\n");
g_extern.lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
break;
}
}
#define MAX_ARGS 32
static bool android_run_events (void *data)
{
struct android_app *android_app = (struct android_app*)data;
int id = ALooper_pollOnce(-1, NULL, NULL, NULL);
if (id == LOOPER_ID_MAIN)
{
int8_t cmd;
if (read(android_app->msgread, &cmd, sizeof(cmd)) != sizeof(cmd))
cmd = -1;
engine_handle_cmd(android_app, cmd);
if (cmd == APP_CMD_INIT_WINDOW)
{
if (g_extern.lifecycle_state & (1ULL << RARCH_PAUSE_TOGGLE))
init_drivers();
}
}
engine_handle_cmd();
// Check if we are exiting.
if (g_extern.lifecycle_state & (1ULL << RARCH_QUIT_KEY))
@ -281,12 +146,6 @@ static bool android_app_start_main(struct android_app *android_app, int *init_re
strlcpy(out_args.in, "IME", sizeof(out_args.in));
jni_get(&in_params, &out_args);
// Return value file
out_args.out = android_app->return_file;
out_args.out_sizeof = sizeof(android_app->return_file);
strlcpy(out_args.in, "RETURN", sizeof(out_args.in));
jni_get(&in_params, &out_args);
(*in_params.java_vm)->DetachCurrentThread(in_params.java_vm);
RARCH_LOG("Checking arguments passed ...\n");
@ -294,9 +153,6 @@ static bool android_app_start_main(struct android_app *android_app, int *init_re
RARCH_LOG("Libretro path: [%s].\n", libretro_path);
RARCH_LOG("Config file: [%s].\n", config_file);
RARCH_LOG("Current IME: [%s].\n", android_app->current_ime);
RARCH_LOG("Return file: [%s].\n", android_app->return_file);
unlink(android_app->return_file);
struct rarch_main_wrap args = {0};
@ -357,21 +213,47 @@ static void *android_app_entry(void *data)
if (!android_app_start_main(android_app, &init_ret))
goto exit;
if (g_extern.main_is_init)
menu_init();
g_extern.lifecycle_mode_state |= (1ULL << MODE_GAME);
begin_loop:
if(g_extern.lifecycle_mode_state & (1ULL << MODE_GAME))
{
RARCH_LOG("RetroArch started.\n");
driver.input->poll(NULL);
driver.video->set_aspect_ratio(driver.video_data, g_settings.video.aspect_ratio_idx);
while ((input_key_pressed_func(RARCH_PAUSE_TOGGLE)) ?
android_run_events(android_app) :
rarch_main_iterate());
if (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_THROTTLE_ENABLE))
audio_start_func();
RARCH_LOG("RetroArch stopped.\n");
// Main loop
do
{
input_async_poll_func();
} while (rarch_main_iterate());
if (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_THROTTLE_ENABLE))
audio_stop_func();
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_GAME);
}
else if(g_extern.lifecycle_mode_state & (1ULL << MODE_MENU))
{
g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU_PREINIT);
while((input_key_pressed_func(RARCH_PAUSE_TOGGLE)) ?
android_run_events(android_app) :
rmenu_iterate());
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_MENU);
}
else
goto exit;
goto begin_loop;
exit:
android_app->activityState = APP_CMD_DEAD;
RARCH_LOG("Deinitializing RetroArch...\n");
menu_free();
if (g_extern.main_is_init)
rarch_main_deinit();
@ -381,19 +263,6 @@ exit:
#endif
rarch_main_clear_state();
int bs_return = bswap_32(init_ret);
FILE *return_file = fopen(android_app->return_file, "w");
if (return_file)
{
fwrite(&bs_return, 4, 1, return_file);
fclose(return_file);
}
// returning from the native activity too fast can make the Java frontend not reappear
// work around it only if we fail to load the ROM
if (init_ret != 0)
usleep(1000000);
RARCH_LOG("android_app_destroy!");
if (android_app->inputQueue != NULL)
AInputQueue_detachLooper(android_app->inputQueue);

View File

@ -49,7 +49,6 @@ struct android_app
AInputQueue* pendingInputQueue;
ANativeWindow* pendingWindow;
char current_ime[PATH_MAX];
char return_file[PATH_MAX];
};
enum {
@ -155,8 +154,8 @@ enum {
};
int8_t android_app_read_cmd (void *data);
extern void engine_app_read_cmd (void *data);
extern void engine_handle_cmd (void *data, int32_t cmd);
extern void engine_app_read_cmd(void);
extern void engine_handle_cmd(void);
extern struct android_app *g_android;

92
frontend/frontend_bbqnx.c Normal file
View File

@ -0,0 +1,92 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2013 - Hans-Kristian Arntzen
* Copyright (C) 2011-2013 - Daniel De Matteis
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <screen/screen.h>
#include <bps/navigator.h>
#include <bps/screen.h>
#include <bps/bps.h>
#include <bps/event.h>
#include "../playbook/src/bbutil.h"
screen_context_t screen_ctx;
int rarch_main(int argc, char *argv[])
{
//Initialize bps
bps_initialize();
RARCH_LOG("Initializing screen context\n");
// Create a screen context that will be used to create an EGL surface to receive libscreen events
screen_create_context(&screen_ctx, 0);
if (screen_request_events(screen_ctx) != BPS_SUCCESS)
{
RARCH_ERR("screen_request_events failed.\n");
goto error;
}
if (navigator_request_events(0) != BPS_SUCCESS)
{
RARCH_ERR("navigator_request_events failed.\n");
goto error;
}
if (navigator_rotation_lock(false) != BPS_SUCCESS)
{
RARCH_ERR("navigator_location_lock failed.\n");
goto error;
}
rarch_main_clear_state();
g_extern.verbose = true;
int init_ret;
struct rarch_main_wrap args = {0};
args.verbose = g_extern.verbose;
args.sram_path = NULL;
args.state_path = NULL;
args.rom_path = "/accounts/1000/shared/documents/roms/test.rom";
args.libretro_path = "/accounts/1000/appdata/com.RetroArch.testDev_m_RetroArch181dafc7/app/native/lib/test.so";
args.config_path = "/accounts/1000/appdata/com.RetroArch.testDev_m_RetroArch181dafc7/app/native/retroarch.cfg";
if ((init_ret = rarch_main_init_wrap(&args)))
{
return init_ret;
}
rarch_init_msg_queue();
while ((g_extern.is_paused && !g_extern.is_oneshot) ? rarch_main_idle_iterate() : rarch_main_iterate());
rarch_main_deinit();
rarch_deinit_msg_queue();
#ifdef PERF_TEST
rarch_perf_log();
#endif
error:
screen_stop_events(screen_ctx);
bps_shutdown();
return 0;
}

View File

@ -219,7 +219,7 @@ static void uninit_console_drivers(void)
}
}
int main(int argc, char *argv[])
int rarch_main(int argc, char *argv[])
{
system_init();

View File

@ -22,7 +22,7 @@
#include "rgui.h"
#include "utils/file_list.h"
#include "rmenu_settings.h"
#include "../../console/rarch_console_video.h"
#include "../../gfx/gfx_common.h"
#include "../../screenshot.h"
#define TERM_START_X 15
@ -116,6 +116,13 @@ unsigned rgui_gx_resolutions[GX_RESOLUTIONS_LAST][2] = {
};
unsigned rgui_current_gx_resolution = GX_RESOLUTIONS_640_480;
static const char *rgui_device_labels[] = {
"GameCube Controller",
"Wiimote",
"Wiimote + Nunchuk",
"Classic Controller",
};
#endif
unsigned RGUI_WIDTH = 320;
@ -136,18 +143,12 @@ struct rgui_handle
bool msg_force;
char path_buf[PATH_MAX];
char base_path[PATH_MAX];
const uint8_t *font;
bool alloc_font;
};
static const char *rgui_device_labels[] = {
"GameCube Controller",
"Wiimote",
"Wiimote + Nunchuk",
"Classic Controller",
};
static const unsigned rgui_controller_lut[] = {
RETRO_DEVICE_ID_JOYPAD_UP,
RETRO_DEVICE_ID_JOYPAD_DOWN,
@ -177,7 +178,7 @@ static inline bool rgui_is_viewport_menu(rgui_file_type_t menu_type)
return (menu_type == RGUI_SETTINGS_CUSTOM_VIEWPORT || menu_type == RGUI_SETTINGS_CUSTOM_VIEWPORT_2);
}
static void copy_glyph(uint8_t *glyph, const uint8_t *buf)
static void rgui_copy_glyph(uint8_t *glyph, const uint8_t *buf)
{
for (int y = 0; y < FONT_HEIGHT; y++)
{
@ -205,7 +206,7 @@ static void init_font(rgui_handle_t *rgui, const uint8_t *font_bmp_buf)
{
unsigned y = i / 16;
unsigned x = i % 16;
copy_glyph(&font[FONT_OFFSET(i)],
rgui_copy_glyph(&font[FONT_OFFSET(i)],
font_bmp_buf + 54 + 3 * (256 * (255 - 16 * y) + 16 * x));
}
@ -221,13 +222,17 @@ rgui_handle_t *rgui_init(const char *base_path,
rgui->frame_buf = framebuf;
rgui->frame_buf_pitch = framebuf_pitch;
rgui->folder_cb = folder_cb;
rgui->userdata = userdata;
strlcpy(rgui->base_path, base_path, sizeof(rgui->base_path));
rgui->path_stack = rgui_list_new();
rgui->folder_buf = rgui_list_new();
#ifdef RARCH_CONSOLE
rgui_list_push(rgui->path_stack, base_path, RGUI_FILE_DIRECTORY, 0);
#else
rgui_list_push(rgui->path_stack, base_path, RGUI_SETTINGS, 0);
#endif
if (font_bmp_buf)
init_font(rgui, font_bmp_buf);
@ -257,7 +262,11 @@ static uint16_t gray_filler(unsigned x, unsigned y)
x >>= 1;
y >>= 1;
unsigned col = ((x + y) & 1) + 1;
#ifdef GEKKO
return (6 << 12) | (col << 8) | (col << 4) | (col << 0);
#else
return (col << 13) | (col << 9) | (col << 5) | (12 << 0);
#endif
}
static uint16_t green_filler(unsigned x, unsigned y)
@ -265,7 +274,11 @@ static uint16_t green_filler(unsigned x, unsigned y)
x >>= 1;
y >>= 1;
unsigned col = ((x + y) & 1) + 1;
#ifdef GEKKO
return (6 << 12) | (col << 8) | (col << 5) | (col << 0);
#else
return (col << 13) | (col << 10) | (col << 5) | (12 << 0);
#endif
}
static void fill_rect(uint16_t *buf, unsigned pitch,
@ -293,7 +306,11 @@ static void blit_line(rgui_handle_t *rgui,
if (col)
rgui->frame_buf[(y + j) * (rgui->frame_buf_pitch >> 1) + (x + i)] = green ?
#ifdef GEKKO
(3 << 0) | (10 << 4) | (3 << 8) | (7 << 12) : 0x7FFF;
#else
(15 << 0) | (7 << 4) | (15 << 8) | (7 << 12) : 0xFFFF;
#endif
}
}
@ -406,7 +423,9 @@ static void render_text(rgui_handle_t *rgui)
char message[TERM_WIDTH + 1];
char type_str[TERM_WIDTH + 1];
int w = rgui_is_controller_menu(menu_type) ? 26 : 19;
#ifdef RARCH_CONSOLE
unsigned port = menu_type - RGUI_SETTINGS_CONTROLLER_1;
#endif
switch (type)
{
case RGUI_FILE_PLAIN:
@ -483,6 +502,7 @@ static void render_text(rgui_handle_t *rgui)
case RGUI_SETTINGS_DEBUG_TEXT:
snprintf(type_str, sizeof(type_str), (g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW)) ? "ON" : "OFF");
break;
case RGUI_SETTINGS_OPEN_FILEBROWSER:
case RGUI_SETTINGS_CUSTOM_VIEWPORT:
#ifdef HAVE_LIBRETRO_MANAGEMENT
case RGUI_SETTINGS_CORE:
@ -493,9 +513,12 @@ static void render_text(rgui_handle_t *rgui)
case RGUI_SETTINGS_CONTROLLER_4:
snprintf(type_str, sizeof(type_str), "...");
break;
#ifdef GEKKO
case RGUI_SETTINGS_BIND_DEVICE:
snprintf(type_str, sizeof(type_str), "%s", rgui_device_labels[g_settings.input.device[port]]);
break;
#endif
#ifdef RARCH_CONSOLE
case RGUI_SETTINGS_BIND_DPAD_EMULATION:
snprintf(type_str, sizeof(type_str), "%s", rarch_dpad_emulation_name_lut[g_settings.input.dpad_emulation[port]]);
break;
@ -517,6 +540,7 @@ static void render_text(rgui_handle_t *rgui)
case RGUI_SETTINGS_BIND_R3:
snprintf(type_str, sizeof(type_str), "%s", rarch_input_find_platform_key_label(g_settings.input.binds[port][rgui_controller_lut[type - RGUI_SETTINGS_BIND_UP]].joykey));
break;
#endif
default:
type_str[0] = 0;
w = 0;
@ -547,8 +571,8 @@ static void render_text(rgui_handle_t *rgui)
blit_line(rgui, x, y, message, i == rgui->directory_ptr);
}
const char *message_queue;
#ifdef GEKKO
const char *message_queue;
gx_video_t *gx = (gx_video_t*)driver.video_data;
if (rgui->msg_force)
{
@ -559,10 +583,8 @@ static void render_text(rgui_handle_t *rgui)
{
message_queue = gx->msg;
}
#else
message_queue = msg_queue_pull(g_extern.msg_queue);
#endif
render_messagebox(rgui, message_queue);
#endif
}
#ifdef GEKKO
@ -573,7 +595,9 @@ static void render_text(rgui_handle_t *rgui)
static int rgui_settings_toggle_setting(rgui_file_type_t setting, rgui_action_t action, rgui_file_type_t menu_type)
{
unsigned port = menu_type - RGUI_SETTINGS_CONTROLLER_1;
#ifdef RARCH_CONSOLE
unsigned port = menu_type - RGUI_SETTINGS_CONTROLLER_1;
#endif
switch (setting)
{
@ -625,9 +649,15 @@ static int rgui_settings_toggle_setting(rgui_file_type_t setting, rgui_action_t
unsigned height = g_extern.frame_cache.height;
int pitch = g_extern.frame_cache.pitch;
#ifdef RARCH_CONSOLE
const char *screenshot_dir = default_paths.port_dir;
#else
const char *screenshot_dir = g_settings.screenshot_directory;
#endif
// Negative pitch is needed as screenshot takes bottom-up,
// but we use top-down.
bool r = screenshot_dump(default_paths.port_dir,
bool r = screenshot_dump(screenshot_dir,
data + (height - 1) * (pitch >> 1),
width, height, -pitch, false);
@ -838,6 +868,7 @@ static int rgui_settings_toggle_setting(rgui_file_type_t setting, rgui_action_t
}
break;
// controllers
#ifdef GEKKO
case RGUI_SETTINGS_BIND_DEVICE:
g_settings.input.device[port] += RARCH_DEVICE_LAST;
if (action == RGUI_ACTION_START)
@ -851,6 +882,8 @@ static int rgui_settings_toggle_setting(rgui_file_type_t setting, rgui_action_t
rarch_input_set_default_keybinds(port);
driver.input->set_analog_dpad_mapping(g_settings.input.device[port], g_settings.input.dpad_emulation[port], port);
break;
#endif
#ifdef RARCH_CONSOLE
case RGUI_SETTINGS_BIND_DPAD_EMULATION:
g_settings.input.dpad_emulation[port] += DPAD_EMULATION_LAST;
if (action == RGUI_ACTION_START)
@ -892,6 +925,7 @@ static int rgui_settings_toggle_setting(rgui_file_type_t setting, rgui_action_t
rarch_input_set_keybind(port, keybind_action, rgui_controller_lut[setting - RGUI_SETTINGS_BIND_UP]);
}
#endif
default:
break;
}
@ -905,6 +939,7 @@ static void rgui_settings_populate_entries(rgui_handle_t *rgui)
{
rgui_list_clear(rgui->folder_buf);
#ifdef RARCH_CONSOLE
RGUI_MENU_ITEM("Rewind", RGUI_SETTINGS_REWIND_ENABLE);
RGUI_MENU_ITEM("Rewind granularity", RGUI_SETTINGS_REWIND_GRANULARITY);
if (g_extern.main_is_init)
@ -941,10 +976,25 @@ static void rgui_settings_populate_entries(rgui_handle_t *rgui)
RGUI_MENU_ITEM("Debug Text", RGUI_SETTINGS_DEBUG_TEXT);
RGUI_MENU_ITEM("Restart RetroArch", RGUI_SETTINGS_RESTART_EMULATOR);
RGUI_MENU_ITEM("Exit RetroArch", RGUI_SETTINGS_QUIT_EMULATOR);
#else
//RGUI_MENU_ITEM("Filebrowser", RGUI_SETTINGS_OPEN_FILEBROWSER);
RGUI_MENU_ITEM("Save State", RGUI_SETTINGS_SAVESTATE_SAVE);
RGUI_MENU_ITEM("Load State", RGUI_SETTINGS_SAVESTATE_LOAD);
RGUI_MENU_ITEM("Take Screenshot", RGUI_SETTINGS_SCREENSHOT);
RGUI_MENU_ITEM("Restart Game", RGUI_SETTINGS_RESTART_GAME);
RGUI_MENU_ITEM("Hardware filtering", RGUI_SETTINGS_VIDEO_FILTER);
RGUI_MENU_ITEM("Aspect Ratio", RGUI_SETTINGS_VIDEO_ASPECT_RATIO);
RGUI_MENU_ITEM("Rotation", RGUI_SETTINGS_VIDEO_ROTATION);
RGUI_MENU_ITEM("Mute Audio", RGUI_SETTINGS_AUDIO_MUTE);
RGUI_MENU_ITEM("Audio Control Rate", RGUI_SETTINGS_AUDIO_CONTROL_RATE);
RGUI_MENU_ITEM("Audio Resampler", RGUI_SETTINGS_RESAMPLER_TYPE);
RGUI_MENU_ITEM("Exit RetroArch", RGUI_SETTINGS_QUIT_EMULATOR);
#endif
}
static void rgui_settings_controller_populate_entries(rgui_handle_t *rgui)
{
#ifdef RARCH_CONSOLE
rgui_list_clear(rgui->folder_buf);
RGUI_MENU_ITEM("Device", RGUI_SETTINGS_BIND_DEVICE);
@ -965,10 +1015,10 @@ static void rgui_settings_controller_populate_entries(rgui_handle_t *rgui)
RGUI_MENU_ITEM("R2", RGUI_SETTINGS_BIND_R2);
RGUI_MENU_ITEM("L3", RGUI_SETTINGS_BIND_L3);
RGUI_MENU_ITEM("R3", RGUI_SETTINGS_BIND_R3);
#endif
}
int rgui_viewport_iterate(rgui_handle_t *rgui, rgui_action_t action)
static int rgui_viewport_iterate(rgui_handle_t *rgui, rgui_action_t action)
{
#ifdef GEKKO
gx_video_t *gx = (gx_video_t*)driver.video_data;
@ -1088,12 +1138,13 @@ int rgui_viewport_iterate(rgui_handle_t *rgui, rgui_action_t action)
return 0;
}
int rgui_settings_iterate(rgui_handle_t *rgui, rgui_action_t action)
static int rgui_settings_iterate(rgui_handle_t *rgui, rgui_action_t action)
{
rgui->frame_buf_pitch = RGUI_WIDTH * 2;
rgui_file_type_t type = 0;
const char *label = 0;
rgui_list_at(rgui->folder_buf, rgui->directory_ptr, &label, &type, NULL);
if (action != RGUI_ACTION_REFRESH)
rgui_list_at(rgui->folder_buf, rgui->directory_ptr, &label, &type, NULL);
#ifdef HAVE_LIBRETRO_MANAGEMENT
if (type == RGUI_SETTINGS_CORE)
label = default_paths.core_dir;
@ -1124,9 +1175,12 @@ int rgui_settings_iterate(rgui_handle_t *rgui, rgui_action_t action)
case RGUI_ACTION_CANCEL:
case RGUI_ACTION_SETTINGS:
rgui_list_pop(rgui->path_stack);
rgui->directory_ptr = directory_ptr;
rgui->need_refresh = true;
if (rgui_list_size(rgui->path_stack) > 1)
{
rgui_list_pop(rgui->path_stack);
rgui->directory_ptr = directory_ptr;
rgui->need_refresh = true;
}
break;
case RGUI_ACTION_LEFT:
@ -1150,6 +1204,11 @@ int rgui_settings_iterate(rgui_handle_t *rgui, rgui_action_t action)
g_settings.video.aspect_ratio_idx = ASPECT_RATIO_CUSTOM;
video_set_aspect_ratio_func(g_settings.video.aspect_ratio_idx);
}
else if (type == RGUI_SETTINGS_OPEN_FILEBROWSER && action == RGUI_ACTION_OK)
{
rgui_list_push(rgui->path_stack, rgui->base_path, RGUI_FILE_DIRECTORY, rgui->directory_ptr);
rgui->need_refresh = true;
}
else
{
int ret = rgui_settings_toggle_setting(type, action, menu_type);

View File

@ -33,6 +33,7 @@ typedef enum
RGUI_SETTINGS,
// settings options are done here too
RGUI_SETTINGS_OPEN_FILEBROWSER,
RGUI_SETTINGS_REWIND_ENABLE,
RGUI_SETTINGS_REWIND_GRANULARITY,
RGUI_SETTINGS_SAVESTATE_SAVE,

View File

@ -33,14 +33,40 @@
#include "../../gfx/image.h"
#include "../../console/rarch_console_video.h"
#include "../../gfx/gfx_common.h"
#include "../../gfx/gfx_context.h"
#include "../../file.h"
#include "../../driver.h"
#include "../../general.h"
#define EXT_IMAGES "png|PNG|jpg|JPG|JPEG|jpeg"
#define EXT_SHADERS "cg|CG"
#define EXT_CGP_PRESETS "cgp|CGP"
#define EXT_INPUT_PRESETS "cfg|CFG"
enum {
MENU_ITEM_LOAD_STATE = 0,
MENU_ITEM_SAVE_STATE,
MENU_ITEM_KEEP_ASPECT_RATIO,
MENU_ITEM_OVERSCAN_AMOUNT,
MENU_ITEM_ORIENTATION,
#ifdef HAVE_FBO
MENU_ITEM_SCALE_FACTOR,
#endif
MENU_ITEM_RESIZE_MODE,
MENU_ITEM_FRAME_ADVANCE,
MENU_ITEM_SCREENSHOT_MODE,
MENU_ITEM_RESET,
MENU_ITEM_RETURN_TO_GAME,
MENU_ITEM_RETURN_TO_MENU,
MENU_ITEM_CHANGE_LIBRETRO,
#ifdef HAVE_MULTIMAN
MENU_ITEM_RETURN_TO_MULTIMAN,
#endif
MENU_ITEM_QUIT_RARCH,
MENU_ITEM_LAST
};
static rmenu_state_t rmenu_state;

View File

@ -16,13 +16,19 @@
#include "rmenu.h"
#include "rgui.h"
#include "../../general.h"
#ifdef HAVE_OPENGL
#include "../../gfx/gl_common.h"
#endif
#include "../../gfx/fonts/bitmap.h"
uint16_t menu_framebuf[400 * 240];
rgui_handle_t *rgui;
static const struct retro_keybind _rmenu_nav_binds[] = {
#ifdef HW_RVL
#if defined(HW_RVL)
{ 0, 0, NULL, 0, GX_GC_UP | GX_GC_LSTICK_UP | GX_GC_RSTICK_UP | GX_CLASSIC_UP | GX_CLASSIC_LSTICK_UP | GX_CLASSIC_RSTICK_UP | GX_WIIMOTE_UP | GX_NUNCHUK_UP, 0 },
{ 0, 0, NULL, 0, GX_GC_DOWN | GX_GC_LSTICK_DOWN | GX_GC_RSTICK_DOWN | GX_CLASSIC_DOWN | GX_CLASSIC_LSTICK_DOWN | GX_CLASSIC_RSTICK_DOWN | GX_WIIMOTE_DOWN | GX_NUNCHUK_DOWN, 0 },
{ 0, 0, NULL, 0, GX_GC_LEFT | GX_GC_LSTICK_LEFT | GX_GC_RSTICK_LEFT | GX_CLASSIC_LEFT | GX_CLASSIC_LSTICK_LEFT | GX_CLASSIC_RSTICK_LEFT | GX_WIIMOTE_LEFT | GX_NUNCHUK_LEFT, 0 },
@ -32,7 +38,7 @@ static const struct retro_keybind _rmenu_nav_binds[] = {
{ 0, 0, NULL, 0, GX_GC_START | GX_CLASSIC_PLUS | GX_WIIMOTE_PLUS, 0 },
{ 0, 0, NULL, 0, GX_GC_Z_TRIGGER | GX_CLASSIC_MINUS | GX_WIIMOTE_MINUS, 0 },
{ 0, 0, NULL, 0, GX_WIIMOTE_HOME | GX_CLASSIC_HOME, 0 },
#else
#elif defined(HW_DOL)
{ 0, 0, NULL, 0, GX_GC_UP | GX_GC_LSTICK_UP | GX_GC_RSTICK_UP, 0 },
{ 0, 0, NULL, 0, GX_GC_DOWN | GX_GC_LSTICK_DOWN | GX_GC_RSTICK_DOWN, 0 },
{ 0, 0, NULL, 0, GX_GC_LEFT | GX_GC_LSTICK_LEFT | GX_GC_RSTICK_LEFT, 0 },
@ -42,8 +48,19 @@ static const struct retro_keybind _rmenu_nav_binds[] = {
{ 0, 0, NULL, 0, GX_GC_START, 0 },
{ 0, 0, NULL, 0, GX_GC_Z_TRIGGER, 0 },
{ 0, 0, NULL, 0, GX_WIIMOTE_HOME, 0 },
#endif
{ 0, 0, NULL, 0, GX_QUIT_KEY, 0 },
#else
{ 0, 0, NULL, 0, (1ULL << RETRO_DEVICE_ID_JOYPAD_UP), 0 },
{ 0, 0, NULL, 0, (1ULL << RETRO_DEVICE_ID_JOYPAD_DOWN), 0 },
{ 0, 0, NULL, 0, (1ULL << RETRO_DEVICE_ID_JOYPAD_LEFT), 0 },
{ 0, 0, NULL, 0, (1ULL << RETRO_DEVICE_ID_JOYPAD_RIGHT), 0 },
{ 0, 0, NULL, 0, (1ULL << RETRO_DEVICE_ID_JOYPAD_A), 0 },
{ 0, 0, NULL, 0, (1ULL << RETRO_DEVICE_ID_JOYPAD_B), 0 },
{ 0, 0, NULL, 0, (1ULL << RETRO_DEVICE_ID_JOYPAD_START), 0 },
{ 0, 0, NULL, 0, (1ULL << RETRO_DEVICE_ID_JOYPAD_SELECT), 0 },
{ 0, 0, NULL, 0, (1ULL << RARCH_RMENU_TOGGLE), 0 },
{ 0, 0, NULL, 0, (1ULL << RARCH_QUIT_KEY), 0 },
#endif
};
static const struct retro_keybind *rmenu_nav_binds[] = {
@ -65,6 +82,7 @@ enum
RMENU_DEVICE_NAV_LAST
};
#ifdef GEKKO
static bool folder_cb(const char *directory, rgui_file_enum_cb_t file_cb,
void *userdata, void *ctx)
{
@ -100,6 +118,7 @@ static bool folder_cb(const char *directory, rgui_file_enum_cb_t file_cb,
strlcpy(exts, "dol|DOL", sizeof(exts));
else
strlcpy(exts, g_extern.system.valid_extensions, sizeof(exts));
struct string_list *ext_list = string_split(exts, "|");
char _dir[PATH_MAX];
@ -145,6 +164,53 @@ static bool folder_cb(const char *directory, rgui_file_enum_cb_t file_cb,
string_list_free(ext_list);
return true;
}
#else
static bool folder_cb(const char *directory, rgui_file_enum_cb_t file_cb,
void *userdata, void *ctx)
{
struct string_list *ext_list = string_split(g_extern.system.valid_extensions, "|");
char _dir[PATH_MAX];
snprintf(_dir, sizeof(_dir), "%s/", directory);
DIR *dir = opendir(_dir);
if (!dir)
return false;
struct dirent *entry;
while ((entry = readdir(dir)))
{
char stat_path[PATH_MAX];
const char *file_ext = path_get_extension(entry->d_name);
snprintf(stat_path, sizeof(stat_path), "%s/%s", directory, entry->d_name);
bool is_dir;
#ifdef _DIRENT_HAVE_D_TYPE
is_dir = (entry->d_type == DT_DIR);
if (entry->d_type != DT_REG && !is_dir)
continue;
#else
struct stat st;
if (stat(stat_path, &st) < 0)
continue;
is_dir = S_ISDIR(st.st_mode);
if (!S_ISREG(st.st_mode) && !is_dir)
continue;
#endif
if (!is_dir && ext_list && !string_list_find_elem_prefix(ext_list, ".", file_ext))
continue;
file_cb(ctx,
entry->d_name,
is_dir ? RGUI_FILE_DIRECTORY : RGUI_FILE_PLAIN, 0);
}
closedir(dir);
string_list_free(ext_list);
return true;
}
#endif
/*============================================================
RMENU API
@ -152,13 +218,17 @@ RMENU API
void menu_init(void)
{
gx_video_t *gx = (gx_video_t*)driver.video_data;
#if defined(HAVE_OPENGL)
gl_t *device_ptr = (gl_t*)driver.video_data;
#elif defined(GEKKO)
gx_video_t *device_ptr = (gx_video_t*)driver.video_data;
#endif
gx->menu_data = (uint32_t *) menu_framebuf;
device_ptr->menu_data = (uint32_t *) menu_framebuf;
rgui = rgui_init("",
menu_framebuf, RGUI_WIDTH * sizeof(uint16_t),
NULL /* _binary_console_font_bmp_start */, bitmap_bin, folder_cb, NULL);
NULL, bitmap_bin, folder_cb, NULL);
rgui_iterate(rgui, RGUI_ACTION_REFRESH);
}
@ -213,10 +283,54 @@ bool rmenu_iterate(void)
driver.input->poll(NULL);
#ifdef HAVE_OVERLAY
if (driver.overlay)
{
driver.overlay_state = 0;
unsigned device = input_overlay_full_screen(driver.overlay) ?
RARCH_DEVICE_POINTER_SCREEN : RETRO_DEVICE_POINTER;
bool polled = false;
for (unsigned i = 0;
input_input_state_func(NULL, 0, device, i, RETRO_DEVICE_ID_POINTER_PRESSED);
i++)
{
int16_t x = input_input_state_func(NULL, 0,
device, i, RETRO_DEVICE_ID_POINTER_X);
int16_t y = input_input_state_func(NULL, 0,
device, i, RETRO_DEVICE_ID_POINTER_Y);
driver.overlay_state |= input_overlay_poll(driver.overlay, x, y);
polled = true;
}
if (!polled)
input_overlay_poll_clear(driver.overlay);
}
#endif
#ifndef GEKKO
/* TODO - not sure if correct regarding RARCH_QUIT_KEY */
if (input_key_pressed_func(RARCH_QUIT_KEY) || !video_alive_func())
{
g_extern.lifecycle_mode_state |= (1ULL << MODE_GAME);
goto deinit;
}
#endif
for (unsigned i = 0; i < RMENU_DEVICE_NAV_LAST; i++)
input_state |= driver.input->input_state(NULL, rmenu_nav_binds, 0,
RETRO_DEVICE_JOYPAD, 0, i) ? (1ULL << i) : 0;
input_state |= driver.input->key_pressed(driver.input_data, RARCH_RMENU_TOGGLE) ? (1ULL << GX_DEVICE_NAV_MENU) : 0;
input_state |= driver.input->key_pressed(driver.input_data, RARCH_QUIT_KEY) ? (1ULL << GX_DEVICE_NAV_QUIT) : 0;
#ifdef HAVE_OVERLAY
for (unsigned i = 0; i < RMENU_DEVICE_NAV_LAST; i++)
input_state |= driver.overlay_state & rmenu_nav_binds[0][i].joykey ? (1ULL << i) : 0;
#endif
trigger_state = input_state & ~old_input_state;
bool do_held = (input_state & ((1ULL << GX_DEVICE_NAV_UP) | (1ULL << GX_DEVICE_NAV_DOWN) | (1ULL << GX_DEVICE_NAV_LEFT) | (1ULL << GX_DEVICE_NAV_RIGHT))) && !(input_state & ((1ULL << GX_DEVICE_NAV_MENU) | (1ULL << GX_DEVICE_NAV_QUIT)));
@ -263,11 +377,13 @@ bool rmenu_iterate(void)
action = RGUI_ACTION_START;
else if (trigger_state & (1ULL << GX_DEVICE_NAV_SELECT))
action = RGUI_ACTION_SETTINGS;
#ifdef GEKKO
else if (trigger_state & (1ULL << GX_DEVICE_NAV_QUIT))
{
g_extern.lifecycle_mode_state |= (1ULL << MODE_EXIT);
goto deinit;
}
#endif
int input_entry_ret = 0;
int input_process_ret = 0;

View File

@ -25,8 +25,8 @@
#include "../../console/rarch_console.h"
#include "rmenu_settings.h"
#include "../../console/rarch_console_video.h"
#include "../../gfx/gfx_common.h"
#include "../../gfx/gfx_context.h"
#include "../../message.h"

View File

@ -67,7 +67,7 @@
#endif
// Wii and PSL1GHT - for usleep (among others)
#if defined(GEKKO) || defined(__PSL1GHT__)
#if defined(GEKKO) || defined(__PSL1GHT__) || defined(__BLACKBERRY_QNX__)
#include <unistd.h>
#endif
@ -134,6 +134,9 @@ enum menu_enums
MODE_EXTLAUNCH_MULTIMAN,
MODE_EXIT,
MODE_EXITSPAWN,
#ifdef ANDROID
MODE_INPUT_XPERIA_PLAY_HACK,
#endif
MODE_VIDEO_TRIPLE_BUFFERING_ENABLE,
MODE_VIDEO_FLICKER_FILTER_ENABLE,
MODE_VIDEO_SOFT_FILTER_ENABLE,
@ -239,6 +242,7 @@ struct settings
bool debug_enable;
#ifdef ANDROID
bool autodetect_enable;
unsigned back_behavior;
unsigned icade_profile[MAX_PLAYERS];
unsigned icade_count;
#endif
@ -647,6 +651,7 @@ void rarch_init_system_info(void);
int rarch_main(int argc, char *argv[]);
int rarch_main_init_wrap(const struct rarch_main_wrap *args);
int rarch_main_init(int argc, char *argv[]);
bool rarch_main_idle_iterate(void);
bool rarch_main_iterate(void);
void rarch_main_deinit(void);
void rarch_render_cached_frame(void);
@ -762,7 +767,7 @@ static inline void rarch_sleep(unsigned msec)
Sleep(msec);
#elif defined(XENON)
udelay(1000 * msec);
#elif defined(GEKKO) || defined(__PSL1GHT__)
#elif defined(GEKKO) || defined(__PSL1GHT__) || defined(__BLACKBERRY_QNX__)
usleep(1000 * msec);
#else
struct timespec tv = {0};

View File

@ -172,8 +172,6 @@ static void gfx_ctx_check_window(bool *quit,
{
(void)frame_count;
struct android_app *android_app = (struct android_app*)g_android;
*quit = false;
unsigned new_width, new_height;
@ -185,21 +183,6 @@ static void gfx_ctx_check_window(bool *quit,
*resize = true;
}
RARCH_PERFORMANCE_INIT(alooper_pollonce);
RARCH_PERFORMANCE_START(alooper_pollonce);
while (ALooper_pollOnce(0, NULL, NULL, NULL) == LOOPER_ID_MAIN)
{
int8_t cmd;
if (read(android_app->msgread, &cmd, sizeof(cmd)) != sizeof(cmd))
cmd = -1;
engine_handle_cmd(android_app, cmd);
}
RARCH_PERFORMANCE_STOP(alooper_pollonce);
// Check if we are exiting.
if (g_extern.lifecycle_state & (1ULL << RARCH_QUIT_KEY))
*quit = true;

404
gfx/context/bbqnx_ctx.c Normal file
View File

@ -0,0 +1,404 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2013 - Hans-Kristian Arntzen
* Copyright (C) 2011-2013 - Daniel De Matteis
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "../../driver.h"
#include "../../general.h"
#include "../gfx_common.h"
#include "../gl_common.h"
#include <EGL/egl.h>
#include <bps/screen.h>
#include <bps/navigator.h>
#include <screen/screen.h>
#include <sys/platform.h>
#include <GLES2/gl2.h>
#include "../image.h"
#include "../fonts/gl_font.h"
#include <stdint.h>
#ifdef HAVE_GLSL
#include "../shader_glsl.h"
#endif
#define WINDOW_BUFFERS 2
static EGLContext g_egl_ctx;
static EGLSurface g_egl_surf;
static EGLDisplay g_egl_dpy;
static EGLConfig egl_config;
static bool g_resize;
extern screen_context_t screen_ctx;
static screen_window_t screen_win;
static screen_display_t screen_disp;
GLfloat _angle;
static enum gfx_ctx_api g_api;
static void gfx_ctx_set_swap_interval(unsigned interval)
{
RARCH_LOG("gfx_ctx_set_swap_interval(%d).\n", interval);
eglSwapInterval(g_egl_dpy, interval);
}
static void gfx_ctx_destroy(void)
{
RARCH_LOG("gfx_ctx_destroy().\n");
eglMakeCurrent(g_egl_dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
eglDestroyContext(g_egl_dpy, g_egl_ctx);
eglDestroySurface(g_egl_dpy, g_egl_surf);
screen_destroy_window(screen_win);
screen_destroy_context(screen_ctx);
eglTerminate(g_egl_dpy);
eglReleaseThread();
g_egl_dpy = EGL_NO_DISPLAY;
g_egl_surf = EGL_NO_SURFACE;
g_egl_ctx = EGL_NO_CONTEXT;
egl_config = 0;
g_resize = false;
}
static void gfx_ctx_get_video_size(unsigned *width, unsigned *height)
{
if (g_egl_dpy)
{
EGLint gl_width, gl_height;
eglQuerySurface(g_egl_dpy, g_egl_surf, EGL_WIDTH, &gl_width);
eglQuerySurface(g_egl_dpy, g_egl_surf, EGL_HEIGHT, &gl_height);
*width = gl_width;
*height = gl_height;
}
else
{
*width = 0;
*height = 0;
}
}
static bool gfx_ctx_init(void)
{
const EGLint attribs[] = {
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_BLUE_SIZE, 8,
EGL_GREEN_SIZE, 8,
EGL_RED_SIZE, 8,
EGL_NONE
};
EGLint num_config;
EGLint egl_version_major, egl_version_minor;
int format = SCREEN_FORMAT_RGBX8888;
EGLint context_attributes[] = {
EGL_CONTEXT_CLIENT_VERSION, 2,
EGL_NONE
};
int usage;
usage = SCREEN_USAGE_OPENGL_ES2 | SCREEN_USAGE_ROTATION;
RARCH_LOG("Initializing context\n");
if ((g_egl_dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY)) == EGL_NO_DISPLAY)
{
RARCH_ERR("eglGetDisplay failed.\n");
goto error;
}
if (!eglInitialize(g_egl_dpy, &egl_version_major, &egl_version_minor))
{
RARCH_ERR("eglInitialize failed.\n");
goto error;
}
if (!eglBindAPI(EGL_OPENGL_ES_API))
{
RARCH_ERR("eglBindAPI failed.\n");
goto error;
}
RARCH_LOG("[BLACKBERRY QNX/EGL]: EGL version: %d.%d\n", egl_version_major, egl_version_minor);
if (!eglChooseConfig(g_egl_dpy, attribs, &egl_config, 1, &num_config))
{
RARCH_ERR("eglChooseConfig failed.\n");
goto error;
}
if ((g_egl_ctx = eglCreateContext(g_egl_dpy, egl_config, 0, context_attributes)) == EGL_NO_CONTEXT)
{
RARCH_ERR("eglCreateContext failed.\n");
goto error;
}
if (screen_create_window(&screen_win, screen_ctx))
{
RARCH_ERR("screen_create_window failed:.\n");
goto error;
}
if (screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_FORMAT, &format))
{
RARCH_ERR("screen_set_window_property_iv [SCREEN_PROPERTY_FORMAT] failed.\n");
goto error;
}
if (screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_USAGE, &usage))
{
RARCH_ERR("screen_set_window_property_iv [SCREEN_PROPERTY_USAGE] failed.\n");
goto error;
}
if (screen_get_window_property_pv(screen_win, SCREEN_PROPERTY_DISPLAY, (void **)&screen_disp))
{
RARCH_ERR("screen_get_window_property_pv [SCREEN_PROPERTY_DISPLAY] failed.\n");
goto error;
}
int screen_resolution[2];
if (screen_get_display_property_iv(screen_disp, SCREEN_PROPERTY_SIZE, screen_resolution))
{
RARCH_ERR("screen_get_window_property_iv [SCREEN_PROPERTY_SIZE] failed.\n");
goto error;
}
int angle = atoi(getenv("ORIENTATION"));
screen_display_mode_t screen_mode;
if (screen_get_display_property_pv(screen_disp, SCREEN_PROPERTY_MODE, (void**)&screen_mode))
{
RARCH_ERR("screen_get_display_property_pv [SCREEN_PROPERTY_MODE] failed.\n");
goto error;
}
int size[2];
if (screen_get_window_property_iv(screen_win, SCREEN_PROPERTY_BUFFER_SIZE, size)) {
RARCH_ERR("screen_get_window_property_iv [SCREEN_PROPERTY_BUFFER_SIZE] failed.\n");
goto error;
}
int buffer_size[2] = {size[0], size[1]};
if ((angle == 0) || (angle == 180)) {
if (((screen_mode.width > screen_mode.height) && (size[0] < size[1])) ||
((screen_mode.width < screen_mode.height) && (size[0] > size[1]))) {
buffer_size[1] = size[0];
buffer_size[0] = size[1];
}
} else if ((angle == 90) || (angle == 270)){
if (((screen_mode.width > screen_mode.height) && (size[0] > size[1])) ||
((screen_mode.width < screen_mode.height && size[0] < size[1]))) {
buffer_size[1] = size[0];
buffer_size[0] = size[1];
}
} else {
RARCH_ERR("Navigator returned an unexpected orientation angle.\n");
goto error;
}
if (screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_BUFFER_SIZE, buffer_size))
{
RARCH_ERR("screen_set_window_property_iv [SCREEN_PROPERTY_BUFFER_SIZE] failed.\n");
goto error;
}
if (screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_ROTATION, &angle))
{
RARCH_ERR("screen_set_window_property_iv [SCREEN_PROPERTY_ROTATION] failed.\n");
goto error;
}
if (screen_create_window_buffers(screen_win, WINDOW_BUFFERS))
{
RARCH_ERR("screen_create_window_buffers failed.\n");
goto error;
}
if (!(g_egl_surf = eglCreateWindowSurface(g_egl_dpy, egl_config, screen_win, 0)))
{
RARCH_ERR("eglCreateWindowSurface failed.\n");
goto error;
}
if (!eglMakeCurrent(g_egl_dpy, g_egl_surf, g_egl_surf, g_egl_ctx))
{
RARCH_ERR("eglMakeCurrent failed.\n");
goto error;
}
return true;
error:
RARCH_ERR("EGL error: %d.\n", eglGetError());
gfx_ctx_destroy();
return false;
}
static void gfx_ctx_swap_buffers(void)
{
eglSwapBuffers(g_egl_dpy, g_egl_surf);
}
static void gfx_ctx_check_window(bool *quit,
bool *resize, unsigned *width, unsigned *height, unsigned frame_count)
{
(void)frame_count;
//Request and process all available BPS events
bps_event_t *event = NULL;
bps_get_event(&event, 0);
*quit = false;
unsigned new_width, new_height;
gfx_ctx_get_video_size(&new_width, &new_height);
if (new_width != *width || new_height != *height)
{
*width = new_width;
*height = new_height;
*resize = true;
}
if (event)
{
int domain = bps_event_get_domain(event);
if (domain == screen_get_domain())
{
screen_event_t screen_event = screen_event_get_event(event);
int screen_val;
screen_get_event_property_iv(screen_event, SCREEN_PROPERTY_TYPE, &screen_val);
switch (screen_val) {
case SCREEN_EVENT_MTOUCH_TOUCH:
case SCREEN_EVENT_MTOUCH_MOVE:
case SCREEN_EVENT_MTOUCH_RELEASE:
break;
}
}
else if ((domain == navigator_get_domain()) && (NAVIGATOR_EXIT == bps_event_get_code(event)))
g_extern.lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
}
// Check if we are exiting.
if (g_extern.lifecycle_state & (1ULL << RARCH_QUIT_KEY))
*quit = true;
}
static void gfx_ctx_set_resize(unsigned width, unsigned height)
{
(void)width;
(void)height;
}
static void gfx_ctx_update_window_title(bool reset)
{
if (reset)
gfx_window_title_reset();
char buf[128];
#if 0
if (gfx_get_fps(buf, sizeof(buf), false))
RARCH_LOG("%s.\n", buf);
#else
gfx_get_fps(buf, sizeof(buf), false);
#endif
}
static bool gfx_ctx_set_video_mode(
unsigned width, unsigned height,
bool fullscreen)
{
(void)width;
(void)height;
(void)fullscreen;
return true;
}
static void gfx_ctx_input_driver(const input_driver_t **input, void **input_data)
{
*input = NULL;
*input_data = NULL;
}
static unsigned gfx_ctx_get_resolution_width(unsigned resolution_id)
{
int gl_width;
eglQuerySurface(g_egl_dpy, g_egl_surf, EGL_WIDTH, &gl_width);
return gl_width;
}
static gfx_ctx_proc_t gfx_ctx_get_proc_address(const char *symbol)
{
rarch_assert(sizeof(void*) == sizeof(void (*)(void)));
gfx_ctx_proc_t ret;
void *sym__ = eglGetProcAddress(symbol);
memcpy(&ret, &sym__, sizeof(void*));
return ret;
}
static bool gfx_ctx_bind_api(enum gfx_ctx_api api)
{
g_api = api;
return api == GFX_CTX_OPENGL_ES_API;
}
static bool gfx_ctx_has_focus(void)
{
return true;
}
static bool gfx_ctx_init_egl_image_buffer(const video_info_t *video)
{
return false;
}
static bool gfx_ctx_write_egl_image(const void *frame, unsigned width, unsigned height, unsigned pitch, bool rgb32, unsigned index, void **image_handle)
{
return false;
}
const gfx_ctx_driver_t gfx_ctx_bbqnx = {
gfx_ctx_init,
gfx_ctx_destroy,
gfx_ctx_bind_api,
gfx_ctx_set_swap_interval,
gfx_ctx_set_video_mode,
gfx_ctx_get_video_size,
NULL,
gfx_ctx_update_window_title,
gfx_ctx_check_window,
gfx_ctx_set_resize,
gfx_ctx_has_focus,
gfx_ctx_swap_buffers,
gfx_ctx_input_driver,
NULL,
gfx_ctx_init_egl_image_buffer,
gfx_ctx_write_egl_image,
NULL,
"blackberry_qnx",
};

View File

@ -169,3 +169,73 @@ void gfx_scale_integer(struct rarch_viewport *vp, unsigned width, unsigned heigh
vp->y = padding_y >> 1;
}
#ifdef HAVE_RMENU
struct aspect_ratio_elem aspectratio_lut[ASPECT_RATIO_END] = {
{ "1:1", 1.0f },
{ "2:1", 2.0f },
{ "3:2", 1.5f },
{ "3:4", 0.75f },
{ "4:1", 4.0f },
{ "4:3", 1.3333f },
{ "4:4", 1.0f },
{ "5:4", 1.25f },
{ "6:5", 1.2f },
{ "7:9", 0.7777f },
{ "8:3", 2.6666f },
{ "8:7", 1.1428f },
{ "16:9", 1.7778f },
{ "16:10", 1.6f },
{ "16:15", 3.2f },
{ "19:12", 1.5833f },
{ "19:14", 1.3571f },
{ "30:17", 1.7647f },
{ "32:9", 3.5555f },
{ "Auto", 1.0f },
{ "Core Provided", 1.0f },
{ "Custom", 0.0f }
};
char rotation_lut[ASPECT_RATIO_END][32] =
{
"Normal",
"Vertical",
"Flipped",
"Flipped Rotated"
};
void gfx_set_auto_viewport(unsigned width, unsigned height)
{
if(width == 0 || height == 0)
return;
unsigned aspect_x, aspect_y, len, highest, i;
len = width < height ? width : height;
highest = 1;
for (i = 1; i < len; i++)
{
if ((width % i) == 0 && (height % i) == 0)
highest = i;
}
aspect_x = width / highest;
aspect_y = height / highest;
snprintf(aspectratio_lut[ASPECT_RATIO_AUTO].name, sizeof(aspectratio_lut[ASPECT_RATIO_AUTO].name), "%d:%d (Auto)", aspect_x, aspect_y);
aspectratio_lut[ASPECT_RATIO_AUTO].value = (float) aspect_x / aspect_y;
}
void gfx_set_core_viewport(void)
{
if (!g_extern.main_is_init)
return;
// fallback to 1:1 pixel ratio if none provided
if (g_extern.system.av_info.geometry.aspect_ratio == 0.0)
aspectratio_lut[ASPECT_RATIO_CORE].value = (float) g_extern.system.av_info.geometry.base_width / g_extern.system.av_info.geometry.base_height;
else
aspectratio_lut[ASPECT_RATIO_CORE].value = g_extern.system.av_info.geometry.aspect_ratio;
}
#endif

View File

@ -40,6 +40,87 @@ void gfx_set_dwm(void);
void gfx_scale_integer(struct rarch_viewport *vp, unsigned win_width, unsigned win_height,
float aspect_ratio, bool keep_aspect);
#ifdef HAVE_RMENU
#define MIN_SCALING_FACTOR (1.0f)
#if defined(__CELLOS_LV2__)
#define MAX_SCALING_FACTOR (5.0f)
#else
#define MAX_SCALING_FACTOR (2.0f)
#endif
enum aspect_ratio
{
ASPECT_RATIO_1_1 = 0,
ASPECT_RATIO_2_1,
ASPECT_RATIO_3_2,
ASPECT_RATIO_3_4,
ASPECT_RATIO_4_1,
ASPECT_RATIO_4_3,
ASPECT_RATIO_4_4,
ASPECT_RATIO_5_4,
ASPECT_RATIO_6_5,
ASPECT_RATIO_7_9,
ASPECT_RATIO_8_3,
ASPECT_RATIO_8_7,
ASPECT_RATIO_16_9,
ASPECT_RATIO_16_10,
ASPECT_RATIO_16_15,
ASPECT_RATIO_19_12,
ASPECT_RATIO_19_14,
ASPECT_RATIO_30_17,
ASPECT_RATIO_32_9,
ASPECT_RATIO_AUTO,
ASPECT_RATIO_CORE,
ASPECT_RATIO_CUSTOM,
ASPECT_RATIO_END,
};
#define LAST_ASPECT_RATIO ASPECT_RATIO_CUSTOM
enum rotation
{
ORIENTATION_NORMAL = 0,
ORIENTATION_VERTICAL,
ORIENTATION_FLIPPED,
ORIENTATION_FLIPPED_ROTATED,
ORIENTATION_END
};
#define LAST_ORIENTATION (ORIENTATION_END-1)
extern char rotation_lut[ASPECT_RATIO_END][32];
/* ABGR color format defines */
#define WHITE 0xffffffffu
#define RED 0xff0000ffu
#define GREEN 0xff00ff00u
#define BLUE 0xffff0000u
#define YELLOW 0xff00ffffu
#define PURPLE 0xffff00ffu
#define CYAN 0xffffff00u
#define ORANGE 0xff0063ffu
#define SILVER 0xff8c848cu
#define LIGHTBLUE 0xFFFFE0E0U
#define LIGHTORANGE 0xFFE0EEFFu
struct aspect_ratio_elem
{
char name[64];
float value;
};
extern struct aspect_ratio_elem aspectratio_lut[ASPECT_RATIO_END];
extern void gfx_set_auto_viewport(unsigned width, unsigned height);
extern void gfx_set_core_viewport(void);
#endif
#ifdef __cplusplus
}
#endif

View File

@ -48,6 +48,9 @@ static const gfx_ctx_driver_t *gfx_ctx_drivers[] = {
#if defined(ANDROID)
&gfx_ctx_android,
#endif
#if defined(__BLACKBERRY_QNX__)
&gfx_ctx_bbqnx,
#endif
};
const gfx_ctx_driver_t *gfx_ctx_find_driver(const char *ident)

View File

@ -29,6 +29,15 @@
#define MAX_EGLIMAGE_TEXTURES 32
#ifdef HAVE_FBO
enum fbo_option
{
FBO_DEINIT = 0,
FBO_INIT,
FBO_REINIT
};
#endif
enum gfx_ctx_api
{
GFX_CTX_OPENGL_API,
@ -136,6 +145,7 @@ extern const gfx_ctx_driver_t gfx_ctx_ps3;
extern const gfx_ctx_driver_t gfx_ctx_xdk;
extern const gfx_ctx_driver_t gfx_ctx_wgl;
extern const gfx_ctx_driver_t gfx_ctx_videocore;
extern const gfx_ctx_driver_t gfx_ctx_bbqnx;
const gfx_ctx_driver_t *gfx_ctx_find_driver(const char *ident); // Finds driver with ident. Does not initialize.
const gfx_ctx_driver_t *gfx_ctx_init_first(enum gfx_ctx_api api); // Finds first suitable driver and initializes.

View File

@ -57,6 +57,10 @@
#include "../frontend/frontend_android.h"
#endif
#ifdef HAVE_RGUI
#include "../frontend/menu/rgui.h"
#endif
// Used for the last pass when rendering to the back buffer.
const GLfloat vertexes_flipped[] = {
0, 1,
@ -668,14 +672,12 @@ void gl_init_fbo(void *data, unsigned width, unsigned height)
void gl_set_projection(void *data, struct gl_ortho *ortho, bool allow_rotate)
{
gl_t *gl = (gl_t*)data;
#ifdef RARCH_CONSOLE
if (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_OVERSCAN_ENABLE))
{
ortho->left = -g_extern.console.screen.overscan_amount / 2;
ortho->right = 1 + g_extern.console.screen.overscan_amount / 2;
ortho->bottom = -g_extern.console.screen.overscan_amount / 2;
}
#endif
// Calculate projection.
matrix_ortho(&gl->mvp_no_rot, ortho->left, ortho->right,
@ -715,7 +717,7 @@ void gl_set_viewport(void *data, unsigned width, unsigned height, bool force_ful
float desired_aspect = g_settings.video.aspect_ratio;
float delta;
#ifdef RARCH_CONSOLE
#ifdef HAVE_RGUI
if (g_settings.video.aspect_ratio_idx == ASPECT_RATIO_CUSTOM)
{
x = g_extern.console.screen.viewports.custom_vp.x;
@ -1044,13 +1046,13 @@ static void gl_init_textures_data(void *data)
#if defined(HAVE_PSGL)
static inline void gl_copy_frame(void *data, const void *frame, unsigned width, unsigned height, unsigned pitch)
{
gl_t *gl = (gl_t*)data;
gl_t *gl = (gl_t*)data;
size_t buffer_addr = gl->tex_w * gl->tex_h * gl->tex_index * gl->base_size;
size_t buffer_stride = gl->tex_w * gl->base_size;
const uint8_t *frame_copy = frame;
size_t frame_copy_size = width * gl->base_size;
uint8_t *buffer = (uint8_t*)glMapBuffer(GL_TEXTURE_REFERENCE_BUFFER_SCE, GL_WRITE_ONLY) + buffer_addr;
uint8_t *buffer = (uint8_t*)glMapBuffer(GL_TEXTURE_REFERENCE_BUFFER_SCE, GL_READ_WRITE) + buffer_addr;
for (unsigned h = 0; h < height; h++, buffer += buffer_stride, frame_copy += pitch)
memcpy(buffer, frame_copy, frame_copy_size);
@ -1070,6 +1072,15 @@ static void gl_init_textures(void *data, const video_info_t *video)
glGenTextures(TEXTURES, gl->texture);
#ifdef HAVE_RGUI
glGenTextures(1, &gl->rgui_texture);
glBindTexture(GL_TEXTURE_2D, gl->rgui_texture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
#endif
for (unsigned i = 0; i < TEXTURES; i++)
{
glBindTexture(GL_TEXTURE_2D, gl->texture[i]);
@ -1178,6 +1189,16 @@ static void gl_init_textures(void *data, const video_info_t *video)
#endif
glGenTextures(TEXTURES, gl->texture);
#ifdef HAVE_RGUI
glGenTextures(1, &gl->rgui_texture);
glBindTexture(GL_TEXTURE_2D, gl->rgui_texture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
#endif
for (unsigned i = 0; i < TEXTURES; i++)
{
glBindTexture(GL_TEXTURE_2D, gl->texture[i]);
@ -1237,6 +1258,31 @@ static void gl_pbo_async_readback(void *data)
}
#endif
#ifdef HAVE_RGUI
static inline void gl_draw_rgui(void *data)
{
gl_t *gl = (gl_t*)data;
gl->coords.tex_coord = tex_coords;
glBindTexture(GL_TEXTURE_2D, gl->rgui_texture);
glPixelStorei(GL_UNPACK_ALIGNMENT, get_alignment(RGUI_WIDTH * 2));
// RGUI is always packed so pitch = width * bpp
glTexImage2D(GL_TEXTURE_2D,
0, GL_RGBA, RGUI_WIDTH, RGUI_HEIGHT, 0, GL_RGBA,
GL_UNSIGNED_SHORT_4_4_4_4, gl->menu_data);
gl_shader_use_func(gl, 0);
gl_shader_set_coords_func(gl, &gl->coords, &gl->mvp_no_rot);
glEnable(GL_BLEND);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
glDisable(GL_BLEND);
gl->coords.tex_coord = gl->tex_coords;
}
#endif
static bool gl_frame(void *data, const void *frame, unsigned width, unsigned height, unsigned pitch, const char *msg)
{
RARCH_PERFORMANCE_INIT(frame_run);
@ -1310,6 +1356,11 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei
gl_set_prev_texture(gl, &tex_info);
#ifdef HAVE_RGUI
if (lifecycle_mode_state & (1ULL << MODE_MENU_DRAW))
gl_draw_rgui(gl);
#endif
#ifdef FPS_COUNTER
if (lifecycle_mode_state & (1ULL << MODE_FPS_DRAW))
{
@ -1337,7 +1388,7 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei
RARCH_PERFORMANCE_STOP(frame_run);
#ifdef HAVE_RMENU
#if defined(HAVE_RMENU) && !defined(HAVE_RGUI)
if (lifecycle_mode_state & (1ULL << MODE_MENU_DRAW))
context_rmenu_frame_func(gl);
else
@ -1385,6 +1436,10 @@ static void gl_free(void *data)
glDeleteTextures(TEXTURES, gl->texture);
#ifdef HAVE_RGUI
glDeleteTextures(1, &gl->rgui_texture);
#endif
#ifdef HAVE_OVERLAY
if (gl->tex_overlay)
glDeleteTextures(1, &gl->tex_overlay);
@ -1507,6 +1562,10 @@ static inline void gl_reinit_textures(void *data, const video_info_t *video)
glBindTexture(GL_TEXTURE_2D, 0);
glDeleteTextures(TEXTURES, gl->texture);
#ifdef HAVE_RGUI
glDeleteTextures(1, &gl->rgui_texture);
#endif
gl_init_textures(gl, video);
gl_init_textures_data(gl);
@ -1755,7 +1814,7 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo
if (input && input_data)
context_input_driver_func(input, input_data);
#ifndef HAVE_RMENU
#if !defined(HAVE_RMENU) || !defined(RARCH_CONSOLE)
// Comes too early for console - moved to gl_start
if (g_settings.video.font_enable)
gl->font_ctx = gl_font_init_first(gl, g_settings.video.font_path, g_settings.video.font_size);
@ -2034,13 +2093,14 @@ static void gl_set_aspect_ratio(void *data, unsigned aspectratio_index)
gl_t *gl = driver.video_data;
if (g_settings.video.aspect_ratio_idx == ASPECT_RATIO_AUTO)
rarch_set_auto_viewport(g_extern.frame_cache.width, g_extern.frame_cache.height);
gfx_set_auto_viewport(g_extern.frame_cache.width, g_extern.frame_cache.height);
else if(g_settings.video.aspect_ratio_idx == ASPECT_RATIO_CORE)
rarch_set_core_viewport();
gfx_set_core_viewport();
g_settings.video.aspect_ratio = aspectratio_lut[g_settings.video.aspect_ratio_idx].value;
g_settings.video.force_aspect = false;
gl->keep_aspect = true;
gl->should_resize = true;
}
#endif

View File

@ -56,6 +56,7 @@
#include <GL/glext.h>
#endif
#if defined(ANDROID) && defined(HAVE_GRIFFIN)
#include "../console/griffin/hook_context.h"
#else
@ -301,6 +302,11 @@ typedef struct gl
struct scaler_ctx pbo_readback_scaler;
#endif
#ifdef HAVE_RGUI
GLuint rgui_texture;
uint32_t *menu_data;
#endif
} gl_t;
// Windows ... <_<

View File

@ -535,6 +535,17 @@ static void thread_get_overlay_interface(void *data, const video_overlay_interfa
}
#endif
#if defined(HAVE_RMENU)
// all stubs for now, might not have to implement them unless we want to port this to consoles
static void thread_start(void) {}
static void thread_stop(void) {}
static void thread_restart(void) {}
static void thread_apply_state_changes(void) {}
static void thread_set_aspect_ratio(void *data, unsigned aspectratio_index) {}
#endif
static const video_driver_t video_thread = {
thread_init_never_call, // Should never be called directly.
thread_frame,
@ -544,6 +555,13 @@ static const video_driver_t video_thread = {
thread_set_shader,
thread_free,
"Thread wrapper",
#if defined(HAVE_RMENU)
thread_start,
thread_stop,
thread_restart,
thread_apply_state_changes,
thread_set_aspect_ratio,
#endif
thread_set_rotation,
thread_viewport_info,
thread_read_viewport,

View File

@ -528,10 +528,7 @@ static void gx_input_poll(void *data)
| GX_CLASSIC_HOME
#endif
))
{
*lifecycle_state |= (1ULL << RARCH_RMENU_TOGGLE);
*lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
}
}
}

View File

@ -17,7 +17,6 @@
#include "../driver.h"
#include "../general.h"
#include "../console/rarch_console_video.h"
#include "../gfx/fonts/bitmap.h"
#include "../frontend/menu/rgui.h"
#include "../gfx/gfx_common.h"
@ -276,9 +275,9 @@ void gx_set_aspect_ratio(void *data, unsigned aspectratio_idx)
gx_video_t *gx = (gx_video_t*)driver.video_data;
if (g_settings.video.aspect_ratio_idx == ASPECT_RATIO_AUTO)
rarch_set_auto_viewport(g_extern.frame_cache.width, g_extern.frame_cache.height);
gfx_set_auto_viewport(g_extern.frame_cache.width, g_extern.frame_cache.height);
else if(g_settings.video.aspect_ratio_idx == ASPECT_RATIO_CORE)
rarch_set_core_viewport();
gfx_set_core_viewport();
g_settings.video.aspect_ratio = aspectratio_lut[g_settings.video.aspect_ratio_idx].value;
g_settings.video.force_aspect = false;

View File

@ -49,6 +49,14 @@ static inline void input_conv_analog_id_to_bind_id(unsigned index, unsigned id,
bool input_translate_coord_viewport(int mouse_x, int mouse_y,
int16_t *res_x, int16_t *res_y, int16_t *res_screen_x, int16_t *res_screen_y);
#ifdef ANDROID
enum back_button_enums
{
BACK_BUTTON_QUIT = 0,
BACK_BUTTON_MENU_TOGGLE,
};
#endif
typedef struct rarch_joypad_driver
{
bool (*init)(void);

View File

@ -417,6 +417,7 @@ input_overlay_t *input_overlay_new(const char *overlay)
input_overlay_set_alpha_mod(ol, g_settings.input.overlay_opacity);
input_overlay_set_scale_factor(ol, 1.0f);
ol->next_index = (ol->index + 1) % ol->size;
return ol;
@ -506,6 +507,7 @@ void input_overlay_next(input_overlay_t *ol)
ol->active->mod_x, ol->active->mod_y, ol->active->mod_w, ol->active->mod_h);
ol->iface->full_screen(ol->iface_data, ol->active->full_screen);
ol->blocked = true;
ol->next_index = (ol->index + 1) % ol->size;
}
bool input_overlay_full_screen(input_overlay_t *ol)

View File

@ -113,7 +113,7 @@
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PreprocessorDefinitions>_DEBUG;_XBOX;HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";%(PreprocessorDefinitions);HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;RARCH_CONSOLE;HAVE_RMENU;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_XAUDIO</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_XBOX;HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";%(PreprocessorDefinitions);HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;HAVE_RARCH_MAIN_IMPLEMENTATION;RARCH_CONSOLE;HAVE_RMENU;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_XAUDIO</PreprocessorDefinitions>
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
</ClCompile>
<Link>
@ -151,7 +151,7 @@
<PREfast>AnalyzeOnly</PREfast>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PreprocessorDefinitions>_DEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;HAVE_FILEBROWSER;RARCH_CONSOLE;HAVE_RMENU;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_FILEBROWSER;RARCH_CONSOLE;HAVE_RMENU;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY</PreprocessorDefinitions>
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
</ClCompile>
<Link>
@ -190,7 +190,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;HAVE_RMENU;main=rarch_main;HAVE_FILEBROWSER;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_XAUDIO</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;HAVE_RMENU;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_FILEBROWSER;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_XAUDIO</PreprocessorDefinitions>
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
</ClCompile>
<Link>
@ -234,7 +234,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;HAVE_FILEBROWSER;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_RMENU;HAVE_XAUDIO</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_FILEBROWSER;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_RMENU;HAVE_XAUDIO</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@ -275,7 +275,7 @@
<ExceptionHandling>false</ExceptionHandling>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>NDEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";_CRT_SECURE_NO_WARNINGS;HAVE_DEFAULT_RETROPAD_INPUT;main=rarch_main;RARCH_CONSOLE=1;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_RMENU;HAVE_XAUDIO</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";_CRT_SECURE_NO_WARNINGS;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_RARCH_MAIN_IMPLEMENTATION;RARCH_CONSOLE=1;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_RMENU;HAVE_XAUDIO</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@ -316,7 +316,7 @@
<ExceptionHandling>false</ExceptionHandling>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";_CRT_SECURE_NO_WARNINGS;HAVE_DEFAULT_RETROPAD_INPUT;RARCH_CONSOLE;HAVE_RMENU;main=rarch_main;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_XAUDIO</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";_CRT_SECURE_NO_WARNINGS;HAVE_DEFAULT_RETROPAD_INPUT;RARCH_CONSOLE;HAVE_RMENU;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_XAUDIO</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>

View File

@ -22,7 +22,7 @@
Optimization="3"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\msvc-stdint&quot;;&quot;$(SolutionDir)\msvc-71&quot;"
PreprocessorDefinitions="_DEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\&quot;0.9.8.4\&quot;;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY"
PreprocessorDefinitions="_DEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\&quot;0.9.8.4\&quot;;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY"
MinimalRebuild="TRUE"
BasicRuntimeChecks="0"
RuntimeLibrary="1"
@ -72,7 +72,7 @@
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\msvc-stdint&quot;;&quot;$(SolutionDir)\msvc-71&quot;"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\&quot;0.9.8.4\&quot;;__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\&quot;0.9.8.4\&quot;;__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY"
StringPooling="TRUE"
RuntimeLibrary="0"
BufferSecurityCheck="TRUE"
@ -127,7 +127,7 @@
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\msvc-stdint&quot;;&quot;$(SolutionDir)\msvc-71&quot;"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\&quot;0.9.8.4\&quot;;__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;FASTCAP;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\&quot;0.9.8.4\&quot;;__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;FASTCAP;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY"
StringPooling="TRUE"
RuntimeLibrary="0"
BufferSecurityCheck="TRUE"
@ -188,7 +188,7 @@
EnableFiberSafeOptimizations="TRUE"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\msvc-stdint&quot;;&quot;$(SolutionDir)\msvc-71&quot;"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\&quot;0.9.8.4\&quot;;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;inline=_inline;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\&quot;0.9.8.4\&quot;;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;inline=_inline;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY"
StringPooling="TRUE"
RuntimeLibrary="0"
BufferSecurityCheck="TRUE"
@ -241,7 +241,7 @@
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\msvc-stdint&quot;;&quot;$(SolutionDir)\msvc-71&quot;"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\&quot;0.9.8.4\&quot;;__STDC_CONSTANT_MACROS;HAVE_ZLIB;LTCG;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\&quot;0.9.8.4\&quot;;__STDC_CONSTANT_MACROS;HAVE_ZLIB;LTCG;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY"
StringPooling="TRUE"
RuntimeLibrary="0"
BufferSecurityCheck="TRUE"

View File

@ -254,6 +254,8 @@
</ClCompile>
<ClCompile Include="..\..\patch.c">
</ClCompile>
<ClCompile Include="..\..\frontend\frontend.c">
</ClCompile>
<ClCompile Include="..\..\retroarch.c">
</ClCompile>
<ClCompile Include="..\..\rewind.c">
@ -274,4 +276,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -35,6 +35,8 @@ typedef int ssize_t;
#define strtoull _strtoui64
#undef strcasecmp
#define strcasecmp _stricmp
#undef strncasecmp
#define strncasecmp _strnicmp
// Disable some of the annoying warnings.
#pragma warning(disable : 4800)

View File

@ -31,11 +31,17 @@
#endif
#elif defined(_XBOX360)
#include <PPCIntrinsics.h>
#elif defined(_POSIX_MONOTONIC_CLOCK) || defined(ANDROID)
#elif defined(_POSIX_MONOTONIC_CLOCK) || defined(ANDROID) || defined(__QNX__)
// POSIX_MONOTONIC_CLOCK is not being defined in Android headers despite support being present.
#include <time.h>
#endif
#ifdef __QNX__
#ifndef CLOCK_MONOTONIC
#define CLOCK_MONOTONIC 2
#endif
#endif
#if defined(__PSL1GHT__)
#include <sys/time.h>
#elif defined(__CELLOS_LV2__)
@ -85,7 +91,7 @@ rarch_perf_tick_t rarch_get_perf_counter(void)
__asm mov time_tmp.HighPart, edx;
time = time_tmp.QuadPart;
#elif defined(__linux__)
#elif defined(__linux__) || defined(__QNX__)
struct timespec tv;
if (clock_gettime(CLOCK_MONOTONIC, &tv) == 0)
time = (rarch_perf_tick_t)tv.tv_sec * 1000000000 + (rarch_perf_tick_t)tv.tv_nsec;
@ -134,7 +140,7 @@ rarch_time_t rarch_get_time_usec(void)
clock_get_time(cclock, &mts);
mach_port_deallocate(mach_task_self(), cclock);
return mts.tv_sec * INT64_C(1000000) + (mts.tv_nsec + 500) / 1000;
#elif defined(_POSIX_MONOTONIC_CLOCK) || defined(ANDROID)
#elif defined(_POSIX_MONOTONIC_CLOCK) || defined(__QNX__) || defined(ANDROID)
struct timespec tv;
if (clock_gettime(CLOCK_MONOTONIC, &tv) < 0)
return 0;
@ -218,6 +224,9 @@ void rarch_get_cpu_features(struct rarch_cpu_features *cpu)
if (cpu_flags & ANDROID_CPU_ARM_FEATURE_NEON)
cpu->simd |= RARCH_SIMD_NEON;
RARCH_LOG("[CPUID]: NEON: %u\n", !!(cpu->simd & RARCH_SIMD_NEON));
#elif defined(__BLACKBERRY_QNX__)
cpu->simd |= RARCH_SIMD_NEON;
RARCH_LOG("[CPUID]: NEON: %u\n", !!(cpu->simd & RARCH_SIMD_NEON));
#elif defined(__CELLOS_LV2__)
cpu->simd |= RARCH_SIMD_VMX;

854
playbook/.cproject Normal file
View File

@ -0,0 +1,854 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?>
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="com.qnx.qcc.configuration.exe.debug.507133694">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.exe.debug.507133694" moduleId="org.eclipse.cdt.core.settings" name="Device-Debug">
<externalSettings/>
<extensions>
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" description="" id="com.qnx.qcc.configuration.exe.debug.507133694" name="Device-Debug" parent="com.qnx.qcc.configuration.exe.debug">
<folderInfo id="com.qnx.qcc.configuration.exe.debug.507133694." name="/" resourcePath="">
<toolChain id="com.qnx.qcc.toolChain.exe.debug.2065020807" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
<option id="com.qnx.qcc.option.cpu.2049874529" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1371677239" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
<builder buildPath="${workspace_loc:/CubeRotate/Device-Debug}" id="com.qnx.nto.51011824" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="com.qnx.nto"/>
<tool commandLinePattern="${COMMAND} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} ${FLAGS}" id="com.qnx.qcc.tool.compiler.312527984" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
<option id="com.qnx.qcc.option.compiler.optlevel.1343943391" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
<option id="com.qnx.qcc.option.compile.debug.1008704037" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.compiler.includePath.1389175009" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
<listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
</option>
<option id="com.qnx.qcc.option.compiler.security.209097800" name="Enhanced Security (-fstack-protector-all)" superClass="com.qnx.qcc.option.compiler.security" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.compiler.defines.1775248205" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
<listOptionValue builtIn="false" value="PERF_TEST"/>
<listOptionValue builtIn="false" value="HAVE_NEON"/>
<listOptionValue builtIn="false" value="SINC_LOWER_QUALITY"/>
<listOptionValue builtIn="false" value="HAVE_RARCH_MAIN_IMPLEMENTATION"/>
<listOptionValue builtIn="false" value="HAVE_VID_CONTEXT"/>
<listOptionValue builtIn="false" value="HAVE_FBO"/>
<listOptionValue builtIn="false" value="HAVE_GRIFFIN"/>
<listOptionValue builtIn="false" value="__LIBRETRO__"/>
<listOptionValue builtIn="false" value="HAVE_DYNAMIC"/>
<listOptionValue builtIn="false" value="HAVE_ZLIB"/>
<listOptionValue builtIn="false" value="__BLACKBERRY_QNX__"/>
<listOptionValue builtIn="false" value="HAVE_OPENGLES"/>
<listOptionValue builtIn="false" value="PACKAGE_VERSION=\&quot;0.9.8.4\&quot;"/>
<listOptionValue builtIn="false" value="HAVE_OPENGLES2"/>
<listOptionValue builtIn="false" value="HAVE_SINC"/>
<listOptionValue builtIn="false" value="HAVE_NULLINPUT"/>
<listOptionValue builtIn="false" value="HAVE_AL"/>
<listOptionValue builtIn="false" value="HAVE_THREADS"/>
<listOptionValue builtIn="false" value="WANT_MINIZ"/>
<listOptionValue builtIn="false" value="HAVE_OVERLAY"/>
<listOptionValue builtIn="false" value="HAVE_GLSL"/>
<listOptionValue builtIn="false" value="USING_GL20"/>
<listOptionValue builtIn="false" value="HAVE_OPENGL"/>
</option>
<option id="com.qnx.qcc.option.compiler.qccoptions.227922712" name="QCC Options" superClass="com.qnx.qcc.option.compiler.qccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-frecord-gcc-switches"/>
<listOptionValue builtIn="false" value="-mcpu=cortex-a9"/>
<listOptionValue builtIn="false" value="-mfpu=neon"/>
</option>
<option id="com.qnx.qcc.option.compiler.ccoptions.926195316" name="Compiler Options (-Wc,)" superClass="com.qnx.qcc.option.compiler.ccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-std=gnu99"/>
</option>
<inputType id="com.qnx.qcc.inputType.compiler.827203004" superClass="com.qnx.qcc.inputType.compiler"/>
</tool>
<tool id="com.qnx.qcc.tool.assembler.722220103" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
<option id="com.qnx.qcc.option.assembler.debug.2023833959" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
<inputType id="com.qnx.qcc.inputType.assembler.326906113" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
<tool id="com.qnx.qcc.tool.linker.2091187444" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
<option id="com.qnx.qcc.option.linker.debug.1757561643" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.libraries.825393804" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
<listOptionValue builtIn="false" value="bps"/>
<listOptionValue builtIn="false" value="OpenAL"/>
<listOptionValue builtIn="false" value="png"/>
<listOptionValue builtIn="false" value="c"/>
<listOptionValue builtIn="false" value="screen"/>
<listOptionValue builtIn="false" value="EGL"/>
<listOptionValue builtIn="false" value="GLESv2"/>
<listOptionValue builtIn="false" value="freetype"/>
<listOptionValue builtIn="false" value="m"/>
</option>
<option id="com.qnx.qcc.option.linker.libraryPaths.676562861" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
</option>
<option id="com.qnx.qcc.option.linker.security.187715937" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
<inputType id="com.qnx.qcc.inputType.linker.992939518" superClass="com.qnx.qcc.inputType.linker">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="com.qnx.qcc.tool.archiver.815783219" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
</toolChain>
</folderInfo>
<fileInfo id="com.qnx.qcc.configuration.exe.debug.507133694.1129483760" name="sinc_neon.S" rcbsApplicability="disable" resourcePath="src/sinc_neon.S" toolsToInvoke="com.qnx.qcc.tool.assembler.722220103.36163518">
<tool id="com.qnx.qcc.tool.assembler.722220103.36163518" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler.722220103">
<option id="com.qnx.qcc.option.assembler.qccoptions.565523359" name="QCC Options" superClass="com.qnx.qcc.option.assembler.qccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-mcpu=cortex-a9"/>
<listOptionValue builtIn="false" value="-mfpu=neon"/>
</option>
<inputType id="com.qnx.qcc.inputType.assembler.1753268163" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
</fileInfo>
<fileInfo id="com.qnx.qcc.configuration.exe.debug.507133694.1992358048" name="utils_neon.S" rcbsApplicability="disable" resourcePath="src/utils_neon.S" toolsToInvoke="com.qnx.qcc.tool.assembler.722220103.552409735">
<tool id="com.qnx.qcc.tool.assembler.722220103.552409735" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler.722220103">
<option id="com.qnx.qcc.option.assembler.qccoptions.932071200" name="QCC Options" superClass="com.qnx.qcc.option.assembler.qccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-mfpu=neon"/>
<listOptionValue builtIn="false" value="-mcpu=cortex-a9"/>
</option>
<inputType id="com.qnx.qcc.inputType.assembler.1923702983" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
</fileInfo>
<sourceEntries>
<entry excluding="main.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="com.qnx.qcc.configuration.exe.release.237026123">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.exe.release.237026123" moduleId="org.eclipse.cdt.core.settings" name="Device-Release">
<externalSettings/>
<extensions>
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" description="" id="com.qnx.qcc.configuration.exe.release.237026123" name="Device-Release" parent="com.qnx.qcc.configuration.exe.release">
<folderInfo id="com.qnx.qcc.configuration.exe.release.237026123." name="/" resourcePath="">
<toolChain id="com.qnx.qcc.toolChain.exe.release.1766368467" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
<option id="com.qnx.qcc.option.cpu.1345690239" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1497663639" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
<builder buildPath="${workspace_loc:/CubeRotate/Device-Release}" id="com.qnx.nto.379146748" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="com.qnx.nto"/>
<tool command="qcc" commandLinePattern="${COMMAND} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} ${FLAGS}" id="com.qnx.qcc.tool.compiler.521537247" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
<option id="com.qnx.qcc.option.compiler.optlevel.1293497463" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.3" valueType="enumerated"/>
<option id="com.qnx.qcc.option.compiler.includePath.1333983864" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
<listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
</option>
<option id="com.qnx.qcc.option.compiler.security.421937377" name="Enhanced Security (-fstack-protector-all)" superClass="com.qnx.qcc.option.compiler.security" value="false" valueType="boolean"/>
<option id="com.qnx.qcc.option.compiler.defines.426935293" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
<listOptionValue builtIn="false" value="PERF_TEST"/>
<listOptionValue builtIn="false" value="HAVE_NEON"/>
<listOptionValue builtIn="false" value="SINC_LOWER_QUALITY"/>
<listOptionValue builtIn="false" value="HAVE_RARCH_MAIN_IMPLEMENTATION"/>
<listOptionValue builtIn="false" value="HAVE_VID_CONTEXT"/>
<listOptionValue builtIn="false" value="HAVE_FBO"/>
<listOptionValue builtIn="false" value="HAVE_GRIFFIN"/>
<listOptionValue builtIn="false" value="__LIBRETRO__"/>
<listOptionValue builtIn="false" value="HAVE_DYNAMIC"/>
<listOptionValue builtIn="false" value="HAVE_ZLIB"/>
<listOptionValue builtIn="false" value="__BLACKBERRY_QNX__"/>
<listOptionValue builtIn="false" value="HAVE_OPENGLES"/>
<listOptionValue builtIn="false" value="PACKAGE_VERSION=\&quot;0.9.8.4\&quot;"/>
<listOptionValue builtIn="false" value="HAVE_OPENGLES2"/>
<listOptionValue builtIn="false" value="HAVE_SINC"/>
<listOptionValue builtIn="false" value="HAVE_NULLINPUT"/>
<listOptionValue builtIn="false" value="HAVE_AL"/>
<listOptionValue builtIn="false" value="HAVE_THREADS"/>
<listOptionValue builtIn="false" value="WANT_MINIZ"/>
<listOptionValue builtIn="false" value="HAVE_OVERLAY"/>
<listOptionValue builtIn="false" value="HAVE_GLSL"/>
<listOptionValue builtIn="false" value="USING_GL20"/>
<listOptionValue builtIn="false" value="HAVE_OPENGL"/>
</option>
<option id="com.qnx.qcc.option.compiler.pie.145409477" name="Position Independent Executable (-fPIE)" superClass="com.qnx.qcc.option.compiler.pie" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.compiler.qccoptions.1285267130" name="QCC Options" superClass="com.qnx.qcc.option.compiler.qccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-frecord-gcc-switches"/>
<listOptionValue builtIn="false" value="-mcpu=cortex-a9"/>
<listOptionValue builtIn="false" value="-mfpu=neon"/>
</option>
<option id="com.qnx.qcc.option.compiler.ccoptions.1831340856" name="Compiler Options (-Wc,)" superClass="com.qnx.qcc.option.compiler.ccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-std=gnu99"/>
</option>
<inputType id="com.qnx.qcc.inputType.compiler.472778173" superClass="com.qnx.qcc.inputType.compiler"/>
</tool>
<tool id="com.qnx.qcc.tool.assembler.676105057" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
<inputType id="com.qnx.qcc.inputType.assembler.585345918" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
<tool id="com.qnx.qcc.tool.linker.939866545" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
<option id="com.qnx.qcc.option.linker.libraries.1258752690" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
<listOptionValue builtIn="false" value="bps"/>
<listOptionValue builtIn="false" value="OpenAL"/>
<listOptionValue builtIn="false" value="png"/>
<listOptionValue builtIn="false" value="c"/>
<listOptionValue builtIn="false" value="screen"/>
<listOptionValue builtIn="false" value="EGL"/>
<listOptionValue builtIn="false" value="GLESv2"/>
<listOptionValue builtIn="false" value="freetype"/>
<listOptionValue builtIn="false" value="m"/>
</option>
<option id="com.qnx.qcc.option.linker.libraryPaths.1833953103" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
</option>
<option id="com.qnx.qcc.option.linker.pie.812020863" name="Position Independent Executable (-pie)" superClass="com.qnx.qcc.option.linker.pie" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.security.1849150952" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
<inputType id="com.qnx.qcc.inputType.linker.1440676413" superClass="com.qnx.qcc.inputType.linker">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="com.qnx.qcc.tool.archiver.1239899316" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
</toolChain>
</folderInfo>
<fileInfo id="com.qnx.qcc.configuration.exe.release.237026123.2045481684" name="sinc_neon.S" rcbsApplicability="disable" resourcePath="src/sinc_neon.S" toolsToInvoke="com.qnx.qcc.tool.assembler.676105057.1151143701">
<tool id="com.qnx.qcc.tool.assembler.676105057.1151143701" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler.676105057">
<option id="com.qnx.qcc.option.assembler.qccoptions.42316253" name="QCC Options" superClass="com.qnx.qcc.option.assembler.qccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-mcpu=cortex-a9"/>
<listOptionValue builtIn="false" value="-mfpu=neon"/>
</option>
<inputType id="com.qnx.qcc.inputType.assembler.905354291" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
</fileInfo>
<fileInfo id="com.qnx.qcc.configuration.exe.release.237026123.1399355246" name="utils_neon.S" rcbsApplicability="disable" resourcePath="src/utils_neon.S" toolsToInvoke="com.qnx.qcc.tool.assembler.676105057.276341761">
<tool id="com.qnx.qcc.tool.assembler.676105057.276341761" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler.676105057">
<option id="com.qnx.qcc.option.assembler.qccoptions.1400744511" name="QCC Options" superClass="com.qnx.qcc.option.assembler.qccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-mfpu=neon"/>
<listOptionValue builtIn="false" value="-mcpu=cortex-a9"/>
</option>
<inputType id="com.qnx.qcc.inputType.assembler.1520711664" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
</fileInfo>
<sourceEntries>
<entry excluding="main.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="com.qnx.qcc.configuration.exe.profile.491517832">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.exe.profile.491517832" moduleId="org.eclipse.cdt.core.settings" name="Device-Profile">
<externalSettings/>
<extensions>
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=com.qnx.buildType.profile,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" description="Build for Profiling" id="com.qnx.qcc.configuration.exe.profile.491517832" name="Device-Profile" parent="com.qnx.qcc.configuration.exe.profile">
<folderInfo id="com.qnx.qcc.configuration.exe.profile.491517832." name="/" resourcePath="">
<toolChain id="com.qnx.qcc.toolChain.exe.profile.1940927190" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
<option id="com.qnx.qcc.option.cpu.810106304" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1744556277" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
<builder buildPath="${workspace_loc:/CubeRotate/Device-Profile}" id="com.qnx.nto.220354791" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="com.qnx.nto"/>
<tool commandLinePattern="${COMMAND} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} ${FLAGS}" id="com.qnx.qcc.tool.compiler.578454843" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
<option id="com.qnx.qcc.option.compiler.optlevel.1421628131" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
<option id="com.qnx.qcc.option.compile.debug.995395785" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.compiler.profile2.1637519834" name="Build for Profiling (Function Instrumentation) (-finstrument-functions)" superClass="com.qnx.qcc.option.compiler.profile2" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.compiler.includePath.1145263849" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
<listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
</option>
<option id="com.qnx.qcc.option.compiler.security.1305803908" name="Enhanced Security (-fstack-protector-all)" superClass="com.qnx.qcc.option.compiler.security" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.compiler.defines.213513124" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
<listOptionValue builtIn="false" value="PERF_TEST"/>
<listOptionValue builtIn="false" value="HAVE_NEON"/>
<listOptionValue builtIn="false" value="SINC_LOWER_QUALITY"/>
<listOptionValue builtIn="false" value="HAVE_RARCH_MAIN_IMPLEMENTATION"/>
<listOptionValue builtIn="false" value="HAVE_VID_CONTEXT"/>
<listOptionValue builtIn="false" value="HAVE_FBO"/>
<listOptionValue builtIn="false" value="HAVE_GRIFFIN"/>
<listOptionValue builtIn="false" value="__LIBRETRO__"/>
<listOptionValue builtIn="false" value="HAVE_DYNAMIC"/>
<listOptionValue builtIn="false" value="HAVE_ZLIB"/>
<listOptionValue builtIn="false" value="__BLACKBERRY_QNX__"/>
<listOptionValue builtIn="false" value="HAVE_OPENGLES"/>
<listOptionValue builtIn="false" value="PACKAGE_VERSION=\&quot;0.9.8.4\&quot;"/>
<listOptionValue builtIn="false" value="HAVE_OPENGLES2"/>
<listOptionValue builtIn="false" value="HAVE_SINC"/>
<listOptionValue builtIn="false" value="HAVE_NULLINPUT"/>
<listOptionValue builtIn="false" value="HAVE_AL"/>
<listOptionValue builtIn="false" value="HAVE_THREADS"/>
<listOptionValue builtIn="false" value="WANT_MINIZ"/>
<listOptionValue builtIn="false" value="HAVE_OVERLAY"/>
<listOptionValue builtIn="false" value="HAVE_GLSL"/>
<listOptionValue builtIn="false" value="USING_GL20"/>
<listOptionValue builtIn="false" value="HAVE_OPENGL"/>
</option>
<option id="com.qnx.qcc.option.compiler.qccoptions.1710818030" name="QCC Options" superClass="com.qnx.qcc.option.compiler.qccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-frecord-gcc-switches"/>
<listOptionValue builtIn="false" value="-mcpu=cortex-a9"/>
<listOptionValue builtIn="false" value="-mfpu=neon"/>
</option>
<option id="com.qnx.qcc.option.compiler.ccoptions.814347242" name="Compiler Options (-Wc,)" superClass="com.qnx.qcc.option.compiler.ccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-std=gnu99"/>
</option>
<inputType id="com.qnx.qcc.inputType.compiler.1632181586" superClass="com.qnx.qcc.inputType.compiler"/>
</tool>
<tool id="com.qnx.qcc.tool.assembler.820786892" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
<option id="com.qnx.qcc.option.assembler.debug.1981772840" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
<inputType id="com.qnx.qcc.inputType.assembler.1036437237" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
<tool id="com.qnx.qcc.tool.linker.1612406011" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
<option id="com.qnx.qcc.option.linker.debug.1674789686" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.profile2.317116750" name="Build for Profiling (Function Instrumentation) (-lprofiling)" superClass="com.qnx.qcc.option.linker.profile2" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.libraries.2133360025" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
<listOptionValue builtIn="false" value="bps"/>
<listOptionValue builtIn="false" value="OpenAL"/>
<listOptionValue builtIn="false" value="png"/>
<listOptionValue builtIn="false" value="c"/>
<listOptionValue builtIn="false" value="screen"/>
<listOptionValue builtIn="false" value="EGL"/>
<listOptionValue builtIn="false" value="GLESv2"/>
<listOptionValue builtIn="false" value="freetype"/>
<listOptionValue builtIn="false" value="m"/>
</option>
<option id="com.qnx.qcc.option.linker.libraryPaths.1367143286" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
</option>
<option id="com.qnx.qcc.option.linker.security.1679805773" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
<inputType id="com.qnx.qcc.inputType.linker.292607681" superClass="com.qnx.qcc.inputType.linker">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="com.qnx.qcc.tool.archiver.1845279644" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
</toolChain>
</folderInfo>
<fileInfo id="com.qnx.qcc.configuration.exe.profile.491517832.917116150" name="sinc_neon.S" rcbsApplicability="disable" resourcePath="src/sinc_neon.S" toolsToInvoke="com.qnx.qcc.tool.assembler.820786892.620619437">
<tool id="com.qnx.qcc.tool.assembler.820786892.620619437" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler.820786892">
<option id="com.qnx.qcc.option.assembler.qccoptions.22371541" name="QCC Options" superClass="com.qnx.qcc.option.assembler.qccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-mcpu=cortex-a9"/>
<listOptionValue builtIn="false" value="-mfpu=neon"/>
</option>
<inputType id="com.qnx.qcc.inputType.assembler.761454528" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
</fileInfo>
<fileInfo id="com.qnx.qcc.configuration.exe.profile.491517832.1495032052" name="utils_neon.S" rcbsApplicability="disable" resourcePath="src/utils_neon.S" toolsToInvoke="com.qnx.qcc.tool.assembler.820786892.1413292621">
<tool id="com.qnx.qcc.tool.assembler.820786892.1413292621" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler.820786892">
<option id="com.qnx.qcc.option.assembler.qccoptions.1095049940" name="QCC Options" superClass="com.qnx.qcc.option.assembler.qccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-mfpu=neon"/>
<listOptionValue builtIn="false" value="-mcpu=cortex-a9"/>
</option>
<inputType id="com.qnx.qcc.inputType.assembler.1522990990" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
</fileInfo>
<sourceEntries>
<entry excluding="main.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="com.qnx.qcc.configuration.exe.profile.coverage.511003583">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.exe.profile.coverage.511003583" moduleId="org.eclipse.cdt.core.settings" name="Device-Coverage">
<externalSettings/>
<extensions>
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=com.qnx.buildType.coverage,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" description="Build for Code Coverage" id="com.qnx.qcc.configuration.exe.profile.coverage.511003583" name="Device-Coverage" parent="com.qnx.qcc.configuration.exe.profile.coverage">
<folderInfo id="com.qnx.qcc.configuration.exe.profile.coverage.511003583." name="/" resourcePath="">
<toolChain id="com.qnx.qcc.toolChain.exe.coverage.290877093" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
<option id="com.qnx.qcc.option.cpu.775910002" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.264464274" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
<builder buildPath="${workspace_loc:/CubeRotate/Device-Coverage}" id="com.qnx.nto.1360968012" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="com.qnx.nto"/>
<tool commandLinePattern="${COMMAND} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} ${FLAGS}" id="com.qnx.qcc.tool.compiler.1699204352" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
<option id="com.qnx.qcc.option.compiler.optlevel.692343476" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
<option id="com.qnx.qcc.option.compile.debug.1061058825" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.compiler.coverage.457849293" name="Build for Code Coverage (-Wc,-ftest-coverage -Wc,-fprofile-arcs)" superClass="com.qnx.qcc.option.compiler.coverage" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.compiler.includePath.2069434559" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
<listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
</option>
<option id="com.qnx.qcc.option.compiler.security.521807592" name="Enhanced Security (-fstack-protector-all)" superClass="com.qnx.qcc.option.compiler.security" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.compiler.defines.1725725626" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
<listOptionValue builtIn="false" value="PERF_TEST"/>
<listOptionValue builtIn="false" value="HAVE_NEON"/>
<listOptionValue builtIn="false" value="SINC_LOWER_QUALITY"/>
<listOptionValue builtIn="false" value="HAVE_RARCH_MAIN_IMPLEMENTATION"/>
<listOptionValue builtIn="false" value="HAVE_VID_CONTEXT"/>
<listOptionValue builtIn="false" value="HAVE_FBO"/>
<listOptionValue builtIn="false" value="HAVE_GRIFFIN"/>
<listOptionValue builtIn="false" value="__LIBRETRO__"/>
<listOptionValue builtIn="false" value="HAVE_DYNAMIC"/>
<listOptionValue builtIn="false" value="HAVE_ZLIB"/>
<listOptionValue builtIn="false" value="__BLACKBERRY_QNX__"/>
<listOptionValue builtIn="false" value="HAVE_OPENGLES"/>
<listOptionValue builtIn="false" value="PACKAGE_VERSION=\&quot;0.9.8.4\&quot;"/>
<listOptionValue builtIn="false" value="HAVE_OPENGLES2"/>
<listOptionValue builtIn="false" value="HAVE_SINC"/>
<listOptionValue builtIn="false" value="HAVE_NULLINPUT"/>
<listOptionValue builtIn="false" value="HAVE_AL"/>
<listOptionValue builtIn="false" value="HAVE_THREADS"/>
<listOptionValue builtIn="false" value="WANT_MINIZ"/>
<listOptionValue builtIn="false" value="HAVE_OVERLAY"/>
<listOptionValue builtIn="false" value="HAVE_GLSL"/>
<listOptionValue builtIn="false" value="USING_GL20"/>
<listOptionValue builtIn="false" value="HAVE_OPENGL"/>
</option>
<option id="com.qnx.qcc.option.compiler.qccoptions.793787827" name="QCC Options" superClass="com.qnx.qcc.option.compiler.qccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-frecord-gcc-switches"/>
<listOptionValue builtIn="false" value="-mcpu=cortex-a9"/>
<listOptionValue builtIn="false" value="-mfpu=neon"/>
</option>
<option id="com.qnx.qcc.option.compiler.ccoptions.1878529766" name="Compiler Options (-Wc,)" superClass="com.qnx.qcc.option.compiler.ccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-std=gnu99"/>
</option>
<inputType id="com.qnx.qcc.inputType.compiler.1469526261" superClass="com.qnx.qcc.inputType.compiler"/>
</tool>
<tool id="com.qnx.qcc.tool.assembler.1771923802" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
<option id="com.qnx.qcc.option.assembler.debug.1595223019" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
<inputType id="com.qnx.qcc.inputType.assembler.2129805542" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
<tool id="com.qnx.qcc.tool.linker.1942866882" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
<option id="com.qnx.qcc.option.linker.debug.790242117" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.coverage.73478781" name="Build for Code Coverage (-ftest-coverage -fprofile-arcs -p)" superClass="com.qnx.qcc.option.linker.coverage" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.libraries.1198094350" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
<listOptionValue builtIn="false" value="bps"/>
<listOptionValue builtIn="false" value="OpenAL"/>
<listOptionValue builtIn="false" value="png"/>
<listOptionValue builtIn="false" value="c"/>
<listOptionValue builtIn="false" value="screen"/>
<listOptionValue builtIn="false" value="EGL"/>
<listOptionValue builtIn="false" value="GLESv2"/>
<listOptionValue builtIn="false" value="freetype"/>
<listOptionValue builtIn="false" value="m"/>
</option>
<option id="com.qnx.qcc.option.linker.libraryPaths.496032417" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
</option>
<option id="com.qnx.qcc.option.linker.security.1745797008" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
<inputType id="com.qnx.qcc.inputType.linker.284013832" superClass="com.qnx.qcc.inputType.linker">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="com.qnx.qcc.tool.archiver.284978789" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
</toolChain>
</folderInfo>
<fileInfo id="com.qnx.qcc.configuration.exe.profile.coverage.511003583.73994824" name="sinc_neon.S" rcbsApplicability="disable" resourcePath="src/sinc_neon.S" toolsToInvoke="com.qnx.qcc.tool.assembler.1771923802.156827134">
<tool id="com.qnx.qcc.tool.assembler.1771923802.156827134" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler.1771923802">
<option id="com.qnx.qcc.option.assembler.qccoptions.2051397000" name="QCC Options" superClass="com.qnx.qcc.option.assembler.qccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-mcpu=cortex-a9"/>
<listOptionValue builtIn="false" value="-mfpu=neon"/>
</option>
<inputType id="com.qnx.qcc.inputType.assembler.265652705" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
</fileInfo>
<fileInfo id="com.qnx.qcc.configuration.exe.profile.coverage.511003583.427866523" name="utils_neon.S" rcbsApplicability="disable" resourcePath="src/utils_neon.S" toolsToInvoke="com.qnx.qcc.tool.assembler.1771923802.1770971197">
<tool id="com.qnx.qcc.tool.assembler.1771923802.1770971197" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler.1771923802">
<option id="com.qnx.qcc.option.assembler.qccoptions.80954895" name="QCC Options" superClass="com.qnx.qcc.option.assembler.qccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-mfpu=neon"/>
<listOptionValue builtIn="false" value="-mcpu=cortex-a9"/>
</option>
<inputType id="com.qnx.qcc.inputType.assembler.903006095" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
</fileInfo>
<sourceEntries>
<entry excluding="main.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="com.qnx.qcc.configuration.exe.debug.1423528231">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.exe.debug.1423528231" moduleId="org.eclipse.cdt.core.settings" name="Simulator-Debug">
<externalSettings/>
<extensions>
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" description="" id="com.qnx.qcc.configuration.exe.debug.1423528231" name="Simulator-Debug" parent="com.qnx.qcc.configuration.exe.debug">
<folderInfo id="com.qnx.qcc.configuration.exe.debug.1423528231." name="/" resourcePath="">
<toolChain id="com.qnx.qcc.toolChain.exe.debug.76634438" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.2126292613" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
<builder buildPath="${workspace_loc:/CubeRotate/Simulator-Debug}" id="com.qnx.nto.1609605066" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="com.qnx.nto"/>
<tool commandLinePattern="${COMMAND} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} ${FLAGS}" id="com.qnx.qcc.tool.compiler.1279842281" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
<option id="com.qnx.qcc.option.compiler.optlevel.685085389" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
<option id="com.qnx.qcc.option.compile.debug.1031247323" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.compiler.includePath.414786601" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
<listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
</option>
<option id="com.qnx.qcc.option.compiler.security.157472670" name="Enhanced Security (-fstack-protector-all)" superClass="com.qnx.qcc.option.compiler.security" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.compiler.defines.1166581028" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
<listOptionValue builtIn="false" value="PERF_TEST"/>
<listOptionValue builtIn="false" value="HAVE_NEON"/>
<listOptionValue builtIn="false" value="SINC_LOWER_QUALITY"/>
<listOptionValue builtIn="false" value="HAVE_RARCH_MAIN_IMPLEMENTATION"/>
<listOptionValue builtIn="false" value="HAVE_VID_CONTEXT"/>
<listOptionValue builtIn="false" value="HAVE_FBO"/>
<listOptionValue builtIn="false" value="HAVE_GRIFFIN"/>
<listOptionValue builtIn="false" value="__LIBRETRO__"/>
<listOptionValue builtIn="false" value="HAVE_DYNAMIC"/>
<listOptionValue builtIn="false" value="HAVE_ZLIB"/>
<listOptionValue builtIn="false" value="__BLACKBERRY_QNX__"/>
<listOptionValue builtIn="false" value="HAVE_OPENGLES"/>
<listOptionValue builtIn="false" value="PACKAGE_VERSION=\&quot;0.9.8.4\&quot;"/>
<listOptionValue builtIn="false" value="HAVE_OPENGLES2"/>
<listOptionValue builtIn="false" value="HAVE_SINC"/>
<listOptionValue builtIn="false" value="HAVE_NULLINPUT"/>
<listOptionValue builtIn="false" value="HAVE_AL"/>
<listOptionValue builtIn="false" value="HAVE_THREADS"/>
<listOptionValue builtIn="false" value="WANT_MINIZ"/>
<listOptionValue builtIn="false" value="HAVE_OVERLAY"/>
<listOptionValue builtIn="false" value="HAVE_GLSL"/>
<listOptionValue builtIn="false" value="USING_GL20"/>
<listOptionValue builtIn="false" value="HAVE_OPENGL"/>
</option>
<option id="com.qnx.qcc.option.compiler.qccoptions.1114196710" name="QCC Options" superClass="com.qnx.qcc.option.compiler.qccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-frecord-gcc-switches"/>
<listOptionValue builtIn="false" value="-mcpu=cortex-a9"/>
<listOptionValue builtIn="false" value="-mfpu=neon"/>
</option>
<option id="com.qnx.qcc.option.compiler.ccoptions.1913206296" name="Compiler Options (-Wc,)" superClass="com.qnx.qcc.option.compiler.ccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-std=gnu99"/>
</option>
<inputType id="com.qnx.qcc.inputType.compiler.479331921" superClass="com.qnx.qcc.inputType.compiler"/>
</tool>
<tool id="com.qnx.qcc.tool.assembler.418457356" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
<option id="com.qnx.qcc.option.assembler.debug.2104087013" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
<inputType id="com.qnx.qcc.inputType.assembler.1407803369" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
<tool id="com.qnx.qcc.tool.linker.347466214" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
<option id="com.qnx.qcc.option.linker.debug.60846036" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.libraries.456416978" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
<listOptionValue builtIn="false" value="bps"/>
<listOptionValue builtIn="false" value="OpenAL"/>
<listOptionValue builtIn="false" value="png"/>
<listOptionValue builtIn="false" value="c"/>
<listOptionValue builtIn="false" value="screen"/>
<listOptionValue builtIn="false" value="EGL"/>
<listOptionValue builtIn="false" value="GLESv2"/>
<listOptionValue builtIn="false" value="freetype"/>
<listOptionValue builtIn="false" value="m"/>
</option>
<option id="com.qnx.qcc.option.linker.libraryPaths.1381715984" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
</option>
<option id="com.qnx.qcc.option.linker.security.1319793451" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
<inputType id="com.qnx.qcc.inputType.linker.1580301577" superClass="com.qnx.qcc.inputType.linker">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="com.qnx.qcc.tool.archiver.33373882" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
</toolChain>
</folderInfo>
<fileInfo id="com.qnx.qcc.configuration.exe.debug.1423528231.1764861418" name="sinc_neon.S" rcbsApplicability="disable" resourcePath="src/sinc_neon.S" toolsToInvoke="com.qnx.qcc.tool.assembler.418457356.1915987435">
<tool id="com.qnx.qcc.tool.assembler.418457356.1915987435" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler.418457356">
<option id="com.qnx.qcc.option.assembler.qccoptions.1674282166" name="QCC Options" superClass="com.qnx.qcc.option.assembler.qccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-mcpu=cortex-a9"/>
<listOptionValue builtIn="false" value="-mfpu=neon"/>
</option>
<inputType id="com.qnx.qcc.inputType.assembler.1168981546" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
</fileInfo>
<fileInfo id="com.qnx.qcc.configuration.exe.debug.1423528231.1588526540" name="utils_neon.S" rcbsApplicability="disable" resourcePath="src/utils_neon.S" toolsToInvoke="com.qnx.qcc.tool.assembler.418457356.446091438">
<tool id="com.qnx.qcc.tool.assembler.418457356.446091438" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler.418457356">
<option id="com.qnx.qcc.option.assembler.qccoptions.1401428750" name="QCC Options" superClass="com.qnx.qcc.option.assembler.qccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-mfpu=neon"/>
<listOptionValue builtIn="false" value="-mcpu=cortex-a9"/>
</option>
<inputType id="com.qnx.qcc.inputType.assembler.759344697" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
</fileInfo>
<sourceEntries>
<entry excluding="main.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="com.qnx.qcc.configuration.exe.profile.1740368212">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.exe.profile.1740368212" moduleId="org.eclipse.cdt.core.settings" name="Simulator-Profile">
<externalSettings/>
<extensions>
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=com.qnx.buildType.profile,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" description="Build for Profiling" id="com.qnx.qcc.configuration.exe.profile.1740368212" name="Simulator-Profile" parent="com.qnx.qcc.configuration.exe.profile">
<folderInfo id="com.qnx.qcc.configuration.exe.profile.1740368212." name="/" resourcePath="">
<toolChain id="com.qnx.qcc.toolChain.exe.profile.644425262" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1501332643" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
<builder buildPath="${workspace_loc:/CubeRotate/Simulator-Profile}" id="com.qnx.nto.1697233247" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="com.qnx.nto"/>
<tool commandLinePattern="${COMMAND} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} ${FLAGS}" id="com.qnx.qcc.tool.compiler.2084544149" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
<option id="com.qnx.qcc.option.compiler.optlevel.1872714412" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
<option id="com.qnx.qcc.option.compile.debug.1567415109" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.compiler.profile2.762240993" name="Build for Profiling (Function Instrumentation) (-finstrument-functions)" superClass="com.qnx.qcc.option.compiler.profile2" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.compiler.includePath.946910608" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
<listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
</option>
<option id="com.qnx.qcc.option.compiler.security.817746405" name="Enhanced Security (-fstack-protector-all)" superClass="com.qnx.qcc.option.compiler.security" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.compiler.defines.431450507" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
<listOptionValue builtIn="false" value="PERF_TEST"/>
<listOptionValue builtIn="false" value="HAVE_NEON"/>
<listOptionValue builtIn="false" value="SINC_LOWER_QUALITY"/>
<listOptionValue builtIn="false" value="HAVE_RARCH_MAIN_IMPLEMENTATION"/>
<listOptionValue builtIn="false" value="HAVE_VID_CONTEXT"/>
<listOptionValue builtIn="false" value="HAVE_FBO"/>
<listOptionValue builtIn="false" value="HAVE_GRIFFIN"/>
<listOptionValue builtIn="false" value="__LIBRETRO__"/>
<listOptionValue builtIn="false" value="HAVE_DYNAMIC"/>
<listOptionValue builtIn="false" value="HAVE_ZLIB"/>
<listOptionValue builtIn="false" value="__BLACKBERRY_QNX__"/>
<listOptionValue builtIn="false" value="HAVE_OPENGLES"/>
<listOptionValue builtIn="false" value="PACKAGE_VERSION=\&quot;0.9.8.4\&quot;"/>
<listOptionValue builtIn="false" value="HAVE_OPENGLES2"/>
<listOptionValue builtIn="false" value="HAVE_SINC"/>
<listOptionValue builtIn="false" value="HAVE_NULLINPUT"/>
<listOptionValue builtIn="false" value="HAVE_AL"/>
<listOptionValue builtIn="false" value="HAVE_THREADS"/>
<listOptionValue builtIn="false" value="WANT_MINIZ"/>
<listOptionValue builtIn="false" value="HAVE_OVERLAY"/>
<listOptionValue builtIn="false" value="HAVE_GLSL"/>
<listOptionValue builtIn="false" value="USING_GL20"/>
<listOptionValue builtIn="false" value="HAVE_OPENGL"/>
</option>
<option id="com.qnx.qcc.option.compiler.qccoptions.222033491" name="QCC Options" superClass="com.qnx.qcc.option.compiler.qccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-frecord-gcc-switches"/>
<listOptionValue builtIn="false" value="-mcpu=cortex-a9"/>
<listOptionValue builtIn="false" value="-mfpu=neon"/>
</option>
<option id="com.qnx.qcc.option.compiler.ccoptions.597075648" name="Compiler Options (-Wc,)" superClass="com.qnx.qcc.option.compiler.ccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-std=gnu99"/>
</option>
<inputType id="com.qnx.qcc.inputType.compiler.1830961908" superClass="com.qnx.qcc.inputType.compiler"/>
</tool>
<tool id="com.qnx.qcc.tool.assembler.1153258106" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
<option id="com.qnx.qcc.option.assembler.debug.89625770" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
<inputType id="com.qnx.qcc.inputType.assembler.113638613" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
<tool id="com.qnx.qcc.tool.linker.1483351797" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
<option id="com.qnx.qcc.option.linker.debug.1293285876" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.profile2.234673702" name="Build for Profiling (Function Instrumentation) (-lprofiling)" superClass="com.qnx.qcc.option.linker.profile2" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.libraries.1482926481" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
<listOptionValue builtIn="false" value="bps"/>
<listOptionValue builtIn="false" value="OpenAL"/>
<listOptionValue builtIn="false" value="png"/>
<listOptionValue builtIn="false" value="c"/>
<listOptionValue builtIn="false" value="screen"/>
<listOptionValue builtIn="false" value="EGL"/>
<listOptionValue builtIn="false" value="GLESv2"/>
<listOptionValue builtIn="false" value="freetype"/>
<listOptionValue builtIn="false" value="m"/>
</option>
<option id="com.qnx.qcc.option.linker.libraryPaths.1397065257" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
</option>
<option id="com.qnx.qcc.option.linker.security.203141846" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
<inputType id="com.qnx.qcc.inputType.linker.1574710195" superClass="com.qnx.qcc.inputType.linker">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="com.qnx.qcc.tool.archiver.1366694225" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
</toolChain>
</folderInfo>
<fileInfo id="com.qnx.qcc.configuration.exe.profile.1740368212.104682752" name="sinc_neon.S" rcbsApplicability="disable" resourcePath="src/sinc_neon.S" toolsToInvoke="com.qnx.qcc.tool.assembler.1153258106.1542825132">
<tool id="com.qnx.qcc.tool.assembler.1153258106.1542825132" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler.1153258106">
<option id="com.qnx.qcc.option.assembler.qccoptions.243478792" name="QCC Options" superClass="com.qnx.qcc.option.assembler.qccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-mcpu=cortex-a9"/>
<listOptionValue builtIn="false" value="-mfpu=neon"/>
</option>
<inputType id="com.qnx.qcc.inputType.assembler.1661041727" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
</fileInfo>
<fileInfo id="com.qnx.qcc.configuration.exe.profile.1740368212.489757294" name="utils_neon.S" rcbsApplicability="disable" resourcePath="src/utils_neon.S" toolsToInvoke="com.qnx.qcc.tool.assembler.1153258106.689071036">
<tool id="com.qnx.qcc.tool.assembler.1153258106.689071036" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler.1153258106">
<option id="com.qnx.qcc.option.assembler.qccoptions.221620178" name="QCC Options" superClass="com.qnx.qcc.option.assembler.qccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-mfpu=neon"/>
<listOptionValue builtIn="false" value="-mcpu=cortex-a9"/>
</option>
<inputType id="com.qnx.qcc.inputType.assembler.1133545627" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
</fileInfo>
<sourceEntries>
<entry excluding="main.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="com.qnx.qcc.configuration.exe.profile.coverage.1511241566">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.exe.profile.coverage.1511241566" moduleId="org.eclipse.cdt.core.settings" name="Simulator-Coverage">
<externalSettings/>
<extensions>
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=com.qnx.buildType.coverage,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" description="Build for Code Coverage" id="com.qnx.qcc.configuration.exe.profile.coverage.1511241566" name="Simulator-Coverage" parent="com.qnx.qcc.configuration.exe.profile.coverage">
<folderInfo id="com.qnx.qcc.configuration.exe.profile.coverage.1511241566." name="/" resourcePath="">
<toolChain id="com.qnx.qcc.toolChain.exe.coverage.1041575864" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.687107132" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
<builder buildPath="${workspace_loc:/CubeRotate/Simulator-Coverage}" id="com.qnx.nto.622179974" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="com.qnx.nto"/>
<tool commandLinePattern="${COMMAND} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} ${FLAGS}" id="com.qnx.qcc.tool.compiler.1804299414" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
<option id="com.qnx.qcc.option.compiler.optlevel.1547874153" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
<option id="com.qnx.qcc.option.compile.debug.506984407" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.compiler.coverage.940712331" name="Build for Code Coverage (-Wc,-ftest-coverage -Wc,-fprofile-arcs)" superClass="com.qnx.qcc.option.compiler.coverage" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.compiler.includePath.146866900" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
<listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
</option>
<option id="com.qnx.qcc.option.compiler.security.733048683" name="Enhanced Security (-fstack-protector-all)" superClass="com.qnx.qcc.option.compiler.security" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.compiler.defines.252268326" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
<listOptionValue builtIn="false" value="PERF_TEST"/>
<listOptionValue builtIn="false" value="HAVE_NEON"/>
<listOptionValue builtIn="false" value="SINC_LOWER_QUALITY"/>
<listOptionValue builtIn="false" value="HAVE_RARCH_MAIN_IMPLEMENTATION"/>
<listOptionValue builtIn="false" value="HAVE_VID_CONTEXT"/>
<listOptionValue builtIn="false" value="HAVE_FBO"/>
<listOptionValue builtIn="false" value="HAVE_GRIFFIN"/>
<listOptionValue builtIn="false" value="__LIBRETRO__"/>
<listOptionValue builtIn="false" value="HAVE_DYNAMIC"/>
<listOptionValue builtIn="false" value="HAVE_ZLIB"/>
<listOptionValue builtIn="false" value="__BLACKBERRY_QNX__"/>
<listOptionValue builtIn="false" value="HAVE_OPENGLES"/>
<listOptionValue builtIn="false" value="PACKAGE_VERSION=\&quot;0.9.8.4\&quot;"/>
<listOptionValue builtIn="false" value="HAVE_OPENGLES2"/>
<listOptionValue builtIn="false" value="HAVE_SINC"/>
<listOptionValue builtIn="false" value="HAVE_NULLINPUT"/>
<listOptionValue builtIn="false" value="HAVE_AL"/>
<listOptionValue builtIn="false" value="HAVE_THREADS"/>
<listOptionValue builtIn="false" value="WANT_MINIZ"/>
<listOptionValue builtIn="false" value="HAVE_OVERLAY"/>
<listOptionValue builtIn="false" value="HAVE_GLSL"/>
<listOptionValue builtIn="false" value="USING_GL20"/>
<listOptionValue builtIn="false" value="HAVE_OPENGL"/>
</option>
<option id="com.qnx.qcc.option.compiler.qccoptions.443449954" name="QCC Options" superClass="com.qnx.qcc.option.compiler.qccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-frecord-gcc-switches"/>
<listOptionValue builtIn="false" value="-mcpu=cortex-a9"/>
<listOptionValue builtIn="false" value="-mfpu=neon"/>
</option>
<option id="com.qnx.qcc.option.compiler.ccoptions.333531926" name="Compiler Options (-Wc,)" superClass="com.qnx.qcc.option.compiler.ccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-std=gnu99"/>
</option>
<inputType id="com.qnx.qcc.inputType.compiler.1800311584" superClass="com.qnx.qcc.inputType.compiler"/>
</tool>
<tool id="com.qnx.qcc.tool.assembler.1877634243" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
<option id="com.qnx.qcc.option.assembler.debug.166061824" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
<inputType id="com.qnx.qcc.inputType.assembler.2029110252" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
<tool id="com.qnx.qcc.tool.linker.551801963" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
<option id="com.qnx.qcc.option.linker.debug.1904146116" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.coverage.1717304216" name="Build for Code Coverage (-ftest-coverage -fprofile-arcs -p)" superClass="com.qnx.qcc.option.linker.coverage" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.libraries.1222510627" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
<listOptionValue builtIn="false" value="bps"/>
<listOptionValue builtIn="false" value="OpenAL"/>
<listOptionValue builtIn="false" value="png"/>
<listOptionValue builtIn="false" value="c"/>
<listOptionValue builtIn="false" value="screen"/>
<listOptionValue builtIn="false" value="EGL"/>
<listOptionValue builtIn="false" value="GLESv2"/>
<listOptionValue builtIn="false" value="freetype"/>
<listOptionValue builtIn="false" value="m"/>
</option>
<option id="com.qnx.qcc.option.linker.libraryPaths.1867628370" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
</option>
<option id="com.qnx.qcc.option.linker.security.1635799651" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
<inputType id="com.qnx.qcc.inputType.linker.1740916343" superClass="com.qnx.qcc.inputType.linker">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="com.qnx.qcc.tool.archiver.589338426" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
</toolChain>
</folderInfo>
<fileInfo id="com.qnx.qcc.configuration.exe.profile.coverage.1511241566.367412769" name="sinc_neon.S" rcbsApplicability="disable" resourcePath="src/sinc_neon.S" toolsToInvoke="com.qnx.qcc.tool.assembler.1877634243.2014259569">
<tool id="com.qnx.qcc.tool.assembler.1877634243.2014259569" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler.1877634243">
<option id="com.qnx.qcc.option.assembler.qccoptions.1296125330" name="QCC Options" superClass="com.qnx.qcc.option.assembler.qccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-mcpu=cortex-a9"/>
<listOptionValue builtIn="false" value="-mfpu=neon"/>
</option>
<inputType id="com.qnx.qcc.inputType.assembler.224314631" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
</fileInfo>
<fileInfo id="com.qnx.qcc.configuration.exe.profile.coverage.1511241566.2112190090" name="utils_neon.S" rcbsApplicability="disable" resourcePath="src/utils_neon.S" toolsToInvoke="com.qnx.qcc.tool.assembler.1877634243.1850393434">
<tool id="com.qnx.qcc.tool.assembler.1877634243.1850393434" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler.1877634243">
<option id="com.qnx.qcc.option.assembler.qccoptions.943615142" name="QCC Options" superClass="com.qnx.qcc.option.assembler.qccoptions" valueType="stringList">
<listOptionValue builtIn="false" value="-mfpu=neon"/>
<listOptionValue builtIn="false" value="-mcpu=cortex-a9"/>
</option>
<inputType id="com.qnx.qcc.inputType.assembler.2055061214" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
</fileInfo>
<sourceEntries>
<entry excluding="main.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="CubeRotate.null.476443474" name="CubeRotate"/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
<storageModule moduleId="refreshScope" versionNumber="1">
<resource resourceType="PROJECT" workspacePath="/RetroArch"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
<scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.exe.profile.491517832">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.exe.debug.1423528231">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.exe.profile.1740368212">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.exe.debug.507133694">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.exe.profile.coverage.1511241566">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.exe.release.237026123">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.exe.profile.coverage.511003583">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
</scannerConfigBuildInfo>
</storageModule>
</cproject>

93
playbook/.project Normal file
View File

@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>RetroArch</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
<dictionary>
<key>?name?</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.append_environment</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildArguments</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildCommand</key>
<value>make</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildLocation</key>
<value>${workspace_loc:/CubeRotate/Device-Release}</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.contents</key>
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
<value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
<value>true</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.qnx.tools.bbt.xml.core.bbtXMLValidationBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
<nature>com.qnx.tools.ide.bbt.core.bbtnature</nature>
</natures>
<linkedResources>
<link>
<name>src/griffin.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/console/griffin/griffin.c</locationURI>
</link>
<link>
<name>src/sinc_neon.S</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/audio/sinc_neon.S</locationURI>
</link>
<link>
<name>src/utils_neon.S</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/audio/utils_neon.S</locationURI>
</link>
</linkedResources>
</projectDescription>

View File

@ -0,0 +1,66 @@
#Sun Feb 24 21:20:16 CET 2013
eclipse.preferences.version=1
org.eclipse.cdt.codan.checkers.errnoreturn=Warning
org.eclipse.cdt.codan.checkers.errnoreturn.params={implicit\=>false}
org.eclipse.cdt.codan.checkers.errreturnvalue=Error
org.eclipse.cdt.codan.checkers.errreturnvalue.params={}
org.eclipse.cdt.codan.checkers.noreturn=Error
org.eclipse.cdt.codan.checkers.noreturn.params={implicit\=>false}
org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation=-Error
org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem=-Error
org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem=Warning
org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={}
org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem=Error
org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={}
org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem=Warning
org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={no_break_comment\=>"no break",last_case_param\=>true,empty_case_param\=>false}
org.eclipse.cdt.codan.internal.checkers.CatchByReference=Warning
org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={unknown\=>false,exceptions\=>()}
org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem=-Error
org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem=-Error
org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem=-Error
org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.InvalidArguments=-Error
org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem=-Error
org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem=-Error
org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem=-Error
org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem=-Error
org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker=-Info
org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={pattern\=>"^[a-z]",macro\=>true,exceptions\=>()}
org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem=Warning
org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={}
org.eclipse.cdt.codan.internal.checkers.OverloadProblem=-Error
org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem=-Error
org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem=-Error
org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={}
org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={}
org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem=Warning
org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={macro\=>true,exceptions\=>()}
org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem=Warning
org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={paramNot\=>false}
org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem=Warning
org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={else\=>false,afterelse\=>false}
org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem=-Error
org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem=Warning
org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={macro\=>true}
org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem=Warning
org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={macro\=>true}
org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem=Warning
org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={macro\=>true,exceptions\=>("@(\#)","$Id")}
org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem=-Error
org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}

110
playbook/bar-descriptor.xml Normal file
View File

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<qnx xmlns="http://www.qnx.com/schemas/application/1.0">
<!-- BlackBerry Tablet OS application descriptor file.
Specifies parameters for identifying, installing, and launching native applications on BlackBerry Tablet OS.
-->
<!-- A universally unique application identifier. Must be unique across all BlackBerry Tablet OS applications.
Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
<id>com.RetroArch</id>
<!-- The name that is displayed in the BlackBerry Tablet OS application installer.
May have multiple values for each language. See samples or xsd schema file. Optional. -->
<name>RetroArch</name>
<!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade.
Values can also be 1-part or 2-part. It is not necessary to have a 3-part value.
An updated version of application must have a versionNumber value higher than the previous version. Required. -->
<versionNumber>1.0.0</versionNumber>
<!-- Fourth digit segment of the package version. First three segments are taken from the
<versionNumber> element. Must be an integer from 0 to 2^16-1 -->
<buildId>1</buildId>
<!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. -->
<versionLabel>"v0.9.8.4"</versionLabel>
<!-- Description, displayed in the BlackBerry Tablet OS application installer.
May have multiple values for each language. See samples or xsd schema file. Optional. -->
<description>Multi-emulator/multi-game system application</description>
<!-- Copyright information. Optional. -->
<!-- <copyright></copyright> -->
<!-- Name of author which is used for signing. Must match the developer name of your development certificate. -->
<author>Example Inc.</author>
<!-- Unique author ID assigned by signing authority. Required if using debug tokens. -->
<!-- <authorId>ABC1234YjsnUk235h</authorId> -->
<initialWindow>
<systemChrome>none</systemChrome>
<transparent>false</transparent>
</initialWindow>
<!-- The category where the application appears. Either core.games or core.media. -->
<category>core.games</category>
<asset path="icon.png">icon.png</asset>
<asset path="retroarch.cfg">retroarch.cfg</asset>
<asset path="test.so">lib/test.so</asset>
<!-- <asset path="LICENSE">LICENSE</asset> -->
<!-- <asset path="NOTICE">NOTICE</asset> -->
<configuration id="com.qnx.qcc.configuration.exe.debug.507133694" name="Device-Debug">
<platformArchitecture>armle-v7</platformArchitecture>
<asset path="Device-Debug/RetroArch" entry="true" type="Qnx/Elf">RetroArch</asset>
</configuration>
<configuration id="com.qnx.qcc.configuration.exe.release.237026123" name="Device-Release">
<platformArchitecture>armle-v7</platformArchitecture>
<asset path="Device-Release/RetroArch" entry="true" type="Qnx/Elf">RetroArch</asset>
</configuration>
<configuration id="com.qnx.qcc.configuration.exe.profile.491517832" name="Device-Profile">
<platformArchitecture>armle-v7</platformArchitecture>
<asset path="Device-Profile/RetroArch" entry="true" type="Qnx/Elf">RetroArch</asset>
</configuration>
<configuration id="com.qnx.qcc.configuration.exe.profile.coverage.511003583" name="Device-Coverage">
<platformArchitecture>armle-v7</platformArchitecture>
<asset path="Device-Coverage/RetroArch" entry="true" type="Qnx/Elf">RetroArch</asset>
</configuration>
<configuration id="com.qnx.qcc.configuration.exe.debug.1423528231" name="Simulator-Debug">
<platformArchitecture>x86</platformArchitecture>
<asset path="Simulator-Debug/RetroArch" entry="true" type="Qnx/Elf">RetroArch</asset>
</configuration>
<configuration id="com.qnx.qcc.configuration.exe.profile.1740368212" name="Simulator-Profile">
<platformArchitecture>x86</platformArchitecture>
<asset path="Simulator-Profile/RetroArch" entry="true" type="Qnx/Elf">RetroArch</asset>
</configuration>
<configuration id="com.qnx.qcc.configuration.exe.profile.coverage.1511241566" name="Simulator-Coverage">
<platformArchitecture>x86</platformArchitecture>
<asset path="Simulator-Coverage/RetroArch" entry="true" type="Qnx/Elf">RetroArch</asset>
</configuration>
<!-- The icon for the application, which should be 86x86. -->
<icon>
<image>icon.png</image>
</icon>
<!-- The splash screen that will appear when your application is launching. Should be 1024x600. -->
<!-- <splashscreen></splashscreen> -->
<!-- Request permission to execute native code. Required for native applications. -->
<action system="true">run_native</action>
<!-- The permissions requested by your application. -->
<action>access_shared</action>
<!-- <action>record_audio</action> -->
<!-- <action>read_geolocation</action> -->
<!-- <action>use_camera</action> -->
<!-- <action>access_internet</action> -->
<!-- <action>play_audio</action> -->
<!-- <action>post_notification</action> -->
<!-- <action>set_audio_volume</action> -->
<!-- <action>read_device_identifying_information</action> -->
<!-- Ensure that shared libraries in the package are found at run-time. -->
<env var="LD_LIBRARY_PATH" value="app/native/lib"/>
</qnx>

BIN
playbook/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

1006
playbook/src/bbutil.c Normal file

File diff suppressed because it is too large Load Diff

132
playbook/src/bbutil.h Normal file
View File

@ -0,0 +1,132 @@
/*
* Copyright (c) 2011-2012 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _UTILITY_H_INCLUDED
#define _UTILITY_H_INCLUDED
#include <EGL/egl.h>
#include <screen/screen.h>
#include <sys/platform.h>
extern EGLDisplay egl_disp;
extern EGLSurface egl_surf;
typedef struct font_t font_t;
#define BBUTIL_DEFAULT_FONT "/usr/fonts/font_repository/monotype/arial.ttf"
#ifdef __cplusplus
extern "C" {
#endif
/**
* Initializes EGL
*
* @param libscreen context that will be used for EGL setup
* @return EXIT_SUCCESS if initialization succeeded otherwise EXIT_FAILURE
*/
int bbutil_init_egl(screen_context_t ctx);
/**
* Terminates EGL
*/
void bbutil_terminate();
/**
* Swaps default bbutil window surface to the screen
*/
void bbutil_swap();
/**
* Loads the font from the specified font file.
* NOTE: should be called after a successful return from bbutil_init() or bbutil_init_egl() call
* @param font_file string indicating the absolute path of the font file
* @param point_size used for glyph generation
* @param dpi used for glyph generation
* @return pointer to font_t structure on success or NULL on failure
*/
font_t* bbutil_load_font(const char* font_file, int point_size, int dpi);
/**
* Destroys the passed font
* @param font to be destroyed
*/
void bbutil_destroy_font(font_t* font);
/**
* Renders the specified message using current font starting from the specified
* bottom left coordinates.
* NOTE: must be called after a successful return from bbutil_init() or bbutil_init_egl() call
*
* @param font to use for rendering
* @param msg the message to display
* @param x, y position of the bottom-left corner of text string in world coordinate space
* @param rgba color for the text to render with
*/
void bbutil_render_text(font_t* font, const char* msg, float x, float y, float r, float g, float b, float a);
/**
* Returns the non-scaled width and height of a string
* NOTE: must be called after a successful return from bbutil_init() or bbutil_init_egl() call
*
* @param font to use for measurement of a string size
* @param msg the message to get the size of
* @param return pointer for width of a string
* @param return pointer for height of a string
*/
void bbutil_measure_text(font_t* font, const char* msg, float* width, float* height);
/**
* Creates and loads a texture from a png file
* NOTE: must be called after a successful return from bbutil_init() or bbutil_init_egl() call
*
* @param filename path to texture png
* @param return width of texture
* @param return height of texture
* @param return gl texture handle
* @return EXIT_SUCCESS if texture loading succeeded otherwise EXIT_FAILURE
*/
int bbutil_load_texture(const char* filename, int* width, int* height, float* tex_x, float* tex_y, unsigned int* tex);
/**
* Returns dpi for a given screen
*
* @param ctx path libscreen context that corresponds to display of interest
* @return dpi for a given screen
*/
int bbutil_calculate_dpi(screen_context_t ctx);
/**
* Rotates the screen to a given angle
*
* @param angle to rotate screen surface to, must by 0, 90, 180, or 270
* @return EXIT_SUCCESS if texture loading succeeded otherwise EXIT_FAILURE
*/
int bbutil_rotate_screen_surface(int angle);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -210,14 +210,11 @@ static void ps3_input_poll(void *data)
if (!(g_extern.frame_count < g_extern.delay_timer[0]))
{
if ((*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3)) && (*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3)))
{
*lifecycle_state |= (1ULL << RARCH_RMENU_TOGGLE);
*lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
}
if (!(*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3)) && (*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3)))
{
*lifecycle_state |= (1ULL << RARCH_RMENU_TOGGLE);
*lifecycle_state |= (1ULL << RARCH_RMENU_QUICKMENU_TOGGLE);
*lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
}
}

View File

@ -46,13 +46,6 @@
#include "msvc/msvc_compat.h"
#endif
#ifdef __APPLE__
#include "SDL.h"
// OSX seems to really need -lSDLmain,
// so we include SDL.h here so it can hack our main.
// We want to use -mconsole in Win32, so we need main().
#endif
#if defined(RARCH_CONSOLE) && !defined(RARCH_PERFORMANCE_MODE)
#define RARCH_PERFORMANCE_MODE
#endif
@ -576,10 +569,8 @@ static int16_t input_state(unsigned port, unsigned device, unsigned index, unsig
#ifdef _WIN32
#define RARCH_DEFAULT_CONF_PATH_STR "\n\t\tDefaults to retroarch.cfg in same directory as retroarch.exe."
#elif defined(__APPLE__)
#define RARCH_DEFAULT_CONF_PATH_STR " Defaults to $HOME/.retroarch.cfg."
#else
#define RARCH_DEFAULT_CONF_PATH_STR " Defaults to $XDG_CONFIG_HOME/retroarch/retroarch.cfg,\n\t\tor $HOME/.retroarch.cfg, if $XDG_CONFIG_HOME is not defined."
#define RARCH_DEFAULT_CONF_PATH_STR "\n\t\tBy default looks for config in $XDG_CONFIG_HOME/retroarch/retroarch.cfg,\n\t\t$HOME/.config/retroarch/retroarch.cfg,\n\t\tand $HOME/.retroarch.cfg."
#endif
#include "config.features.h"
@ -646,7 +637,10 @@ static void print_compiler(FILE *file)
static void print_help(void)
{
puts("===================================================================");
#ifndef __BLACKBERRY_QNX__
/* To get around error 'too many decimal points in number - expected ')' before numeric constant */
puts("RetroArch: Frontend for libretro -- v" PACKAGE_VERSION " --");
#endif
print_compiler(stdout);
puts("===================================================================");
puts("Usage: retroarch [rom file] [options...]");
@ -2853,12 +2847,6 @@ error:
return 1;
}
static inline bool rarch_main_paused(void)
{
return g_extern.is_paused && !g_extern.is_oneshot;
}
bool rarch_main_iterate(void)
{
#ifdef HAVE_DYLIB
@ -2877,25 +2865,26 @@ bool rarch_main_iterate(void)
}
// Time to drop?
if (input_key_pressed_func(RARCH_QUIT_KEY) ||
!video_alive_func())
if (input_key_pressed_func(RARCH_QUIT_KEY) || !video_alive_func())
{
#ifdef HAVE_RMENU
bool rmenu_enable = input_key_pressed_func(RARCH_RMENU_TOGGLE);
if (input_key_pressed_func(RARCH_RMENU_QUICKMENU_TOGGLE))
g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU_INGAME);
if (rmenu_enable || ((g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_INGAME)) && !rmenu_enable))
{
g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU);
g_extern.delay_timer[0] = g_extern.frame_count + 30;
}
else
g_extern.lifecycle_mode_state |= (1ULL << MODE_EXIT);
g_extern.lifecycle_mode_state |= (1ULL << MODE_EXIT);
#endif
return false;
}
#ifdef HAVE_RMENU
if (input_key_pressed_func(RARCH_RMENU_TOGGLE) && !(g_extern.frame_count < g_extern.delay_timer[0]))
{
if (input_key_pressed_func(RARCH_RMENU_QUICKMENU_TOGGLE))
g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU_INGAME);
g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU);
g_extern.delay_timer[0] = g_extern.frame_count + 30;
return false;
}
#endif
#ifdef HAVE_COMMAND
if (driver.command)
rarch_cmd_pre_frame(driver.command);
@ -3000,6 +2989,7 @@ void rarch_main_deinit(void)
}
#define MAX_ARGS 32
int rarch_main_init_wrap(const struct rarch_main_wrap *args)
{
if (g_extern.main_is_init)
@ -3059,46 +3049,18 @@ int rarch_main_init_wrap(const struct rarch_main_wrap *args)
return ret;
}
#ifndef HAVE_RARCH_MAIN_WRAP
static bool rarch_main_idle_iterate(void)
bool rarch_main_idle_iterate(void)
{
#ifdef HAVE_COMMAND
if (driver.command)
rarch_cmd_pre_frame(driver.command);
#endif
if (input_key_pressed_func(RARCH_QUIT_KEY) ||
!video_alive_func())
if (input_key_pressed_func(RARCH_QUIT_KEY) || !video_alive_func())
return false;
do_state_checks();
input_poll();
rarch_sleep(10);
return true;
}
int rarch_main(int argc, char *argv[])
{
int init_ret;
if ((init_ret = rarch_main_init(argc, argv))) return init_ret;
rarch_init_msg_queue();
while (rarch_main_paused() ? rarch_main_idle_iterate() : rarch_main_iterate());
rarch_main_deinit();
rarch_deinit_msg_queue();
#ifdef PERF_TEST
rarch_perf_log();
#endif
rarch_main_clear_state();
return 0;
}
// Consoles use the higher level API.
int main(int argc, char *argv[])
{
return rarch_main(argc, argv);
}
#endif

View File

@ -239,6 +239,7 @@ void config_set_defaults(void)
g_settings.input.debug_enable = input_debug_enable;
#ifdef ANDROID
g_settings.input.autodetect_enable = input_autodetect_enable;
g_settings.input.back_behavior = BACK_BUTTON_QUIT;
#endif
for (int i = 0; i < MAX_PLAYERS; i++)
@ -329,36 +330,37 @@ static config_file_t *open_default_config_file(void)
conf = config_file_new(conf_path);
}
}
#elif defined(__APPLE__)
char conf_path[PATH_MAX];
const char *home = getenv("HOME");
if (home)
{
snprintf(conf_path, sizeof(conf_path), "%s/.retroarch.cfg", home);
conf = config_file_new(conf_path);
}
if (!conf)
conf = config_file_new("/etc/retroarch.cfg");
#elif !defined(__CELLOS_LV2__) && !defined(_XBOX)
char conf_path[PATH_MAX];
const char *xdg = getenv("XDG_CONFIG_HOME");
if (!xdg)
RARCH_WARN("XDG_CONFIG_HOME is not defined. Will look for config in $HOME/.retroarch.cfg ...\n");
const char *xdg = getenv("XDG_CONFIG_HOME");
const char *home = getenv("HOME");
// XDG_CONFIG_HOME falls back to $HOME/.config.
if (xdg)
{
snprintf(conf_path, sizeof(conf_path), "%s/retroarch/retroarch.cfg", xdg);
else if (home)
snprintf(conf_path, sizeof(conf_path), "%s/.config/retroarch/retroarch.cfg", home);
if (xdg || home)
{
RARCH_LOG("Looking for config in: \"%s\".\n", conf_path);
conf = config_file_new(conf_path);
}
else if (home)
// Fallback to $HOME/.retroarch.cfg.
if (!conf && home)
{
snprintf(conf_path, sizeof(conf_path), "%s/.retroarch.cfg", home);
RARCH_LOG("Looking for config in: \"%s\".\n", conf_path);
conf = config_file_new(conf_path);
}
// Try this as a last chance...
// Try this as a last chance ...
if (!conf)
{
conf = config_file_new("/etc/retroarch.cfg");
RARCH_LOG("Looking for config in: \"/etc/retroarch.cfg\".\n");
}
#endif
return conf;
@ -698,6 +700,7 @@ bool config_load_file(const char *path)
#ifdef ANDROID
CONFIG_GET_BOOL(input.autodetect_enable, "input_autodetect_enable");
CONFIG_GET_INT(input.back_behavior, "input_back_behavior");
CONFIG_GET_INT(input.icade_profile[0], "input_autodetect_icade_profile_pad1");
CONFIG_GET_INT(input.icade_profile[1], "input_autodetect_icade_profile_pad2");
CONFIG_GET_INT(input.icade_profile[2], "input_autodetect_icade_profile_pad3");
@ -1198,6 +1201,7 @@ bool config_save_file(const char *path)
config_set_string(conf, "audio_resampler", g_settings.audio.resampler);
#ifdef ANDROID
config_set_int(conf, "input_back_behavior", input.back_behavior);
config_set_int(conf, "input_autodetect_icade_profile_pad1", input.icade_profile[0]);
config_set_int(conf, "input_autodetect_icade_profile_pad2", input.icade_profile[1]);
config_set_int(conf, "input_autodetect_icade_profile_pad3", input.icade_profile[2]);

View File

@ -1,243 +1,249 @@
# PS1 Dualanalog Games ;
"ps1.007 Racing*" mednafen-psx dualanalog ;
"ps1.007 - The World Is Not Enough*" mednafen-psx dualanalog ;
"ps1.007 - Tomorrow Never Dies*" mednafen-psx dualanalog ;
"ps1.40 Winks*" mednafen-psx dualanalog ;
"ps1.Ace Combat*" mednafen-psx dualanalog ;
"ps1.Aces of the Air*" mednafen-psx dualanalog ;
"ps1.Action Bass*" mednafen-psx dualanalog ;
"ps1.Action Man - Operation Extreme*" mednafen-psx dualanalog ;
"ps1.Advanced V.G. 2*" mednafen-psx dualanalog ;
"ps1.Aironauts*" mednafen-psx dualanalog ;
"ps1.Air Race Championship*" mednafen-psx dualanalog ;
"ps1.Akuji - The Heartless*" mednafen-psx dualanalog ;
"ps1.Alfred Chicken*" mednafen-psx dualanalog ;
"ps1.Alien la Resurrection*" mednafen-psx dualanalog ;
"ps1.Alien Resurrection*" mednafen-psx dualanalog ;
"ps1.Alone In The Dark - The New Nightmare*" mednafen-psx dualanalog ;
"ps1.Alundra 2*" mednafen-psx dualanalog ;
"ps1.Amazing Virtual Sea Monkeys*" mednafen-psx dualanalog ;
"ps1.Animorphs - Shattered Reality*" mednafen-psx dualanalog ;
"ps1.Ape Escape*" mednafen-psx dualanalog ;
"ps1.Apocalypse*" mednafen-psx dualanalog ;
"ps1.Aqua GT*" mednafen-psx dualanalog ;
"ps1.Armored Core - Master of Arena*" mednafen-psx dualanalog ;
"ps1.Armorines - Project Swarm*" mednafen-psx dualanalog ;
"ps1.Army Men 3D*" mednafen-psx dualanalog ;
"ps1.Army Men - Air Attack 2*" mednafen-psx dualanalog ;
"ps1.Army Men - Air Attack*" mednafen-psx dualanalog ;
"ps1.Army Men - Green Rouge*" mednafen-psx dualanalog ;
"ps1.Army Men - Sarge's Heroes 2*" mednafen-psx dualanalog ;
"ps1.Army Men - Sarge's Heroes*" mednafen-psx dualanalog ;
"ps1.Army Men - World War*" mednafen-psx dualanalog ;
"ps1.Assault Retribution*" mednafen-psx dualanalog ;
"ps1.Asterix - Mega Madness*" mednafen-psx dualanalog ;
"ps1.Asteroids*" mednafen-psx dualanalog ;
"ps1.Barbie Explorer" mednafen-psx dualanalog ;
"ps1.Barbie - Gotta Have Games" mednafen-psx dualanalog ;
"ps1.Batman Beyond - Return of the Joker" mednafen-psx dualanalog ;
"ps1.Batman & Robin" mednafen-psx dualanalog ;
"ps1.Beatmania" mednafen-psx dualanalog ;
"ps1.Beat Planet Music" mednafen-psx dualanalog ;
"ps1.Beyblade" mednafen-psx dualanalog ;
"ps1.Big Bass Fishing" mednafen-psx dualanalog ;
"ps1.BioHazard - Director's Cut - Dual Shock*" mednafen-psx dualanalog ;
"ps1.Bishi Bashi Special" mednafen-psx dualanalog ;
"ps1.Blade" mednafen-psx dualanalog ;
"ps1.Blasto!" mednafen-psx dualanalog ;
"ps1.Blast Radius" mednafen-psx dualanalog ;
"ps1.Block Kuzushi" mednafen-psx dualanalog ;
"ps1.Block Wars" mednafen-psx dualanalog ;
"ps1.Bloody Roar 2*" mednafen-psx dualanalog ;
"ps1.Bob the Builder - Can We Fix It" mednafen-psx dualanalog ;
"ps1.Boombots" mednafen-psx dualanalog ;
"ps1.Bratz" mednafen-psx dualanalog ;
"ps1.Brave Fencer Musashi*" mednafen-psx dualanalog ;
"ps1.Breakout" mednafen-psx dualanalog ;
"ps1.Buggy" mednafen-psx dualanalog ;
"ps1.Bugs Bunny - Lost in Time*" mednafen-psx dualanalog ;
"ps1.Bugs Bunny & Taz - Time Busters" mednafen-psx dualanalog ;
"ps1.C-12 - The Final Resistance" mednafen-psx dualanalog ;
"ps1.Captain Commando" mednafen-psx dualanalog ;
"ps1.Cardinal Syn*" mednafen-psx dualanalog ;
"ps1.Carmageddon*" mednafen-psx dualanalog ;
"ps1.Casper - Friends Around The World" mednafen-psx dualanalog ;
"ps1.Chaos Break" mednafen-psx dualanalog ;
"ps1.Chicken Run" mednafen-psx dualanalog ;
"ps1.Chippoke Ralph no Daibouken (Adventure of Little Ralph)" mednafen-psx dualanalog ;
"ps1.Chocobo Racing" mednafen-psx dualanalog ;
"ps1.Chrono Cross*" pcsxr dualanalog ;
"ps1.Colin Mc[rR]ae*" mednafen-psx dualanalog ;
"ps1.Colony Wars*" mednafen-psx dualanalog ;
"ps1.Cosmowarrior Rei" mednafen-psx dualanalog ;
"ps1.Cowboy Bebop" mednafen-psx dualanalog ;
"ps1.Crash Bandicoot 2*" mednafen-psx dualanalog ;
"ps1.Crash Bandicoot 3*" mednafen-psx dualanalog ;
"ps1.Crash Bandicoot Carnival - Crash Bash*" mednafen-psx dualanalog ;
"ps1.Crash Bash Demo" mednafen-psx dualanalog ;
"ps1.Crash Bash" mednafen-psx dualanalog ;
"ps1.Crash Bash" mednafen-psx dualanalog ;
"ps1.Crash Bash & Spyro - Year of the Dragon Demo" mednafen-psx dualanalog ;
"ps1.Crash Team Racing*" mednafen-psx dualanalog multitap ;
"ps1.Crisis Beat" mednafen-psx dualanalog ;
"ps1.Croc 2*" mednafen-psx dualanalog ;
"ps1.Croc - Legend of the Gobbos" mednafen-psx dualanalog ;
"ps1.C - The Contra Adventure" mednafen-psx dualanalog ;
"ps1.CT Special Forces" mednafen-psx dualanalog ;
"ps1.CyberTiger Golf" mednafen-psx dualanalog ;
"ps1.Fighting Force*" mednafen-psx dualanalog ;
"ps1.Future Cop*" mednafen-psx dualanalog ;
"ps1.Legacy of Kain - Soul Reaver*" pcsxr dualanalog ;
"ps1.Saru! Get You!*" mednafen-psx dualanalog ;
"ps1.Simple Characters 2000 Series #02 - Afro Inu - The Puzzle*" mednafen-psx dualanalog ;
"ps1.Soul Reaver - Legacy of Kain*" mednafen-psx dualanalog ;
"ps1.Spyro the Dragon*"" mednafen-psx dualanalog ;
"ps1.Spyro - Year of the Dragon*" mednafen-psx dualanalog ;
"ps1.Vagrant Story*" mednafen-psx dualanalog ;
"ps1.Earthworm Jim 2" pcsxr ;
"ps1.Mickey's Wild Adventures" pcsxr ;
# SNES BSNES Performance ;
"snes.
"ps1.Earthworm Jim 2" pcsxr ;
"ps1.Mickey's Wild Adventures" pcsxr ;
# SNES BSNES Performance ;
"snes.Psycho Dream*" bsnes-performance ;
# SNES Multitap Games ;
"snes.Bakukyuu Renpatsu!! Super B-Daman*" snes9x multitap ;
"snes.Bakutou Dochers - Bumps-jima wa Oosawagi*" snes9x multitap ;
"snes.Barkley Shut Up and Jam!*" snes9x multitap ;
"snes.Barkley Shut Up and Jam!*" snes9x multitap ;
"snes.Battle Cross*" snes9x multitap ;
"snes.Battle Jockey*" snes9x multitap ;
"snes.Bill Walsh College Football*" snes9x multitap ;
"snes.Capcom's Soccer Shootout*" snes9x multitap ;
"snes.College Slam*" snes9x multitap ;
"snes.Crystal Beans From Dungeon Explorer*" snes9x multitap ;
"snes.Dragon - The Bruce Lee Story*" snes9x multitap ;
"snes.Dream Basketball - Dunk and Hoop*" snes9x multitap ;
"snes.Dynamic Stadium*" snes9x multitap ;
"snes.ESPN National Hockey Night*" snes9x multitap ;
"snes.FIFA 98*" snes9x multitap ;
"snes.FIFA International Soccer*" snes9x multitap ;
"snes.FIFA Soccer 96*" snes9x multitap ;
"snes.FIFA Soccer 97*" snes9x multitap ;
"snes.Final Set*" snes9x multitap ;
"snes.Fire Striker*" snes9x multitap ;
"snes.From TV Animation Slam Dunk - SD Heat Up!!*" snes9x multitap ;
"snes.Go! Go! Dodge League*" snes9x multitap ;
"snes.Hammerlock Wrestling*" snes9x multitap ;
"snes.Hat Trick Hero 2*" snes9x multitap ;
"snes.Head-On Soccer*" snes9x multitap ;
"snes.Hebereke no Oishii Puzzle ha Irimasenka*" snes9x multitap ;
"snes.Human Grand Prix III - F1 Triple Battle*" snes9x multitap ;
"snes.Human Grand Prix IV - F1 Dream Battle*" snes9x multitap ;
"snes.Hungry Dinosaurs*" snes9x multitap ;
"snes.International Superstar Soccer Deluxe*" snes9x multitap ;
"snes.J.League Excite Stage '94*" snes9x multitap ;
"snes.J.League Excite Stage '95*" snes9x multitap ;
"snes.J.League Excite Stage '96*" snes9x multitap ;
"snes.J.League Super Soccer '95*" snes9x multitap ;
"snes.J.League Super Soccer*" snes9x multitap ;
"snes.JWP Joshi Pro Wrestling - Pure Wrestle Queens*" snes9x multitap ;
"snes.Jikkyou Power Pro Wrestling '96*" snes9x multitap ;
"snes.Jimmy Connors Pro Tennis Tour*" snes9x multitap ;
"snes.Kunio-kun no Dodge Ball dayo Zenin Shuugou!*" snes9x multitap ;
"snes.Looney Tunes Basketball*" snes9x multitap ;
"snes.Madden NFL '94*" snes9x multitap ;
"snes.Madden NFL '95*" snes9x multitap ;
"snes.Madden NFL '96*" snes9x multitap ;
"snes.Madden NFL '97*" snes9x multitap ;
"snes.Madden NFL '98*" snes9x multitap ;
"snes.Micro Machines 2 - Turbo Tournament*" snes9x multitap ;
"snes.Micro Machines*" snes9x multitap ;
"snes.Mizuki Shigeru no Youkai Hyakkiyakou*" snes9x multitap ;
"snes.Multi Play Volleyball*" snes9x multitap ;
"snes.NBA Give 'N Go*" snes9x multitap ;
"snes.NBA Hang Time*" snes9x multitap ;
"snes.NBA Jam - Tournament Edition*" snes9x multitap ;
"snes.NBA Jam*" snes9x multitap ;
"snes.NBA Live 95*" snes9x multitap ;
"snes.NBA Live 96*" snes9x multitap ;
"snes.NBA Live 97*" snes9x multitap ;
"snes.NBA Live 98*" snes9x multitap ;
"snes.NCAA Final Four Basketball*" snes9x multitap ;
"snes.NCAA Football*" snes9x multitap ;
"snes.NFL Quarterback Club 96*" snes9x multitap ;
"snes.NFL Quarterback Club*" snes9x multitap ;
"snes.NHL '94*" snes9x multitap ;
"snes.NHL '98*" snes9x multitap ;
"snes.NHL Pro Hockey '94*" snes9x multitap ;
"snes.Natsume Championship Wrestling*" snes9x multitap ;
"snes.Peace Keepers, The*" snes9x multitap ;
"snes.Pieces*" snes9x multitap ;
"snes.Rap Jam - Volume One*" snes9x multitap ;
"snes.Saturday Night Slam Masters*" snes9x multitap ;
"snes.Secret of Mana*" snes9x multitap ;
"snes.Shin Nippon Pro Wrestling '94 - Battlefield in Tokyo Dome*" snes9x multitap ;
"snes.Shin Nippon Pro Wrestling - Chou Senshi in Tokyo Dome*" snes9x multitap ;
"snes.Shin Nippon Pro Wrestling Kounin '95 - Tokyo Dome Battle 7*" snes9x multitap ;
"snes.Smash Tennis*" snes9x multitap ;
"snes.Sporting News, The - Power Baseball*" snes9x multitap ;
"snes.Sterling Sharpe End 2 End*" snes9x multitap ;
"snes.Street Hockey '95*" snes9x multitap ;
"snes.Street Racer*" snes9x multitap ;
"snes.Sugoi Hebereke*" snes9x multitap ;
"snes.Sugoro Quest++ Dicenics*" snes9x multitap ;
"snes.Super Bomberman - Panic Bomber W*" snes9x multitap ;
"snes.Super Bomberman 2*" snes9x multitap ;
"snes.Super Bomberman 3*" snes9x multitap ;
"snes.Super Bomberman 4*" snes9x multitap ;
"snes.Super Bomberman 5*" snes9x multitap ;
"snes.Super Bomberman*" snes9x multitap ;
"snes.Super Fire Pro Wrestling - Queen's Special*" snes9x multitap ;
"snes.Super Fire Pro Wrestling Special*" snes9x multitap ;
"snes.Super Fire Pro Wrestling X Premium*" snes9x multitap ;
"snes.Super Fire Pro Wrestling X*" snes9x multitap ;
"snes.Super Formation Soccer 94 - World Cup Final Data*" snes9x multitap ;
"snes.Super Formation Soccer 94*" snes9x multitap ;
"snes.Super Formation Soccer 95 della Serie A - UCC Xaqua*" snes9x multitap ;
"snes.Super Formation Soccer 95 della Serie A*" snes9x multitap ;
"snes.Super Formation Soccer 96*" snes9x multitap ;
"snes.Super Formation Soccer II*" snes9x multitap ;
"snes.Super Ice Hockey*" snes9x multitap ;
"snes.Super Kyousouba - Kaze no Sylphid*" snes9x multitap ;
"snes.Super Power League*" snes9x multitap ;
"snes.Super Tekkyuu Fight!*" snes9x multitap ;
"snes.Super Tetris 3*" snes9x multitap ;
"snes.Syndicate*" snes9x multitap ;
"snes.Tenryu Genichiro no Pro Wrestling Revolution*" snes9x multitap ;
"snes.Tiny Toon Adventures - Wild & Wacky Sports*" snes9x multitap ;
"snes.Top Gear 3000*" snes9x multitap ;
"snes.Turbo Toons*" snes9x multitap ;
"snes.Virtual Soccer*" snes9x multitap ;
"snes.Vs. Collection*" snes9x multitap ;
"snes.WWF Raw*" snes9x multitap ;
"snes.Yuujin no Furi Furi Girls*" snes9x multitap ;
"snes.Zero 4 Champ RR-Z*" snes9x multitap ;
"snes.Zero 4 Champ RR*" snes9x multitap ;
# Defaults ;
"gba.*" vba ;
"gbc.*" gambatte ;
"gb.*" gambatte ;
"gg.*" genplus ;
"nes.*" fceu ;
"pcecd.*" mednafen-pce-fast ;
"pce.*" mednafen-pce-fast ;
"ps1.*" mednafen-psx ;
"wswan.*" mednafen-wswan ;
"a26.*" stella ;
"scd.*" genplus ;
"sg1000.*" genplus ;
"smd.*" genplus ;
"sms.*" genplus ;
"snes.*" snes9x ;
"nds.*" desmume ;
# PS1 Gamepad Games ;
"ps1....Iru!*" mednafen-psx gamepad ;
# PS1 Dualanalog Games ;
"ps1.007 - Demain ne Meurt Jamais" mednafen-psx dualanalog ;
"ps1.007 - Le Monde Ne Suffit Pas" mednafen-psx dualanalog ;
"ps1.007 Racing*" mednafen-psx dualanalog ;
"ps1.007 - The World Is Not Enough*" mednafen-psx dualanalog ;
"ps1.007 - Tomorrow Never Dies*" mednafen-psx dualanalog ;
"ps1.40 Winks*" mednafen-psx dualanalog ;
"ps1.Ace Combat*" mednafen-psx dualanalog ;
"ps1.Aces of the Air*" mednafen-psx dualanalog ;
"ps1.Action Bass*" mednafen-psx dualanalog ;
"ps1.Action Man - Operation Extreme*" mednafen-psx dualanalog ;
"ps1.Advanced V.G. 2*" mednafen-psx dualanalog ;
"ps1.Aironauts*" mednafen-psx dualanalog ;
"ps1.Air Race Championship*" mednafen-psx dualanalog ;
"ps1.Akuji - The Heartless*" mednafen-psx dualanalog ;
"ps1.Alfred Chicken*" mednafen-psx dualanalog ;
"ps1.Alien la Resurrection*" mednafen-psx dualanalog ;
"ps1.Alien Resurrection*" mednafen-psx dualanalog ;
"ps1.Alone In The Dark - The New Nightmare*" mednafen-psx dualanalog ;
"ps1.Alundra 2*" mednafen-psx dualanalog ;
"ps1.Amazing Virtual Sea Monkeys*" mednafen-psx dualanalog ;
"ps1.Animorphs - Shattered Reality*" mednafen-psx dualanalog ;
"ps1.Ape Escape*" mednafen-psx dualanalog ;
"ps1.Apocalypse*" mednafen-psx dualanalog ;
"ps1.Aqua GT*" mednafen-psx dualanalog ;
"ps1.Armored Core - Master of Arena*" mednafen-psx dualanalog ;
"ps1.Armorines - Project Swarm*" mednafen-psx dualanalog ;
"ps1.Army Men 3D*" mednafen-psx dualanalog ;
"ps1.Army Men - Air Attack 2*" mednafen-psx dualanalog ;
"ps1.Army Men - Air Attack*" mednafen-psx dualanalog ;
"ps1.Army Men - Green Rouge*" mednafen-psx dualanalog ;
"ps1.Army Men - Sarge's Heroes 2*" mednafen-psx dualanalog ;
"ps1.Army Men - Sarge's Heroes*" mednafen-psx dualanalog ;
"ps1.Army Men - World War*" mednafen-psx dualanalog ;
"ps1.Assault Retribution*" mednafen-psx dualanalog ;
"ps1.Asterix - Mega Madness*" mednafen-psx dualanalog ;
"ps1.Asteroids*" mednafen-psx dualanalog ;
"ps1.Barbie Explorer" mednafen-psx dualanalog ;
"ps1.Barbie - Gotta Have Games" mednafen-psx dualanalog ;
"ps1.Batman Beyond - Return of the Joker" mednafen-psx dualanalog ;
"ps1.Batman & Robin" mednafen-psx dualanalog ;
"ps1.Beatmania" mednafen-psx dualanalog ;
"ps1.Beat Planet Music" mednafen-psx dualanalog ;
"ps1.Beyblade" mednafen-psx dualanalog ;
"ps1.Big Bass Fishing" mednafen-psx dualanalog ;
"ps1.BioHazard - Director's Cut - Dual Shock*" mednafen-psx dualanalog ;
"ps1.Bishi Bashi Special" mednafen-psx dualanalog ;
"ps1.Blade" mednafen-psx dualanalog ;
"ps1.Blasto!" mednafen-psx dualanalog ;
"ps1.Blast Radius" mednafen-psx dualanalog ;
"ps1.Block Kuzushi" mednafen-psx dualanalog ;
"ps1.Block Wars" mednafen-psx dualanalog ;
"ps1.Bloody Roar 2*" mednafen-psx dualanalog ;
"ps1.Bob the Builder - Can We Fix It" mednafen-psx dualanalog ;
"ps1.Boombots" mednafen-psx dualanalog ;
"ps1.Bratz" mednafen-psx dualanalog ;
"ps1.Brave Fencer Musashi*" mednafen-psx dualanalog ;
"ps1.Breakout" mednafen-psx dualanalog ;
"ps1.Buggy" mednafen-psx dualanalog ;
"ps1.Bugs Bunny - Lost in Time*" mednafen-psx dualanalog ;
"ps1.Bugs Bunny & Taz - Time Busters" mednafen-psx dualanalog ;
"ps1.C-12 - The Final Resistance" mednafen-psx dualanalog ;
"ps1.Captain Commando" mednafen-psx dualanalog ;
"ps1.Cardinal Syn*" mednafen-psx dualanalog ;
"ps1.Carmageddon*" mednafen-psx dualanalog ;
"ps1.Casper - Friends Around The World" mednafen-psx dualanalog ;
"ps1.Chaos Break" mednafen-psx dualanalog ;
"ps1.Chicken Run" mednafen-psx dualanalog ;
"ps1.Chippoke Ralph no Daibouken (Adventure of Little Ralph)" mednafen-psx dualanalog ;
"ps1.Chocobo Racing" mednafen-psx dualanalog ;
"ps1.Chrono Cross*" pcsxr dualanalog ;
"ps1.Colin Mc[rR]ae*" mednafen-psx dualanalog ;
"ps1.Colony Wars*" mednafen-psx dualanalog ;
"ps1.Cosmowarrior Rei" mednafen-psx dualanalog ;
"ps1.Cowboy Bebop" mednafen-psx dualanalog ;
"ps1.Crash Bandicoot 2*" mednafen-psx dualanalog ;
"ps1.Crash Bandicoot 3*" mednafen-psx dualanalog ;
"ps1.Crash Bandicoot Carnival - Crash Bash*" mednafen-psx dualanalog ;
"ps1.Crash Bash Demo" mednafen-psx dualanalog ;
"ps1.Crash Bash" mednafen-psx dualanalog ;
"ps1.Crash Bash" mednafen-psx dualanalog ;
"ps1.Crash Bash & Spyro - Year of the Dragon Demo" mednafen-psx dualanalog ;
"ps1.Crash Team Racing*" mednafen-psx dualanalog multitap ;
"ps1.Crisis Beat" mednafen-psx dualanalog ;
"ps1.Croc 2*" mednafen-psx dualanalog ;
"ps1.Croc - Legend of the Gobbos" mednafen-psx dualanalog ;
"ps1.C - The Contra Adventure" mednafen-psx dualanalog ;
"ps1.CT Special Forces" mednafen-psx dualanalog ;
"ps1.CyberTiger Golf" mednafen-psx dualanalog ;
"ps1.Fighting Force*" mednafen-psx dualanalog ;
"ps1.Future Cop*" mednafen-psx dualanalog ;
"ps1.Legacy of Kain - Soul Reaver*" pcsxr dualanalog ;
"ps1.Saru! Get You!*" mednafen-psx dualanalog ;
"ps1.Simple Characters 2000 Series #02 - Afro Inu - The Puzzle*" mednafen-psx dualanalog ;
"ps1.Soul Reaver - Legacy of Kain*" mednafen-psx dualanalog ;
"ps1.Spyro the Dragon*"" mednafen-psx dualanalog ;
"ps1.Spyro - Year of the Dragon*" mednafen-psx dualanalog ;
"ps1.Vagrant Story*" mednafen-psx dualanalog ;
"ps1.Earthworm Jim 2" pcsxr ;
"ps1.Mickey's Wild Adventures" pcsxr ;
# SNES BSNES Performance ;
"snes.
"ps1.Earthworm Jim 2" pcsxr ;
"ps1.Mickey's Wild Adventures" pcsxr ;
# SNES BSNES Performance ;
"snes.Psycho Dream*" bsnes-performance ;
# SNES Multitap Games ;
"snes.Bakukyuu Renpatsu!! Super B-Daman*" snes9x multitap ;
"snes.Bakutou Dochers - Bumps-jima wa Oosawagi*" snes9x multitap ;
"snes.Barkley Shut Up and Jam!*" snes9x multitap ;
"snes.Barkley Shut Up and Jam!*" snes9x multitap ;
"snes.Battle Cross*" snes9x multitap ;
"snes.Battle Jockey*" snes9x multitap ;
"snes.Bill Walsh College Football*" snes9x multitap ;
"snes.Capcom's Soccer Shootout*" snes9x multitap ;
"snes.College Slam*" snes9x multitap ;
"snes.Crystal Beans From Dungeon Explorer*" snes9x multitap ;
"snes.Dragon - The Bruce Lee Story*" snes9x multitap ;
"snes.Dream Basketball - Dunk and Hoop*" snes9x multitap ;
"snes.Dynamic Stadium*" snes9x multitap ;
"snes.ESPN National Hockey Night*" snes9x multitap ;
"snes.FIFA 98*" snes9x multitap ;
"snes.FIFA International Soccer*" snes9x multitap ;
"snes.FIFA Soccer 96*" snes9x multitap ;
"snes.FIFA Soccer 97*" snes9x multitap ;
"snes.Final Set*" snes9x multitap ;
"snes.Fire Striker*" snes9x multitap ;
"snes.From TV Animation Slam Dunk - SD Heat Up!!*" snes9x multitap ;
"snes.Go! Go! Dodge League*" snes9x multitap ;
"snes.Hammerlock Wrestling*" snes9x multitap ;
"snes.Hat Trick Hero 2*" snes9x multitap ;
"snes.Head-On Soccer*" snes9x multitap ;
"snes.Hebereke no Oishii Puzzle ha Irimasenka*" snes9x multitap ;
"snes.Human Grand Prix III - F1 Triple Battle*" snes9x multitap ;
"snes.Human Grand Prix IV - F1 Dream Battle*" snes9x multitap ;
"snes.Hungry Dinosaurs*" snes9x multitap ;
"snes.International Superstar Soccer Deluxe*" snes9x multitap ;
"snes.J.League Excite Stage '94*" snes9x multitap ;
"snes.J.League Excite Stage '95*" snes9x multitap ;
"snes.J.League Excite Stage '96*" snes9x multitap ;
"snes.J.League Super Soccer '95*" snes9x multitap ;
"snes.J.League Super Soccer*" snes9x multitap ;
"snes.JWP Joshi Pro Wrestling - Pure Wrestle Queens*" snes9x multitap ;
"snes.Jikkyou Power Pro Wrestling '96*" snes9x multitap ;
"snes.Jimmy Connors Pro Tennis Tour*" snes9x multitap ;
"snes.Kunio-kun no Dodge Ball dayo Zenin Shuugou!*" snes9x multitap ;
"snes.Looney Tunes Basketball*" snes9x multitap ;
"snes.Madden NFL '94*" snes9x multitap ;
"snes.Madden NFL '95*" snes9x multitap ;
"snes.Madden NFL '96*" snes9x multitap ;
"snes.Madden NFL '97*" snes9x multitap ;
"snes.Madden NFL '98*" snes9x multitap ;
"snes.Micro Machines 2 - Turbo Tournament*" snes9x multitap ;
"snes.Micro Machines*" snes9x multitap ;
"snes.Mizuki Shigeru no Youkai Hyakkiyakou*" snes9x multitap ;
"snes.Multi Play Volleyball*" snes9x multitap ;
"snes.NBA Give 'N Go*" snes9x multitap ;
"snes.NBA Hang Time*" snes9x multitap ;
"snes.NBA Jam - Tournament Edition*" snes9x multitap ;
"snes.NBA Jam*" snes9x multitap ;
"snes.NBA Live 95*" snes9x multitap ;
"snes.NBA Live 96*" snes9x multitap ;
"snes.NBA Live 97*" snes9x multitap ;
"snes.NBA Live 98*" snes9x multitap ;
"snes.NCAA Final Four Basketball*" snes9x multitap ;
"snes.NCAA Football*" snes9x multitap ;
"snes.NFL Quarterback Club 96*" snes9x multitap ;
"snes.NFL Quarterback Club*" snes9x multitap ;
"snes.NHL '94*" snes9x multitap ;
"snes.NHL '98*" snes9x multitap ;
"snes.NHL Pro Hockey '94*" snes9x multitap ;
"snes.Natsume Championship Wrestling*" snes9x multitap ;
"snes.Peace Keepers, The*" snes9x multitap ;
"snes.Pieces*" snes9x multitap ;
"snes.Rap Jam - Volume One*" snes9x multitap ;
"snes.Saturday Night Slam Masters*" snes9x multitap ;
"snes.Secret of Mana*" snes9x multitap ;
"snes.Shin Nippon Pro Wrestling '94 - Battlefield in Tokyo Dome*" snes9x multitap ;
"snes.Shin Nippon Pro Wrestling - Chou Senshi in Tokyo Dome*" snes9x multitap ;
"snes.Shin Nippon Pro Wrestling Kounin '95 - Tokyo Dome Battle 7*" snes9x multitap ;
"snes.Smash Tennis*" snes9x multitap ;
"snes.Sporting News, The - Power Baseball*" snes9x multitap ;
"snes.Sterling Sharpe End 2 End*" snes9x multitap ;
"snes.Street Hockey '95*" snes9x multitap ;
"snes.Street Racer*" snes9x multitap ;
"snes.Sugoi Hebereke*" snes9x multitap ;
"snes.Sugoro Quest++ Dicenics*" snes9x multitap ;
"snes.Super Bomberman - Panic Bomber W*" snes9x multitap ;
"snes.Super Bomberman 2*" snes9x multitap ;
"snes.Super Bomberman 3*" snes9x multitap ;
"snes.Super Bomberman 4*" snes9x multitap ;
"snes.Super Bomberman 5*" snes9x multitap ;
"snes.Super Bomberman*" snes9x multitap ;
"snes.Super Fire Pro Wrestling - Queen's Special*" snes9x multitap ;
"snes.Super Fire Pro Wrestling Special*" snes9x multitap ;
"snes.Super Fire Pro Wrestling X Premium*" snes9x multitap ;
"snes.Super Fire Pro Wrestling X*" snes9x multitap ;
"snes.Super Formation Soccer 94 - World Cup Final Data*" snes9x multitap ;
"snes.Super Formation Soccer 94*" snes9x multitap ;
"snes.Super Formation Soccer 95 della Serie A - UCC Xaqua*" snes9x multitap ;
"snes.Super Formation Soccer 95 della Serie A*" snes9x multitap ;
"snes.Super Formation Soccer 96*" snes9x multitap ;
"snes.Super Formation Soccer II*" snes9x multitap ;
"snes.Super Ice Hockey*" snes9x multitap ;
"snes.Super Kyousouba - Kaze no Sylphid*" snes9x multitap ;
"snes.Super Power League*" snes9x multitap ;
"snes.Super Tekkyuu Fight!*" snes9x multitap ;
"snes.Super Tetris 3*" snes9x multitap ;
"snes.Syndicate*" snes9x multitap ;
"snes.Tenryu Genichiro no Pro Wrestling Revolution*" snes9x multitap ;
"snes.Tiny Toon Adventures - Wild & Wacky Sports*" snes9x multitap ;
"snes.Top Gear 3000*" snes9x multitap ;
"snes.Turbo Toons*" snes9x multitap ;
"snes.Virtual Soccer*" snes9x multitap ;
"snes.Vs. Collection*" snes9x multitap ;
"snes.WWF Raw*" snes9x multitap ;
"snes.Yuujin no Furi Furi Girls*" snes9x multitap ;
"snes.Zero 4 Champ RR-Z*" snes9x multitap ;
"snes.Zero 4 Champ RR*" snes9x multitap ;
# Defaults ;
"gba.*" vba ;
"gbc.*" gambatte ;
"gb.*" gambatte ;
"gg.*" genplus ;
"nes.*" fceu ;
"pcecd.*" mednafen-pce-fast ;
"pce.*" mednafen-pce-fast ;
"ps1.*" mednafen-psx ;
"wswan.*" mednafen-wswan ;
"a26.*" stella ;
"scd.*" genplus ;
"sg1000.*" genplus ;
"smd.*" genplus ;
"sms.*" genplus ;
"snes.*" snes9x ;
"nds.*" desmume ;

View File

@ -26,6 +26,7 @@
#include "../gfx/shader_hlsl.h"
#endif
#include "../console/rarch_console_video.h"
#include "./../gfx/gfx_context.h"
#include "../general.h"
#include "../message.h"
@ -993,9 +994,9 @@ static void xdk_d3d_set_aspect_ratio(void *data, unsigned aspectratio_index)
xdk_d3d_video_t *d3d = (xdk_d3d_video_t*)driver.video_data;
if (g_settings.video.aspect_ratio_idx == ASPECT_RATIO_AUTO)
rarch_set_auto_viewport(g_extern.frame_cache.width, g_extern.frame_cache.height);
gfx_set_auto_viewport(g_extern.frame_cache.width, g_extern.frame_cache.height);
else if (g_settings.video.aspect_ratio_idx == ASPECT_RATIO_CORE)
rarch_set_core_viewport();
gfx_set_core_viewport();
g_settings.video.aspect_ratio = aspectratio_lut[g_settings.video.aspect_ratio_idx].value;
g_settings.video.force_aspect = false;

View File

@ -231,14 +231,11 @@ static void xdk_input_poll(void *data)
if (!(g_extern.frame_count < g_extern.delay_timer[0]))
{
if((*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3)) && (*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3)))
{
*lifecycle_state |= (1ULL << RARCH_RMENU_TOGGLE);
*lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
}
if(!(*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3)) && (*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3)))
{
*lifecycle_state |= (1ULL << RARCH_RMENU_TOGGLE);
*lifecycle_state |= (1ULL << RARCH_RMENU_QUICKMENU_TOGGLE);
*lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
}
}
}