C89 buildfixes

This commit is contained in:
twinaphex
2017-07-01 11:01:46 +02:00
parent 90bed81e8f
commit 8f2d28e4e5
2 changed files with 10 additions and 6 deletions

View File

@@ -800,6 +800,8 @@ static void retro_set_custom_palette (void)
void FCEUD_RegionOverride(int region)
{
static int w = 0;
struct retro_system_av_info av_info;
switch (region)
{
case 0: /* auto */
@@ -831,7 +833,6 @@ void FCEUD_RegionOverride(int region)
SetSoundVariables();
// Update the geometry
struct retro_system_av_info av_info;
retro_get_system_av_info(&av_info);
environ_cb(RETRO_ENVIRONMENT_SET_GEOMETRY, &av_info);
}
@@ -880,6 +881,7 @@ static void check_variables(bool startup)
struct retro_variable var = {0};
struct retro_system_av_info av_info;
bool geometry_update = false;
unsigned old_regionoverride = regionoverride;
var.key = "fceumm_palette";
@@ -1057,7 +1059,6 @@ static void check_variables(bool startup)
turbo_delay = 60;
}
}
unsigned old_regionoverride = regionoverride;
var.key = "fceumm_region";
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{

View File

@@ -661,16 +661,19 @@ static void Fixit1(void) {
}
void MMC5_hb(int); //Ugh ugh ugh.
static void DoLine(void) {
if (scanline >= 240 && scanline != totalscanlines) {
static void DoLine(void)
{
int x;
uint8 *target = NULL;
if (scanline >= 240 && scanline != totalscanlines)
{
X6502_Run(256 + 69);
scanline++;
X6502_Run(16);
return;
}
int x;
uint8 *target = XBuf + ((scanline < 240 ? scanline : 240) << 8);
target = XBuf + ((scanline < 240 ? scanline : 240) << 8);
if (MMC5Hack && (ScreenON || SpriteON)) MMC5_hb(scanline);