Remove unused screenshot code
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
68c77cd7d8
commit
2867ac7a1c
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue