extract contour version from XTVERSION #1798

This commit is contained in:
nick black 2021-06-20 06:42:35 -04:00
parent 454d548650
commit d0889d3615
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
2 changed files with 7 additions and 0 deletions

View File

@ -738,6 +738,11 @@ stash_string(query_state* inits){
}else if(strncmp(inits->runstring, "WezTerm ", strlen("WezTerm ")) == 0){
inits->qterm = TERMINAL_WEZTERM;
}else if(strncmp(inits->runstring, "contour ", strlen("contour ")) == 0){
size_t bytes = strlen(inits->runstring) - 8 + 1;
inits->version = malloc(bytes);
if(inits->version){
memcpy(inits->version, inits->runstring + 8, bytes);
}
inits->qterm = TERMINAL_CONTOUR;
}
break;

View File

@ -943,6 +943,7 @@ TEST_CASE("Visual") {
}
}
// do a pixel video, reusing the same plane over and over
SUBCASE("LoadVideoPixelScaleOnePlane") {
if(notcurses_check_pixel_support(nc_) > 0){
if(notcurses_canopen_videos(nc_)){
@ -971,6 +972,7 @@ TEST_CASE("Visual") {
}
}
// do a pixel video with a different plane for each frame
SUBCASE("LoadVideoPixelScaleDifferentPlanes") {
if(notcurses_check_pixel_support(nc_) > 0){
if(notcurses_canopen_videos(nc_)){