1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-05 08:50:25 +00:00

Uses GetSystemMetrics to return _DESKTOPWIDTH/HEIGHT in $CONSOLE:ONLY mode.

Windows-only.

Partially addresses and closes #58
This commit is contained in:
FellippeHeitor 2018-08-01 22:38:21 -03:00
parent 97151731b1
commit 1437dd98c8

View file

@ -20539,7 +20539,7 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
}//sub__icon
#endif //DEPENDENCY_ICON
int32 func_screenwidth () {
#ifdef QB64_GLUT
while (!window_exists){Sleep(100);}
@ -20547,11 +20547,15 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
while (!window_handle){Sleep(100);}
#endif
return glutGet(GLUT_SCREEN_WIDTH);
#else
#ifdef QB64_WINDOWS
return GetSystemMetrics(0);
#else
return 0;
return 0;
#endif
#endif
}
int32 func_screenheight () {
#ifdef QB64_GLUT
while (!window_exists){Sleep(100);}
@ -20559,11 +20563,15 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
while (!window_handle){Sleep(100);}
#endif
return glutGet(GLUT_SCREEN_HEIGHT);
#else
#ifdef QB64_WINDOWS
return GetSystemMetrics(1);
#else
return 0;
return 0;
#endif
#endif
}
void sub_screenicon () {
#ifdef QB64_GLUT
while (!window_exists){Sleep(100);}