src/video/SDL_video.c
changeset 6786 7174fb08017a
parent 6784 8fd20f04d5d9
child 6787 95a4c5a5464c
equal deleted inserted replaced
6785:c094c438c0a6 6786:7174fb08017a
   912     display->current_mode = display_mode;
   912     display->current_mode = display_mode;
   913     return 0;
   913     return 0;
   914 }
   914 }
   915 
   915 
   916 int
   916 int
   917 SDL_GetWindowDisplay(SDL_Window * window)
   917 SDL_GetWindowDisplayIndex(SDL_Window * window)
   918 {
   918 {
   919     int displayIndex;
   919     int displayIndex;
   920     int i, dist;
   920     int i, dist;
   921     int closest = -1;
   921     int closest = -1;
   922     int closest_dist = 0x7FFFFFFF;
   922     int closest_dist = 0x7FFFFFFF;
   974 }
   974 }
   975 
   975 
   976 SDL_VideoDisplay *
   976 SDL_VideoDisplay *
   977 SDL_GetDisplayForWindow(SDL_Window *window)
   977 SDL_GetDisplayForWindow(SDL_Window *window)
   978 {
   978 {
   979     int displayIndex = SDL_GetWindowDisplay(window);
   979     int displayIndex = SDL_GetWindowDisplayIndex(window);
   980     if (displayIndex >= 0) {
   980     if (displayIndex >= 0) {
   981         return &_this->displays[displayIndex];
   981         return &_this->displays[displayIndex];
   982     } else {
   982     } else {
   983         return NULL;
   983         return NULL;
   984     }
   984     }