Remove unused screenshot code

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-02-07 22:16:32 +00:00
parent 68c77cd7d8
commit 2867ac7a1c
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 0 additions and 31 deletions

View File

@ -3210,37 +3210,6 @@ session_destroy(session_t *ps) {
log_deinit_tls();
}
#if 0
/**
* @brief Dump the given data to a file.
*/
static inline bool
write_binary_data(const char *path, const unsigned char *data, int length) {
if (!data)
return false;
FILE *f = fopen(path, "wb");
if (!f) {
log_error("Failed to open \"%s\" for writing.", path);
return false;
}
int wrote_len = fwrite(data, sizeof(unsigned char), length, f);
fclose(f);
if (wrote_len != length) {
log_error("Failed to write all blocks: %d / %d to %s",
wrote_len, length, path);
return false;
}
return true;
}
static inline void
dump_img(session_t *ps) {
int len = 0;
unsigned char *d = glx_take_screenshot(ps, &len);
write_binary_data("/tmp/dump.raw", d, len);
free(d);
}
#endif
/**
* Do the actual work.
*