Linux/SDL2: Add window position getter function

master
Zi Ree 2022-09-11 18:25:48 +02:00
parent 745ad55aa2
commit d42936ee6f
1 changed files with 8 additions and 3 deletions

View File

@ -1040,9 +1040,14 @@ BOOL LLWindowSDL::getFullscreen()
BOOL LLWindowSDL::getPosition(LLCoordScreen *position)
{
// *FIX: can anything be done with this?
position->mX = 0;
position->mY = 0;
int x;
int y;
SDL_GetWindowPosition(mWindow, &x, &y);
position->mX = x;
position->mY = y;
return TRUE;
}