SetDeviceWindow

Jimmy

New member
3rd Party Module Dev
Tutorial Author
Joined
Jan 2, 2020
Messages
569
I suggest making SetDeviceWindow command even more flexible. I came to think of this because if you just use SetDeviceWindow with Window positon right afterwards it does not look too good. Making everything into one operation would be a good idea.

It would mean implementing optional parameters into SetDeviceWindow

SetDeviceWindow width,height, flags
would become
SetDeviceWindow width,height, flags[,xpos=centred,ypos=centred]

No parameters would behave like now, it would center the window.
 

Jimmy

New member
3rd Party Module Dev
Tutorial Author
Joined
Jan 2, 2020
Messages
569
Also it should preferably not rename the window to "CerberusGame" (or what you set #GLFW_WINDOW_TITLE to) everytime it is called.
The name will still blink if you set your title straight after using other command. This is just a problem of course if you want to have a dynamic title.
 
Last edited:

Jimmy

New member
3rd Party Module Dev
Tutorial Author
Joined
Jan 2, 2020
Messages
569
Lastly, using SetDeviceWindow forces mousepointer to middle everytime.
So basically SetDeviceWindow is resetting a lot of things it would be better if it didn't.
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
2,812
So basically SetDeviceWindow is resetting a lot of things it would be better if it didn't.
Of course it does, as it deletes and recreates the window. That is how GLFW, the Window framework CX utilizies, works.

Regarding the mouse pointer, there is a setting in GLFW for centering it, but it is surpose to be off by default.
I noticed it will center the pointer always when it is fullscreen and on Windows, but not in window mode.
Might be that this part is still buggy in GLFW. GLFW user where complaining about it for a few years now.

About the title, that is something I can do differently.
 

Jimmy

New member
3rd Party Module Dev
Tutorial Author
Joined
Jan 2, 2020
Messages
569
GLFW have had this problem with a centred mousepointer and also no access to a global mousepointer even, for a long time I think, it's solved but not merged into the main branch, if I understood it correctly.
 
Top Bottom