raysan5 / raylib

A simple and easy-to-use library to enjoy videogames programming
http://www.raylib.com
zlib License
21.99k stars 2.22k forks source link

[raylib-cs] WARNING: GLFW: Failed to find selected monitor #4006

Closed home-gihub closed 4 months ago

home-gihub commented 4 months ago

Issue description

When trying to call Raylib.GetMonitorHeight(0); GLFW fails to find selected monitor and returns 0, when trying to make a window with this value System.AccessViolationException: occours.

Environment

Windows 10 Invidia GPU Intel i5 CPU 16 gb ram Visual Studio OpenGL ver ??? raylib 5.0

Issue Screenshot

image

Code Example

    int screenWidth = 200;
    int screenHeight = Raylib.GetMonitorHeight(0);
    Raylib.InitWindow(screenWidth, screenHeight, "Test");
home-gihub commented 4 months ago

BTW: I was decrementing screenheight by 1 and that was causing it to crash but it still happens and my transparent window wont draw anything