GUAC-236: Fully implement sync instruction. Stub timestamp update for display.
This commit is contained in:
parent
4634ce391a
commit
899cdb4c00
@ -22,14 +22,28 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "display.h"
|
||||
#include "log.h"
|
||||
|
||||
#include <guacamole/client.h>
|
||||
#include <guacamole/timestamp.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
int guacenc_display_sync(guacenc_display* display, guac_timestamp timestamp) {
|
||||
|
||||
/* Verify timestamp is not decreasing */
|
||||
if (timestamp < display->last_sync) {
|
||||
guacenc_log(GUAC_LOG_DEBUG, "Decreasing sync timestamp");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Update timestamp of display */
|
||||
display->last_sync = timestamp;
|
||||
|
||||
/* STUB */
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
guacenc_display* guacenc_display_alloc() {
|
||||
|
@ -75,9 +75,8 @@ int guacenc_handle_sync(guacenc_display* display, int argc, char** argv) {
|
||||
/* Parse arguments */
|
||||
guac_timestamp timestamp = guacenc_parse_timestamp(argv[0]);
|
||||
|
||||
/* STUB */
|
||||
guacenc_log(GUAC_LOG_DEBUG, "sync: timestamp=%" PRId64, timestamp);
|
||||
return 0;
|
||||
/* Update timestamp / flush frame */
|
||||
return guacenc_display_sync(display, timestamp);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user