1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-30 05:10:37 +00:00

Fix to _SCREENMOVE _MIDDLE

Requesting state for an invalid GLUT state name returns negative one...

So, we start with a -1 and wait until GLUT has initialized our window
and registered it with the OS all properly, and then use the proper
return value to move the window to the middle of the screen.
This commit is contained in:
SteveMcNeill 2018-11-02 08:04:39 -04:00
parent 100ecdb957
commit 511aee9d3a

View file

@ -24860,8 +24860,8 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
if (passed==2){
glutPositionWindow (x,y);}
else{
int32 SW, SH, WW, WH;
SW = glutGet(GLUT_SCREEN_WIDTH);
int32 SW=-1, SH, WW, WH;
while (SW==-1){SW = glutGet(GLUT_SCREEN_WIDTH);}
SH = glutGet(GLUT_SCREEN_HEIGHT);
WW = glutGet(GLUT_WINDOW_WIDTH);
WH = glutGet(GLUT_WINDOW_HEIGHT);