Rewritten X11 video mode support to directly set requested modes and exactly restore the desktop mode at shutdown.
This commit is contained in:
parent
02dd74ba7e
commit
925bca7d2a
2 changed files with 396 additions and 543 deletions
File diff suppressed because it is too large
Load diff
|
@ -29,6 +29,8 @@ typedef struct
|
||||||
Visual *visual;
|
Visual *visual;
|
||||||
int depth;
|
int depth;
|
||||||
int scanline_pad;
|
int scanline_pad;
|
||||||
|
int x;
|
||||||
|
int y;
|
||||||
|
|
||||||
int use_xinerama;
|
int use_xinerama;
|
||||||
int use_xrandr;
|
int use_xrandr;
|
||||||
|
@ -38,22 +40,25 @@ typedef struct
|
||||||
XineramaScreenInfo xinerama_info;
|
XineramaScreenInfo xinerama_info;
|
||||||
int xinerama_screen;
|
int xinerama_screen;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SDL_VIDEO_DRIVER_X11_XRANDR
|
#if SDL_VIDEO_DRIVER_X11_XRANDR
|
||||||
XRRScreenConfiguration *screen_config;
|
RROutput xrandr_output;
|
||||||
int saved_size;
|
|
||||||
Rotation saved_rotation;
|
|
||||||
short saved_rate;
|
|
||||||
#endif
|
|
||||||
#if SDL_VIDEO_DRIVER_X11_XVIDMODE
|
|
||||||
XF86VidModeModeInfo saved_mode;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
int x, y;
|
|
||||||
} saved_view;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} SDL_DisplayData;
|
} SDL_DisplayData;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
#if SDL_VIDEO_DRIVER_X11_XRANDR
|
||||||
|
RRMode xrandr_mode;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if SDL_VIDEO_DRIVER_X11_XVIDMODE
|
||||||
|
XF86VidModeModeInfo vm_mode;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
} SDL_DisplayModeData;
|
||||||
|
|
||||||
extern int X11_InitModes(_THIS);
|
extern int X11_InitModes(_THIS);
|
||||||
extern void X11_GetDisplayModes(_THIS, SDL_VideoDisplay * display);
|
extern void X11_GetDisplayModes(_THIS, SDL_VideoDisplay * display);
|
||||||
extern int X11_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode);
|
extern int X11_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue