aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRay <raysan5@gmail.com>2019-07-22 21:15:25 +0200
committerRay <raysan5@gmail.com>2019-07-22 21:15:25 +0200
commitbc3983a3dd48fc72f84ecb19e2f3bc50423c777a (patch)
treef2dc5a70b74535bf2d45c83d8ea086159df7d258 /src
parentf501d42e475d642fcc5ea5f96ce11a13ce3455fb (diff)
downloadraylib-bc3983a3dd48fc72f84ecb19e2f3bc50423c777a.tar.gz
raylib-bc3983a3dd48fc72f84ecb19e2f3bc50423c777a.zip
Solved issue #912
Diffstat (limited to 'src')
-rw-r--r--src/core.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core.c b/src/core.c
index ec8f97f8..416b6830 100644
--- a/src/core.c
+++ b/src/core.c
@@ -2419,8 +2419,6 @@ static bool InitGraphicsDevice(int width, int height)
{
screenWidth = width; // User desired width
screenHeight = height; // User desired height
- currentWidth = width;
- currentHeight = height;
screenScaling = MatrixIdentity(); // No draw scaling required by default
@@ -2459,6 +2457,9 @@ static bool InitGraphicsDevice(int width, int height)
if (screenHeight <= 0) screenHeight = displayHeight;
#endif // PLATFORM_DESKTOP
+ currentWidth = screenWidth;
+ currentHeight = screenHeight;
+
#if defined(PLATFORM_WEB)
displayWidth = screenWidth;
displayHeight = screenHeight;
@@ -2533,10 +2534,10 @@ static bool InitGraphicsDevice(int width, int height)
if (fullscreen)
{
// Obtain recommended displayWidth/displayHeight from a valid videomode for the monitor
- int count;
+ int count = 0;
const GLFWvidmode *modes = glfwGetVideoModes(glfwGetPrimaryMonitor(), &count);
- // Get closest videomode to desired screenWidth/screenHeight
+ // Get closest video mode to desired screenWidth/screenHeight
for (int i = 0; i < count; i++)
{
if (modes[i].width >= screenWidth)