diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-03-08 23:21:51 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-03-08 23:21:51 +0100 |
| commit | 5d9e4b31317e02432c1e7437f1b75f252f968a3e (patch) | |
| tree | 54031a80ea3e5b3654ed74bfd1474edd9409f989 /src/image.cpp | |
| parent | 15dd612705a2054cacfb794f5d1662f38316bbdd (diff) | |
remove imspinner dep
Diffstat (limited to 'src/image.cpp')
| -rw-r--r-- | src/image.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/image.cpp b/src/image.cpp index 0755055..cf5e12d 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -10,12 +10,12 @@ ts_image img_search; ts_image img_folder; // Simple helper function to load an image into a OpenGL texture with common settings -static bool _ts_load_texture(unsigned char* data, unsigned long size, GLuint* out_texture, int* out_width, int* out_height) +static bool _ts_load_texture(unsigned char* data, size_t size, GLuint* out_texture, int* out_width, int* out_height) { // Load from file int image_width = 0; int image_height = 0; - unsigned char* image_data = stbi_load_from_memory(data, size, &image_width, &image_height, NULL, 4); + unsigned char* image_data = stbi_load_from_memory(data, (int)size, &image_width, &image_height, NULL, 4); if (image_data == NULL) { printf("Failed to load %s\n", stbi_failure_reason()); return false; @@ -44,7 +44,7 @@ static bool _ts_load_texture(unsigned char* data, unsigned long size, GLuint* ou return true; } -static ts_image _ts_load_image(unsigned char* data, unsigned long size) { +static ts_image _ts_load_image(unsigned char* data, size_t size) { int w = 0; int h = 0; GLuint id = 0; @@ -54,7 +54,7 @@ static ts_image _ts_load_image(unsigned char* data, unsigned long size) { } void ts_load_images() { - int size = _binary_misc_logo_64_png_end - _binary_misc_logo_64_png_start; + size_t size = _binary_misc_logo_64_png_end - _binary_misc_logo_64_png_start; unsigned char* data = (unsigned char *)_binary_misc_logo_64_png_start; img_logo = _ts_load_image(data, size); |
