notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Sort out compiler warnings, all of them
[pcsx_rearmed.git]
/
frontend
/
libretro.c
diff --git
a/frontend/libretro.c
b/frontend/libretro.c
index
609ce86
..
e071daa
100644
(file)
--- a/
frontend/libretro.c
+++ b/
frontend/libretro.c
@@
-1337,14
+1337,12
@@
bool retro_load_game(const struct retro_game_info *info)
for (i = 0; i < sizeof(disks) / sizeof(disks[0]) && i < cdrIsoMultidiskCount; i++)
{
for (i = 0; i < sizeof(disks) / sizeof(disks[0]) && i < cdrIsoMultidiskCount; i++)
{
- char disk_name[PATH_MAX];
- char disk_label[PATH_MAX];
- disk_name[0] = '\0';
- disk_label[0] = '\0';
+ char disk_name[PATH_MAX - 16] = { 0 };
+ char disk_label[PATH_MAX] = { 0 };
disks[i].fname = strdup(info->path);
disks[i].fname = strdup(info->path);
- get_disk_label(disk_name, info->path,
PATH_MAX
);
+ get_disk_label(disk_name, info->path,
sizeof(disk_name)
);
snprintf(disk_label, sizeof(disk_label), "%s #%u", disk_name, (unsigned)i + 1);
disks[i].flabel = strdup(disk_label);
snprintf(disk_label, sizeof(disk_label), "%s #%u", disk_name, (unsigned)i + 1);
disks[i].flabel = strdup(disk_label);
@@
-1385,6
+1383,10
@@
bool retro_load_game(const struct retro_game_info *info)
}
}
}
}
+ /* set ports to use "standard controller" initially */
+ for (i = 0; i < 8; ++i)
+ in_type[i] = PSE_PAD_TYPE_STANDARD;
+
plugin_call_rearmed_cbs();
/* dfinput_activate(); */
plugin_call_rearmed_cbs();
/* dfinput_activate(); */
@@
-1630,7
+1632,9
@@
static void update_variables(bool in_flight)
var.value = NULL;
var.key = "pcsx_rearmed_drc";
var.value = NULL;
var.key = "pcsx_rearmed_drc";
- if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
+ if (!environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var))
+ var.value = "enabled";
+
{
R3000Acpu *prev_cpu = psxCpu;
#if defined(LIGHTREC)
{
R3000Acpu *prev_cpu = psxCpu;
#if defined(LIGHTREC)
@@
-2770,7
+2774,8
@@
void retro_init(void)
#ifdef _3DS
vout_buf = linearMemAlign(VOUT_MAX_WIDTH * VOUT_MAX_HEIGHT * 2, 0x80);
#elif defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L) && !defined(VITA) && !defined(__SWITCH__)
#ifdef _3DS
vout_buf = linearMemAlign(VOUT_MAX_WIDTH * VOUT_MAX_HEIGHT * 2, 0x80);
#elif defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L) && !defined(VITA) && !defined(__SWITCH__)
- posix_memalign(&vout_buf, 16, VOUT_MAX_WIDTH * VOUT_MAX_HEIGHT * 2);
+ if (posix_memalign(&vout_buf, 16, VOUT_MAX_WIDTH * VOUT_MAX_HEIGHT * 2) != 0)
+ vout_buf = (void *) 0;
#else
vout_buf = malloc(VOUT_MAX_WIDTH * VOUT_MAX_HEIGHT * 2);
#endif
#else
vout_buf = malloc(VOUT_MAX_WIDTH * VOUT_MAX_HEIGHT * 2);
#endif