Skip to content

Commit a994685

Browse files
committed
Only check for rstudio graphics device
1 parent 1c13df0 commit a994685

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

R/animate.r

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ animate <- function(data, tour_path = grand_tour(), display = display_xy(), star
4848
to_stop()
4949
}
5050
plat <- find_platform()
51-
if (plat$iface == "rstudio" && fps > 19) {
52-
warning("Rstudio supports maximum fps of 19", call. = FALSE)
51+
if (rstudio_gd() && fps > 19) {
52+
warning("Rstudio graphics device supports maximum fps of 19", call. = FALSE)
5353
fps <- 19
5454
}
5555

@@ -101,4 +101,4 @@ animate <- function(data, tour_path = grand_tour(), display = display_xy(), star
101101
invisible(bases[, , seq_len(b)])
102102
}
103103

104-
104+
rstudio_gd <- function() identical(names(dev.cur()), "RStudioGD")

0 commit comments

Comments
 (0)