mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
Miscellaneous overlay fixes
This commit is contained in:
parent
b4bbad494a
commit
55b6d8ba15
@ -2788,6 +2788,9 @@ static void vulkan_overlay_free(vk_t *vk)
|
||||
vk->context->device,
|
||||
&vk->overlay.images[i]);
|
||||
|
||||
if (vk->overlay.images)
|
||||
free(vk->overlay.images);
|
||||
|
||||
memset(&vk->overlay, 0, sizeof(vk->overlay));
|
||||
}
|
||||
|
||||
|
@ -439,8 +439,6 @@ static bool video_thread_handle_packet(
|
||||
|
||||
case CMD_OVERLAY_LOAD:
|
||||
{
|
||||
float *tmp_alpha_mod = NULL;
|
||||
|
||||
if (thr->overlay && thr->overlay->load)
|
||||
ret = thr->overlay->load(thr->driver_data,
|
||||
pkt.data.image.data,
|
||||
@ -448,11 +446,21 @@ static bool video_thread_handle_packet(
|
||||
|
||||
pkt.data.b = ret;
|
||||
thr->alpha_mods = pkt.data.image.num;
|
||||
tmp_alpha_mod = (float*)realloc(thr->alpha_mod,
|
||||
thr->alpha_mods * sizeof(float));
|
||||
|
||||
if (tmp_alpha_mod)
|
||||
thr->alpha_mod = tmp_alpha_mod;
|
||||
if (thr->alpha_mods > 0)
|
||||
{
|
||||
float *tmp_alpha_mod = (float*)realloc(thr->alpha_mod,
|
||||
thr->alpha_mods * sizeof(float));
|
||||
|
||||
if (tmp_alpha_mod)
|
||||
thr->alpha_mod = tmp_alpha_mod;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (thr->alpha_mod)
|
||||
free(thr->alpha_mod);
|
||||
thr->alpha_mod = NULL;
|
||||
}
|
||||
|
||||
/* Avoid temporary garbage data. */
|
||||
for (i = 0; i < thr->alpha_mods; i++)
|
||||
|
@ -24368,7 +24368,9 @@ static int16_t input_state_device(
|
||||
res = 1;
|
||||
|
||||
/* Don't allow turbo for D-pad. */
|
||||
if ((id < RETRO_DEVICE_ID_JOYPAD_UP || id > RETRO_DEVICE_ID_JOYPAD_RIGHT))
|
||||
if ((id < RETRO_DEVICE_ID_JOYPAD_UP) ||
|
||||
((id > RETRO_DEVICE_ID_JOYPAD_RIGHT) &&
|
||||
(id <= RETRO_DEVICE_ID_JOYPAD_R3)))
|
||||
{
|
||||
/*
|
||||
* Apply turbo button if activated.
|
||||
|
Loading…
x
Reference in New Issue
Block a user