Cleanups
This commit is contained in:
@@ -685,6 +685,7 @@ void retro_run(void)
|
|||||||
uint8_t *gfx;
|
uint8_t *gfx;
|
||||||
int32_t ssize = 0;
|
int32_t ssize = 0;
|
||||||
bool updated = false;
|
bool updated = false;
|
||||||
|
unsigned incr = 0;
|
||||||
|
|
||||||
FCEUI_Emulate(&gfx, &sound, &ssize, 0);
|
FCEUI_Emulate(&gfx, &sound, &ssize, 0);
|
||||||
|
|
||||||
@@ -721,63 +722,54 @@ void retro_run(void)
|
|||||||
sceGuFinish();
|
sceGuFinish();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (use_overscan)
|
width = 256;
|
||||||
{
|
height = 240;
|
||||||
width = 256;
|
pitch = 512;
|
||||||
height = 240;
|
gfx = XBuf;
|
||||||
pitch = 256;
|
|
||||||
#ifndef PSP
|
if (!use_overscan)
|
||||||
pitch = 512;
|
{
|
||||||
gfx = XBuf;
|
incr = 16;
|
||||||
if (use_raw_palette)
|
width -= 16;
|
||||||
{
|
height -= 16;
|
||||||
extern uint8 PPU[4];
|
#ifndef PSP
|
||||||
int deemp = (PPU[1] >> 5) << 2;
|
pitch -= 32;
|
||||||
for (y = 0; y < height; y++)
|
gfx = gfx + 8 + 256 * 8;
|
||||||
for ( x = 0; x < width; x++, gfx++)
|
|
||||||
fceu_video_out[y * width + x] = retro_palette[*gfx & 0x3F] | deemp;
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (y = 0; y < height; y++)
|
|
||||||
for ( x = 0; x < width; x++, gfx++)
|
|
||||||
fceu_video_out[y * width + x] = retro_palette[*gfx];
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef PSP
|
||||||
|
if (use_raw_palette)
|
||||||
|
{
|
||||||
|
extern uint8 PPU[4];
|
||||||
|
int deemp = (PPU[1] >> 5) << 2;
|
||||||
|
for (y = 0; y < height; y++, gfx += incr)
|
||||||
|
for ( x = 0; x < width; x++, gfx++)
|
||||||
|
fceu_video_out[y * width + x] = retro_palette[*gfx & 0x3F] | deemp;
|
||||||
|
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
width = 256 - 16;
|
for (y = 0; y < height; y++, gfx += incr)
|
||||||
height = 240 - 16;
|
for ( x = 0; x < width; x++, gfx++)
|
||||||
pitch = 256;
|
fceu_video_out[y * width + x] = retro_palette[*gfx];
|
||||||
#ifndef PSP
|
|
||||||
pitch = 512 - 32;
|
|
||||||
gfx = XBuf + 8 + 256 * 8;
|
|
||||||
|
|
||||||
if (use_raw_palette)
|
|
||||||
{
|
|
||||||
extern uint8 PPU[4];
|
|
||||||
int deemp = (PPU[1] >> 5) << 2;
|
|
||||||
for (y = 0; y < height; y++, gfx += 16)
|
|
||||||
for ( x = 0; x < width; x++, gfx++)
|
|
||||||
fceu_video_out[y * width + x] = retro_palette[*gfx & 0x3F] | deemp;
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (y = 0; y < height; y++, gfx += 16)
|
|
||||||
for ( x = 0; x < width; x++, gfx++)
|
|
||||||
fceu_video_out[y * width + x] = retro_palette[*gfx];
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PSP
|
|
||||||
video_cb(texture_vram_p, width, height, pitch);
|
|
||||||
#else
|
|
||||||
video_cb(fceu_video_out, width, height, pitch);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
video_cb(
|
||||||
|
#ifdef PSP
|
||||||
|
texture_vram_p,
|
||||||
|
#else
|
||||||
|
fceu_video_out,
|
||||||
|
#endif
|
||||||
|
width, height,
|
||||||
|
#ifdef PSP
|
||||||
|
256
|
||||||
|
#else
|
||||||
|
pitch
|
||||||
|
#endif
|
||||||
|
);
|
||||||
FCEUD_UpdateInput();
|
FCEUD_UpdateInput();
|
||||||
|
|
||||||
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE_UPDATE, &updated) && updated)
|
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE_UPDATE, &updated) && updated)
|
||||||
|
|||||||
Reference in New Issue
Block a user