From d4a3d7f721069c51eb06a310661199826b3a7e36 Mon Sep 17 00:00:00 2001 From: Fellippe Heitor Date: Sun, 7 Feb 2021 11:54:52 -0300 Subject: [PATCH] Enables _SCREENX/_SCREENY for macOS/Linux. --- internal/c/libqb.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/c/libqb.cpp b/internal/c/libqb.cpp index f37ec5d4d..d9624e013 100644 --- a/internal/c/libqb.cpp +++ b/internal/c/libqb.cpp @@ -25063,6 +25063,9 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){ #if defined(QB64_GUI) && defined(QB64_WINDOWS) && defined(QB64_GLUT) while (!window_exists){Sleep(100);} //Wait for window to be created before checking position return glutGet(GLUT_WINDOW_X) - glutGet(GLUT_WINDOW_BORDER_WIDTH); + #elif defined(QB64_GUI) && defined(QB64_GLUT) + while (!window_exists){Sleep(100);} //Wait for window to be created before checking position + return glutGet(GLUT_WINDOW_X); #endif return 0; //if not windows then return 0 } @@ -25071,6 +25074,9 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){ #if defined(QB64_GUI) && defined(QB64_WINDOWS) && defined(QB64_GLUT) while (!window_exists){Sleep(100);} //Wait for window to be created before checking position return glutGet(GLUT_WINDOW_Y) - glutGet(GLUT_WINDOW_BORDER_WIDTH) - glutGet(GLUT_WINDOW_HEADER_HEIGHT); + #elif defined(QB64_GUI) && defined(QB64_GLUT) + while (!window_exists){Sleep(100);} //Wait for window to be created before checking position + return glutGet(GLUT_WINDOW_Y); #endif return 0; //if not windows then return 0 }