src/video/SDL_video.c
changeset 9818 cfeb59daba69
parent 9813 0652406e46c6
child 9887 77f017f7f16d
equal deleted inserted replaced
9817:d71f8723dbe8 9818:cfeb59daba69
  1677 {
  1677 {
  1678     CHECK_WINDOW_MAGIC(window,);
  1678     CHECK_WINDOW_MAGIC(window,);
  1679 
  1679 
  1680     /* Fullscreen windows are always at their display's origin */
  1680     /* Fullscreen windows are always at their display's origin */
  1681     if (window->flags & SDL_WINDOW_FULLSCREEN) {
  1681     if (window->flags & SDL_WINDOW_FULLSCREEN) {
       
  1682         int displayIndex;
       
  1683         
  1682         if (x) {
  1684         if (x) {
  1683             *x = 0;
  1685             *x = 0;
  1684         }
  1686         }
  1685         if (y) {
  1687         if (y) {
  1686             *y = 0;
  1688             *y = 0;
       
  1689         }
       
  1690 
       
  1691         /* Find the window's monitor and update to the
       
  1692            monitor offset. */
       
  1693         displayIndex = SDL_GetWindowDisplayIndex(window);
       
  1694         if (displayIndex >= 0) {
       
  1695             SDL_Rect bounds;
       
  1696 
       
  1697             SDL_zero(bounds);
       
  1698 
       
  1699             SDL_GetDisplayBounds(displayIndex, &bounds);
       
  1700             if (x) {
       
  1701                 *x = bounds.x;
       
  1702             }
       
  1703             if (y) {
       
  1704                 *y = bounds.y;
       
  1705             }
  1687         }
  1706         }
  1688     } else {
  1707     } else {
  1689         if (x) {
  1708         if (x) {
  1690             *x = window->x;
  1709             *x = window->x;
  1691         }
  1710         }