mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-10 20:06:29 +00:00
Solved issue #912
This commit is contained in:
@@ -2419,8 +2419,6 @@ static bool InitGraphicsDevice(int width, int height)
|
|||||||
{
|
{
|
||||||
screenWidth = width; // User desired width
|
screenWidth = width; // User desired width
|
||||||
screenHeight = height; // User desired height
|
screenHeight = height; // User desired height
|
||||||
currentWidth = width;
|
|
||||||
currentHeight = height;
|
|
||||||
|
|
||||||
screenScaling = MatrixIdentity(); // No draw scaling required by default
|
screenScaling = MatrixIdentity(); // No draw scaling required by default
|
||||||
|
|
||||||
@@ -2459,6 +2457,9 @@ static bool InitGraphicsDevice(int width, int height)
|
|||||||
if (screenHeight <= 0) screenHeight = displayHeight;
|
if (screenHeight <= 0) screenHeight = displayHeight;
|
||||||
#endif // PLATFORM_DESKTOP
|
#endif // PLATFORM_DESKTOP
|
||||||
|
|
||||||
|
currentWidth = screenWidth;
|
||||||
|
currentHeight = screenHeight;
|
||||||
|
|
||||||
#if defined(PLATFORM_WEB)
|
#if defined(PLATFORM_WEB)
|
||||||
displayWidth = screenWidth;
|
displayWidth = screenWidth;
|
||||||
displayHeight = screenHeight;
|
displayHeight = screenHeight;
|
||||||
@@ -2533,10 +2534,10 @@ static bool InitGraphicsDevice(int width, int height)
|
|||||||
if (fullscreen)
|
if (fullscreen)
|
||||||
{
|
{
|
||||||
// Obtain recommended displayWidth/displayHeight from a valid videomode for the monitor
|
// Obtain recommended displayWidth/displayHeight from a valid videomode for the monitor
|
||||||
int count;
|
int count = 0;
|
||||||
const GLFWvidmode *modes = glfwGetVideoModes(glfwGetPrimaryMonitor(), &count);
|
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++)
|
for (int i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
if (modes[i].width >= screenWidth)
|
if (modes[i].width >= screenWidth)
|
||||||
|
Reference in New Issue
Block a user