mirror of
https://github.com/libretro/bsnes-libretro.git
synced 2024-11-26 18:40:47 +00:00
d87a0f633d
byuu says: - bsnes: added video filters from bsnes v082 - bsnes: added ZSNES snow effect option when games paused or unloaded (no, I'm not joking) - bsnes: added 7-zip support (LZMA 19.00 SDK) [Recent higan WIPs have also mentioned bsnes changes, although the higan code no longer includes the bsnes code. These changes include: - higan, bsnes: added EXLOROM, EXLOROM-RAM, EXHIROM mappings - higan, bsnes: focus the viewport after leaving fullscreen exclusive mode - bsnes: re-added mightymo's cheat code database - bsnes: improved make install rules for the game and cheat code databases - bsnes: delayed construction of hiro::Window objects to properly show bsnes window icons - Ed.]
26 lines
662 B
C++
26 lines
662 B
C++
namespace Filter::_2xSaI {
|
|
|
|
auto size(uint& width, uint& height) -> void {
|
|
width *= 2;
|
|
height *= 2;
|
|
}
|
|
|
|
uint32_t temp[512 * 480];
|
|
|
|
auto render(
|
|
uint32_t* colortable, uint32_t* output, uint outpitch,
|
|
const uint16_t* input, uint pitch, uint width, uint height
|
|
) -> void {
|
|
for(unsigned y = 0; y < height; y++) {
|
|
const uint16_t *line_in = (const uint16_t*)(((const uint8_t*)input) + pitch * y);
|
|
uint32_t *line_out = temp + y * width;
|
|
for(unsigned x = 0; x < width; x++) {
|
|
line_out[x] = colortable[line_in[x]];
|
|
}
|
|
}
|
|
|
|
_2xSaI32((unsigned char*)temp, width * sizeof(uint32_t), 0, (unsigned char*)output, outpitch, width, height);
|
|
}
|
|
|
|
}
|