Update C sources, add new functions

This commit is contained in:
Milan Nikolic 2017-02-10 11:28:19 +01:00
parent ac3cb63287
commit 2f90318d30
17 changed files with 332 additions and 242 deletions

View file

@ -524,7 +524,7 @@ bool IsWindowMinimized(void)
#endif
}
// Fullscreen toggle
// Fullscreen toggle (only PLATFORM_DESKTOP)
void ToggleFullscreen(void)
{
#if defined(PLATFORM_DESKTOP)
@ -540,6 +540,25 @@ void ToggleFullscreen(void)
#endif
}
// Set icon for window (only PLATFORM_DESKTOP)
void SetWindowIcon(Image image)
{
#if defined(PLATFORM_DESKTOP)
ImageFormat(&image, UNCOMPRESSED_R8G8B8A8);
GLFWimage icon[1];
icon[0].width = image.width;
icon[0].height = image.height;
icon[0].pixels = (unsigned char *)image.data;
// NOTE: We only support one image icon
glfwSetWindowIcon(window, 1, icon);
// TODO: Support multi-image icons --> image.mipmaps
#endif
}
// Get current screen width
int GetScreenWidth(void)
{