GLFW - Set width and height to 0 causes error

Monkey Forums/Monkey Bug Reports/GLFW - Set width and height to 0 causes error

dopeyrulz(Posted 2013) [#1]
Mark,

Under GLFW, if you set the following in the CONFIG.MONKEY file:

#GLFW_WINDOW_WIDTH=0
#GLFW_WINDOW_HEIGHT=0

you receive the following error:
(ClCompile target) ->
..\main.cpp(2470): error C2059: syntax error : ';' [E:\Dev\Monkey\Frontend\Frontend\frontend.build\glfw\vc2010\MonkeyGame.vcxproj]
..\main.cpp(2473): error C2059: syntax error : ';' [E:\Dev\Monkey\Frontend\Frontend\frontend.build\glfw\vc2010\MonkeyGame.vcxproj]

And viewing the c++ source shows the following:
#define CFG_GLFW_WINDOW_HEIGHT
#define CFG_GLFW_WINDOW_WIDTH

Interestingly if you add the preprocessor flags into your main 'compiled' monkey file it does process as expected. Also if you set them as 0.0 for example it picks that up Ok:
#GLFW_WINDOW_WIDTH=0.0
#GLFW_WINDOW_HEIGHT=0.0


slenkar(Posted 2013) [#2]
probly related to this:
http://monkeycoder.co.nz/Community/posts.php?topic=4730


dopeyrulz(Posted 2013) [#3]
@Slenkar - ah thanks!

Mark,

as a follow-up is it possible to rather than set the GLFW window by default to 640x480, make it default to the current desktop window size:

        // Default window size
        //width  = 640;
        //height = 480;
	GLFWvidmode desktopMode;
	glfwGetDesktopMode(&desktopMode);
	width = desktopMode.Width;
	height = desktopMode.Height;