Revert "some cleanups"

This commit is contained in:
Autechre
2021-06-05 15:05:07 +02:00
committed by GitHub
parent cbc17a077b
commit aa4615c417
16 changed files with 174 additions and 127 deletions

View File

@@ -37,6 +37,7 @@
uint8 *XBuf = NULL;
uint8 *XDBuf = NULL;
int show_crosshair = 0;
void FCEU_KillVirtualVideo(void)
{
@@ -52,15 +53,15 @@ int FCEU_InitVirtualVideo(void)
{
/* 256 bytes per scanline, * 240 scanline maximum, +8 for alignment, */
if (!XBuf)
XBuf = (uint8*)(FCEU_malloc(256 * (256 + ppu.extrascanlines + 8)));
XBuf = (uint8*)(FCEU_malloc(256 * (256 + extrascanlines + 8)));
if (!XDBuf)
XDBuf = (uint8*)(FCEU_malloc(256 * (256 + ppu.extrascanlines + 8)));
XDBuf = (uint8*)(FCEU_malloc(256 * (256 + extrascanlines + 8)));
if (!XBuf || !XDBuf)
return 0;
memset(XBuf, 128, 256 * (256 + ppu.extrascanlines + 8));
memset(XDBuf, 128, 256 * (256 + ppu.extrascanlines + 8));
memset(XBuf, 128, 256 * (256 + extrascanlines + 8));
memset(XDBuf, 128, 256 * (256 + extrascanlines + 8));
return 1;
}
@@ -81,7 +82,7 @@ void FCEU_PutImage(void)
FCEU_VSUniDraw(XBuf);
}
if (howlong) howlong--;
if (FSettings.show_crosshair)
if (show_crosshair)
FCEU_DrawInput(XBuf);
}