[Core/Misc] Fixed -Wmaybe-uninitialized warnings with GCC compiler

This commit is contained in:
ekeeke 2023-05-20 19:44:57 +02:00
parent 60f2281fc3
commit c4077c4f24
2 changed files with 12 additions and 6 deletions

View File

@ -2,7 +2,7 @@
* Genesis Plus
* XE-1AP analog controller support
*
* Copyright (C) 2011-2022 Eke-Eke (Genesis Plus GX)
* Copyright (C) 2011-2023 Eke-Eke (Genesis Plus GX)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:
@ -96,12 +96,12 @@ INLINE unsigned char xe_1ap_read(int index)
case 9: /* CH3 low (Throttle vertical or horizontal direction) */
data = input.analog[port+1][0] & 0x0F;
break;
case 10: /* N/A */
data = 0x0F;
break;
case 11: /* A B A' B' buttons status (active low) */
data = (~input.pad[port] >> 6) & 0x0F;
break;
default: /* N/A */
data = 0x0F;
break;
}
/* TL indicates current data cycle (0=1st cycle, 1=2nd cycle, etc) */

View File

@ -1852,10 +1852,13 @@ void render_bg_m5_vs(int line)
/* Enhanced function that allows each cell to be vscrolled individually, instead of being limited to 2-cell */
void render_bg_m5_vs_enhanced(int line)
{
int column, v_offset;
int column;
uint32 atex, atbuf, *src, *dst;
uint32 v_line, next_v_line, *nt;
/* Vertical scroll offset */
int v_offset = 0;
/* Common data */
uint32 xscroll = *(uint32 *)&vram[hscb + ((line & hscroll_mask) << 2)];
uint32 yscroll = 0;
@ -2833,11 +2836,14 @@ void render_bg_m5_vs(int line)
void render_bg_m5_vs_enhanced(int line)
{
int column, start, end, v_offset;
int column, start, end;
uint32 atex, atbuf, *src, *dst;
uint32 shift, index, v_line, next_v_line, *nt;
uint8 *lb;
/* Vertical scroll offset */
int v_offset = 0;
/* Scroll Planes common data */
uint32 xscroll = *(uint32 *)&vram[hscb + ((line & hscroll_mask) << 2)];
uint32 yscroll = 0;