1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-06 01:10:23 +00:00

Merge pull request #60 from SteveMcNeill/main

Fix to _desktopwidth, _desktopheight, _screenicon
This commit is contained in:
Steve McNeill 2022-05-17 07:48:08 -04:00 committed by GitHub
commit b3e97de9e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27355,19 +27355,11 @@ void sub__icon(int32 handle_icon, int32 handle_window_icon, int32 passed) {
#endif // DEPENDENCY_ICON #endif // DEPENDENCY_ICON
int32 func_screenwidth() { int32 func_screenwidth() {
#ifdef QB64_GLUT #ifdef QB64_WINDOWS
while (!window_exists) { return GetSystemMetrics(SM_CXSCREEN);
Sleep(100);
}
# ifdef QB64_WINDOWS
while (!window_handle) {
Sleep(100);
}
# endif
return glutGet(GLUT_SCREEN_WIDTH);
#else #else
# ifdef QB64_WINDOWS # ifdef QB64_GLUT
return GetSystemMetrics(0); return glutGet(GLUT_SCREEN_WIDTH);
# else # else
return 0; return 0;
# endif # endif
@ -27375,19 +27367,11 @@ int32 func_screenwidth() {
} }
int32 func_screenheight() { int32 func_screenheight() {
#ifdef QB64_GLUT #ifdef QB64_WINDOWS
while (!window_exists) { return GetSystemMetrics(SM_CYSCREEN);
Sleep(100);
}
# ifdef QB64_WINDOWS
while (!window_handle) {
Sleep(100);
}
# endif
return glutGet(GLUT_SCREEN_HEIGHT);
#else #else
# ifdef QB64_WINDOWS # ifdef QB64_GLUT
return GetSystemMetrics(1); return glutGet(GLUT_SCREEN_HEIGHT);
# else # else
return 0; return 0;
# endif # endif
@ -27400,6 +27384,7 @@ void sub_screenicon() {
Sleep(100); Sleep(100);
} }
# ifdef QB64_WINDOWS # ifdef QB64_WINDOWS
while (!window_handle) { while (!window_handle) {
Sleep(100); Sleep(100);
} }