src/sysdep/linux/graphics.c
static int add_video_modes_none(
    int screen, const XineramaScreenInfo *xinerama_screen_info)
{
    VideoModeInfo info;
    info.screen = screen;
    info.x11_screen = use_xinerama ? 0 : screen;

    if (use_xinerama) {
        info.width = xinerama_screen_info[screen].width;
        info.height = xinerama_screen_info[screen].height;
        info.x = xinerama_screen_info[screen].x_org;
        info.y = xinerama_screen_info[screen].y_org;
    } else {
        Screen *screen_p = ScreenOfDisplay(x11_display, screen);
        info.width = WidthOfScreen(screen_p);
        info.height = HeightOfScreen(screen_p);
        info.x = 0;
        info.y = 0;
    }
    info.refresh_n = 0;
    info.refresh_d = 1;
    if (UNLIKELY(!add_video_mode(&info))) {
        DLOG("Out of memory initializing video modes");
        return 0;
    }
    original_video_mode[screen] = num_video_modes - 1;
    return 1;
}
/*************************************************************************/
/***************** Local routines: Video mode management *****************/
/*************************************************************************/
Local routines: Video mode management
Local routines : Video mode management
static int add_video_modes_none(
    int screen, const XineramaScreenInfo *xinerama_screen_info)
{
    VideoModeInfo info;
    info.screen = screen;
    info.x11_screen = use_xinerama ? 0 : screen;
    if (use_xinerama) {
        info.width = xinerama_screen_info[screen].width;
        info.height = xinerama_screen_info[screen].height;
        info.x = xinerama_screen_info[screen].x_org;
        info.y = xinerama_screen_info[screen].y_org;
    } else {
        Screen *screen_p = ScreenOfDisplay(x11_display, screen);
        info.width = WidthOfScreen(screen_p);
        info.height = HeightOfScreen(screen_p);
        info.x = 0;
        info.y = 0;
    }
    info.refresh_n = 0;
    info.refresh_d = 1;
    if (UNLIKELY(!add_video_mode(&info))) {
        DLOG("Out of memory initializing video modes");
        return 0;
    }
    original_video_mode[screen] = num_video_modes - 1;
    return 1;
}
static int add_video_modes_none ( int screen , const XineramaScreenInfo * xinerama_screen_info ) { VideoModeInfo info ; info . screen = screen ; info . x11_screen = use_xinerama ? 0 : screen ; if ( use_xinerama ) { info . width = xinerama_screen_info [ screen ] . width ; info . height = xinerama_screen_info [ screen ] . height ; info . x = xinerama_screen_info [ screen ] . x_org ; info . y = xinerama_screen_info [ screen ] . y_org ; } else { Screen * screen_p = ScreenOfDisplay ( x11_display , screen ) ; info . width = WidthOfScreen ( screen_p ) ; info . height = HeightOfScreen ( screen_p ) ; info . x = 0 ; info . y = 0 ; } info . refresh_n = 0 ; info . refresh_d = 1 ; if ( UNLIKELY ( ! add_video_mode ( & info ) ) ) { DLOG ( " " ) ; return 0 ; } original_video_mode [ screen ] = num_video_modes - 1 ; return 1 ; }
Local routines: Video mode management
Local routines : Video mode management