mirror of
https://github.com/libretro/RetroArch
synced 2024-12-29 12:31:05 +00:00
Fix awkward compiler warning.
This commit is contained in:
parent
4f50b6a749
commit
2166db91e2
@ -67,11 +67,13 @@ bool texture_image_load(const char *path, struct texture_image *out_img)
|
||||
if (!strstr(path, ".tga"))
|
||||
return false;
|
||||
|
||||
uint8_t *buf = NULL;
|
||||
ssize_t len = read_file(path, (void**)&buf);
|
||||
void *raw_buf = NULL;
|
||||
ssize_t len = read_file(path, &raw_buf);
|
||||
if (len < 0)
|
||||
return false;
|
||||
|
||||
uint8_t *buf = raw_buf;
|
||||
|
||||
if (buf[2] != 2) // Uncompressed RGB
|
||||
{
|
||||
free(buf);
|
||||
|
@ -64,8 +64,8 @@ static void dump_content(FILE *file, const uint16_t *frame, unsigned width, unsi
|
||||
// BMP likes reverse ordering for some reason :v
|
||||
for (int j = height - 1; j >= 0; j--)
|
||||
{
|
||||
uint8_t * restrict dst = line;
|
||||
const uint16_t * restrict src = frame + j * pitch;
|
||||
uint8_t *dst = line;
|
||||
const uint16_t *src = frame + j * pitch;
|
||||
for (unsigned i = 0; i < width; i++)
|
||||
{
|
||||
uint16_t pixel = *src++;
|
||||
@ -87,7 +87,7 @@ bool screenshot_dump(const char *folder, const uint16_t *frame,
|
||||
time_t cur_time;
|
||||
time(&cur_time);
|
||||
|
||||
char timefmt[64];
|
||||
char timefmt[128];
|
||||
strftime(timefmt, sizeof(timefmt), "SSNES-%m%d-%H%M%S.bmp", localtime(&cur_time));
|
||||
|
||||
char filename[256];
|
||||
|
Loading…
Reference in New Issue
Block a user