aboutsummaryrefslogtreecommitdiffstats
path: root/vnc.c
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@android.com>2011-05-10 07:06:00 +0200
committerDavid 'Digit' Turner <digit@android.com>2011-06-01 17:08:17 +0200
commit5973c775c853e26f684de58ad28c267281aaffd6 (patch)
treea1db31a2a98ec793e396a2de72f1a8858315d7af /vnc.c
parent317c9d54284844615b33a25834a63248bf1bfa73 (diff)
downloadexternal_qemu-5973c775c853e26f684de58ad28c267281aaffd6.zip
external_qemu-5973c775c853e26f684de58ad28c267281aaffd6.tar.gz
external_qemu-5973c775c853e26f684de58ad28c267281aaffd6.tar.bz2
qemu-timer.c: rename qemu_timer_new_scale()
Get rid of qemu_timer_new() implementation, and update all callers to use qemu_timer_new_ms() or qemu_timer_new_ns() instead. Rename qemu_new_timer_scale() to qemu_new_timer() to follow upstream conventions. Change-Id: Id2c04f8597ec5026e02f87b3e2c5507920eb688e
Diffstat (limited to 'vnc.c')
-rw-r--r--vnc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/vnc.c b/vnc.c
index dfcf34c..cc3ecaa 100644
--- a/vnc.c
+++ b/vnc.c
@@ -716,7 +716,7 @@ static void vnc_update_client(void *opaque)
if (vs->output.offset && !vs->audio_cap && !vs->force_update) {
/* kernel send buffers are full -> drop frames to throttle */
- qemu_mod_timer(vs->timer, qemu_get_clock(rt_clock) + VNC_REFRESH_INTERVAL);
+ qemu_mod_timer(vs->timer, qemu_get_clock_ms(rt_clock) + VNC_REFRESH_INTERVAL);
return;
}
@@ -757,7 +757,7 @@ static void vnc_update_client(void *opaque)
}
if (!has_dirty && !vs->audio_cap && !vs->force_update) {
- qemu_mod_timer(vs->timer, qemu_get_clock(rt_clock) + VNC_REFRESH_INTERVAL);
+ qemu_mod_timer(vs->timer, qemu_get_clock_ms(rt_clock) + VNC_REFRESH_INTERVAL);
return;
}
@@ -805,7 +805,7 @@ static void vnc_update_client(void *opaque)
}
if (vs->csock != -1) {
- qemu_mod_timer(vs->timer, qemu_get_clock(rt_clock) + VNC_REFRESH_INTERVAL);
+ qemu_mod_timer(vs->timer, qemu_get_clock_ms(rt_clock) + VNC_REFRESH_INTERVAL);
} else {
vnc_disconnect_finish(vs);
}
@@ -1585,7 +1585,7 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings)
static void set_pixel_conversion(VncState *vs)
{
if ((vs->clientds.flags & QEMU_BIG_ENDIAN_FLAG) ==
- (vs->ds->surface->flags & QEMU_BIG_ENDIAN_FLAG) &&
+ (vs->ds->surface->flags & QEMU_BIG_ENDIAN_FLAG) &&
!memcmp(&(vs->clientds.pf), &(vs->ds->surface->pf), sizeof(PixelFormat))) {
vs->write_pixels = vnc_write_pixels_copy;
switch (vs->ds->surface->pf.bits_per_pixel) {
@@ -1693,7 +1693,7 @@ static void vnc_colordepth(VncState *vs)
vnc_write_u8(vs, 0); /* msg id */
vnc_write_u8(vs, 0);
vnc_write_u16(vs, 1); /* number of rects */
- vnc_framebuffer_update(vs, 0, 0, ds_get_width(vs->ds),
+ vnc_framebuffer_update(vs, 0, 0, ds_get_width(vs->ds),
ds_get_height(vs->ds), VNC_ENCODING_WMVi);
pixel_format_message(vs);
vnc_flush(vs);
@@ -2067,7 +2067,7 @@ static void vnc_connect(VncDisplay *vd, int csock)
vs->vd = vd;
vs->ds = vd->ds;
- vs->timer = qemu_new_timer(rt_clock, vnc_update_client, vs);
+ vs->timer = qemu_new_timer_ms(rt_clock, vnc_update_client, vs);
vs->last_x = -1;
vs->last_y = -1;
@@ -2175,7 +2175,7 @@ int vnc_display_password(DisplayState *ds, const char *password)
char *vnc_display_local_addr(DisplayState *ds)
{
VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;
-
+
return vnc_socket_local_addr("%s:%s", vs->lsock);
}