mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-04 05:23:34 +00:00
Fix warnings;
This commit is contained in:
parent
fe422ba60f
commit
5957d07448
|
@ -282,7 +282,7 @@ bool fs_stat(const char* path, FileInfo* info) {
|
||||||
if (info) {
|
if (info) {
|
||||||
info->size = (uint64_t) stats.st_size;
|
info->size = (uint64_t) stats.st_size;
|
||||||
info->lastModified = (uint64_t) stats.st_mtime;
|
info->lastModified = (uint64_t) stats.st_mtime;
|
||||||
info->type = (stats.st_mode & S_IFDIR) ? FILE_DIRECTORY : FILE_REGULAR;
|
info->type = S_ISDIR(stats.st_mode) ? FILE_DIRECTORY : FILE_REGULAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -67,6 +67,8 @@
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define strncasecmp _strnicmp
|
#define strncasecmp _strnicmp
|
||||||
|
#else
|
||||||
|
#include <strings.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEFAULT_SPARSE_CONVERT 0
|
#define DEFAULT_SPARSE_CONVERT 0
|
||||||
|
|
|
@ -1536,7 +1536,7 @@ void lovrTextureReplacePixels(Texture* texture, TextureData* textureData, uint32
|
||||||
uint32_t height = textureData->height;
|
uint32_t height = textureData->height;
|
||||||
bool overflow = (x + width > maxWidth) || (y + height > maxHeight);
|
bool overflow = (x + width > maxWidth) || (y + height > maxHeight);
|
||||||
lovrAssert(!overflow, "Trying to replace pixels outside the texture's bounds");
|
lovrAssert(!overflow, "Trying to replace pixels outside the texture's bounds");
|
||||||
lovrAssert(mipmap >= 0 && mipmap < texture->mipmapCount, "Invalid mipmap level %d", mipmap);
|
lovrAssert(mipmap < texture->mipmapCount, "Invalid mipmap level %d", mipmap);
|
||||||
GLenum glFormat = convertTextureFormat(textureData->format);
|
GLenum glFormat = convertTextureFormat(textureData->format);
|
||||||
GLenum glInternalFormat = convertTextureFormatInternal(textureData->format, texture->srgb);
|
GLenum glInternalFormat = convertTextureFormatInternal(textureData->format, texture->srgb);
|
||||||
GLenum binding = (texture->type == TEXTURE_CUBE) ? GL_TEXTURE_CUBE_MAP_POSITIVE_X + slice : texture->target;
|
GLenum binding = (texture->type == TEXTURE_CUBE) ? GL_TEXTURE_CUBE_MAP_POSITIVE_X + slice : texture->target;
|
||||||
|
|
Loading…
Reference in a new issue