mirror of
https://github.com/QB64Official/qb64.git
synced 2024-07-05 15:50:25 +00:00
Fix for _SCREENX and _SCREENY for Windows Users.
This commit is contained in:
parent
3941732ed5
commit
6995827479
|
@ -26861,43 +26861,17 @@ int32 func__printwidth(qbs* text, int32 screenhandle, int32 passed){
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 func__screenx(){
|
int32 func__screenx(){
|
||||||
|
#ifdef QB64_WINDOWS
|
||||||
#ifndef NO_S_D_L
|
return glutGet(GLUT_WINDOW_X) - glutGet(GLUT_WINDOW_BORDER_WIDTH);
|
||||||
#ifdef QB64_WINDOWS
|
#endif
|
||||||
static SDL_SysWMinfo info;
|
return 0; //if not windows then return 0
|
||||||
static HWND win;
|
|
||||||
static RECT r;
|
|
||||||
SDL_VERSION(&info.version);
|
|
||||||
if (SDL_GetWMInfo(&info)){
|
|
||||||
win =info.window;
|
|
||||||
GetWindowRect(win,&r);
|
|
||||||
return r.left;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif //NO_S_D_L
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 func__screeny(){
|
int32 func__screeny(){
|
||||||
|
#ifdef QB64_WINDOWS
|
||||||
#ifndef NO_S_D_L
|
return glutGet(GLUT_WINDOW_Y) - glutGet(GLUT_WINDOW_BORDER_WIDTH) - glutGet(GLUT_WINDOW_HEADER_HEIGHT);
|
||||||
|
#endif
|
||||||
#ifdef QB64_WINDOWS
|
return 0; //if not windows then return 0
|
||||||
static SDL_SysWMinfo info;
|
|
||||||
static HWND win;
|
|
||||||
static RECT r;
|
|
||||||
SDL_VERSION(&info.version);
|
|
||||||
if (SDL_GetWMInfo(&info)){
|
|
||||||
win =info.window;
|
|
||||||
GetWindowRect(win,&r);
|
|
||||||
return r.top;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif //NO_S_D_L
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub__screenmove(int32 x,int32 y,int32 passed){
|
void sub__screenmove(int32 x,int32 y,int32 passed){
|
||||||
|
|
Loading…
Reference in a new issue