mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-08 19:40:30 +00:00
Avoid temporary garbage data in alpha mod.
This commit is contained in:
parent
833259de93
commit
ef54422379
@ -173,6 +173,7 @@ static void thread_reply(thread_video_t *thr, enum thread_cmd cmd)
|
||||
static void thread_loop(void *data)
|
||||
{
|
||||
thread_video_t *thr = (thread_video_t*)data;
|
||||
unsigned i;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
@ -250,6 +251,8 @@ static void thread_loop(void *data)
|
||||
thr->cmd_data.image.num);
|
||||
thr->alpha_mods = thr->cmd_data.image.num;
|
||||
thr->alpha_mod = (float*)realloc(thr->alpha_mod, thr->alpha_mods * sizeof(float));
|
||||
for (i = 0; i < thr->alpha_mods; i++) // Avoid temporary garbage data.
|
||||
thr->alpha_mod[i] = 1.0f;
|
||||
thread_reply(thr, CMD_OVERLAY_LOAD);
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user