Mercurial > sdl-ios-xcode
comparison src/video/x11/SDL_x11modes.c @ 1863:0e44c6f90b95
Fixed bug #241
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 20 Jun 2006 05:25:04 +0000 |
parents | 8d3ca155c396 |
children | c121d94672cb db4007f17bc8 |
comparison
equal
deleted
inserted
replaced
1862:fe99535ac064 | 1863:0e44c6f90b95 |
---|---|
627 #endif /* SDL_VIDEO_DRIVER_X11_XRANDR */ | 627 #endif /* SDL_VIDEO_DRIVER_X11_XRANDR */ |
628 | 628 |
629 #if SDL_VIDEO_DRIVER_X11_VIDMODE | 629 #if SDL_VIDEO_DRIVER_X11_VIDMODE |
630 /* XVidMode */ | 630 /* XVidMode */ |
631 if ( !use_xrandr && | 631 if ( !use_xrandr && |
632 #if SDL_VIDEO_DRIVER_X11_XINERAMA | |
632 (!use_xinerama || xinerama_info.screen_number == 0) && | 633 (!use_xinerama || xinerama_info.screen_number == 0) && |
634 #endif | |
633 CheckVidMode(this, &vm_major, &vm_minor) && | 635 CheckVidMode(this, &vm_major, &vm_minor) && |
634 SDL_NAME(XF86VidModeGetAllModeLines)(SDL_Display, SDL_Screen,&nmodes,&modes) ) | 636 SDL_NAME(XF86VidModeGetAllModeLines)(SDL_Display, SDL_Screen,&nmodes,&modes) ) |
635 { | 637 { |
636 #ifdef X11MODES_DEBUG | 638 #ifdef X11MODES_DEBUG |
637 printf("VidMode modes: (unsorted)\n"); | 639 printf("VidMode modes: (unsorted)\n"); |
898 int screen_h; | 900 int screen_h; |
899 | 901 |
900 screen_w = DisplayWidth(SDL_Display, SDL_Screen); | 902 screen_w = DisplayWidth(SDL_Display, SDL_Screen); |
901 screen_h = DisplayHeight(SDL_Display, SDL_Screen); | 903 screen_h = DisplayHeight(SDL_Display, SDL_Screen); |
902 | 904 |
903 #if SDL_VIDEO_DRIVER_X11_VIDMODE | 905 #if SDL_VIDEO_DRIVER_X11_XINERAMA |
904 if ( use_xinerama && | 906 if ( use_xinerama && |
905 window_w <= xinerama_info.width && | 907 window_w <= xinerama_info.width && |
906 window_h <= xinerama_info.height ) { | 908 window_h <= xinerama_info.height ) { |
907 x = xinerama_info.x_org; | 909 x = xinerama_info.x_org; |
908 y = xinerama_info.y_org; | 910 y = xinerama_info.y_org; |
909 } | 911 } |
910 #endif | 912 #endif /* SDL_VIDEO_DRIVER_X11_XINERAMA */ |
913 | |
911 if ( currently_fullscreen ) { | 914 if ( currently_fullscreen ) { |
912 /* Switch resolution and cover it with the FSwindow */ | 915 /* Switch resolution and cover it with the FSwindow */ |
913 move_cursor_to(this, x, y); | 916 move_cursor_to(this, x, y); |
914 set_best_resolution(this, window_w, window_h); | 917 set_best_resolution(this, window_w, window_h); |
915 move_cursor_to(this, x, y); | 918 move_cursor_to(this, x, y); |
960 } | 963 } |
961 | 964 |
962 /* Ungrab the input so that we can move the mouse around */ | 965 /* Ungrab the input so that we can move the mouse around */ |
963 X11_GrabInputNoLock(this, SDL_GRAB_OFF); | 966 X11_GrabInputNoLock(this, SDL_GRAB_OFF); |
964 | 967 |
965 #if SDL_VIDEO_DRIVER_X11_VIDMODE | 968 #if SDL_VIDEO_DRIVER_X11_XINERAMA |
966 if ( use_xinerama && | 969 if ( use_xinerama && |
967 window_w <= xinerama_info.width && | 970 window_w <= xinerama_info.width && |
968 window_h <= xinerama_info.height ) { | 971 window_h <= xinerama_info.height ) { |
969 x = xinerama_info.x_org; | 972 x = xinerama_info.x_org; |
970 y = xinerama_info.y_org; | 973 y = xinerama_info.y_org; |
971 } | 974 } |
972 #endif | 975 #endif /* SDL_VIDEO_DRIVER_X11_XINERAMA */ |
976 | |
973 /* Map the fullscreen window to blank the screen */ | 977 /* Map the fullscreen window to blank the screen */ |
974 screen_w = DisplayWidth(SDL_Display, SDL_Screen); | 978 screen_w = DisplayWidth(SDL_Display, SDL_Screen); |
975 screen_h = DisplayHeight(SDL_Display, SDL_Screen); | 979 screen_h = DisplayHeight(SDL_Display, SDL_Screen); |
976 get_real_resolution(this, &real_w, &real_h); | 980 get_real_resolution(this, &real_w, &real_h); |
977 if ( window_w > real_w ) { | 981 if ( window_w > real_w ) { |