Fix pedantic compiler test
This commit is contained in:
parent
9f364209af
commit
6627586d6e
@ -263,7 +263,8 @@ bool png_path_to_bitmap(uint8_t** data, unsigned int* width, unsigned int* heigh
|
||||
size_t filesize = ftell(fp);
|
||||
*data = calloc(filesize, sizeof(char));
|
||||
fseek(fp, 0L, SEEK_SET); // rewind() deprecated on some platforms
|
||||
fread(*data, sizeof(char), filesize, fp);
|
||||
size_t r = fread(*data, sizeof(char), filesize, fp);
|
||||
if (r != filesize) return false;
|
||||
fclose(fp);
|
||||
png_read_data d;
|
||||
memset(&d, 0, sizeof(png_read_data));
|
||||
|
||||
@ -96,12 +96,13 @@ add_os_window() {
|
||||
bgimage->texture_id = 0;
|
||||
RepeatStrategy r;
|
||||
switch (OPT(background_image_layout)) {
|
||||
case TILING:
|
||||
r = REPEAT_DEFAULT; break;
|
||||
case SCALED:
|
||||
r = REPEAT_CLAMP; break;
|
||||
case MIRRORED:
|
||||
r = REPEAT_MIRROR;
|
||||
r = REPEAT_MIRROR; break;
|
||||
case TILING:
|
||||
default:
|
||||
r = REPEAT_DEFAULT; break;
|
||||
}
|
||||
send_image_to_gpu(&bgimage->texture_id, bgimage->bitmap, bgimage->width,
|
||||
bgimage->height, false, true, false, r);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user