diff options
author | Johns <johns98@gmx.net> | 2012-02-13 14:00:53 +0100 |
---|---|---|
committer | Johns <johns98@gmx.net> | 2012-02-13 14:00:53 +0100 |
commit | f872f54e2a1429402ae1ba6768c2169443a81272 (patch) | |
tree | 7c84a45eb08d9cc1fd915181344c64ad160a9f26 | |
parent | 33c638d538cef475cbcd61a941dc94294417e849 (diff) | |
download | vdr-plugin-softhddevice-f872f54e2a1429402ae1ba6768c2169443a81272.tar.gz vdr-plugin-softhddevice-f872f54e2a1429402ae1ba6768c2169443a81272.tar.bz2 |
Window defaults to fullscreen without geometry.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | video.c | 27 |
2 files changed, 24 insertions, 9 deletions
@@ -1,3 +1,9 @@ +User johns +Date: + + Release Version 0.4.7 + Window size defaults to fullscreen, if no geometry is given. + User m.Rcu Date: Sun Feb 12 20:28:22 CET 2012 @@ -9162,21 +9162,21 @@ void VideoInit(const char *display_name) } // Open the connection to the X server. // use the DISPLAY environment variable as the default display name - if (!display_name) { - display_name = getenv("DISPLAY"); - if (!display_name) { - // use :0.0 as default display name - display_name = ":0.0"; - } + if (!display_name && !(display_name = getenv("DISPLAY"))) { + // if no environment variable, use :0.0 as default display name + display_name = ":0.0"; } if (!(XlibDisplay = XOpenDisplay(display_name))) { - Fatal(_("video: Can't connect to X11 server on '%s'\n"), display_name); + Error(_("video: Can't connect to X11 server on '%s'\n"), display_name); // FIXME: we need to retry connection + return; } // XInitThreads(); // Convert XLIB display to XCB connection if (!(Connection = XGetXCBConnection(XlibDisplay))) { - Fatal(_("video: Can't convert XLIB display to XCB connection\n")); + Error(_("video: Can't convert XLIB display to XCB connection\n")); + VideoExit(); + return; } // prefetch extensions //xcb_prefetch_extension_data(Connection, &xcb_big_requests_id); @@ -9201,8 +9201,10 @@ void VideoInit(const char *display_name) if (!VideoWindowHeight) { if (VideoWindowWidth) { VideoWindowHeight = (VideoWindowWidth * 9) / 16; + } else { // default to fullscreen + VideoWindowHeight = screen->height_in_pixels; + VideoWindowWidth = screen->width_in_pixels; } - VideoWindowHeight = 576; } if (!VideoWindowWidth) { VideoWindowWidth = (VideoWindowHeight * 16) / 9; @@ -9265,6 +9267,13 @@ void VideoInit(const char *display_name) } //xcb_prefetch_maximum_request_length(Connection); xcb_flush(Connection); + + // I would like to start threads here, but this produces: + // [xcb] Unknown sequence number while processing queue + // [xcb] Most likely this is a multi-threaded client and XInitThreads + // has not been called + //VideoPollEvent(); + //VideoThreadInit(); } /// |