Skip to content

Commit

Permalink
Make DRI3 extension optional. #1
Browse files Browse the repository at this point in the history
  • Loading branch information
jaelpark committed Jun 16, 2021
1 parent d7a2913 commit 2da10f5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/compositor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1713,10 +1713,13 @@ void X11Compositor::Start(){

xcb_dri3_query_version_cookie_t dri3Cookie = xcb_dri3_query_version(pbackend->pcon,XCB_DRI3_MAJOR_VERSION,XCB_DRI3_MINOR_VERSION);
xcb_dri3_query_version_reply_t *pdri3Reply = xcb_dri3_query_version_reply(pbackend->pcon,dri3Cookie,0);
//DRI3 extension is optional
if(!pdri3Reply)
throw Exception("DRI3 extension unavailable.");
DebugPrintf(stdout,"DRI3 %u.%u\n",pdri3Reply->major_version,pdri3Reply->minor_version);
free(pdri3Reply);
DebugPrintf(stderr,"DRI3 extension unavailable.");
else{
DebugPrintf(stdout,"DRI3 %u.%u\n",pdri3Reply->major_version,pdri3Reply->minor_version);
free(pdri3Reply);
}

xcb_flush(pbackend->pcon);

Expand Down

0 comments on commit 2da10f5

Please sign in to comment.