summaryrefslogtreecommitdiffstats
path: root/server/tests/test_display_resolution_changes.c
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2012-04-19 13:48:41 +0300
committerYonit Halperin <yhalperi@redhat.com>2012-05-03 13:09:51 +0300
commit76fd64ad96aed9d7e567eb5e447a5d83181743f2 (patch)
treedcba375f5d3bbdaab1c2d98ffbdb9b77b88a3301 /server/tests/test_display_resolution_changes.c
parent703f32cda91db552167324c542e19ef720c474dc (diff)
downloadspice-76fd64ad96aed9d7e567eb5e447a5d83181743f2.tar.gz
spice-76fd64ad96aed9d7e567eb5e447a5d83181743f2.tar.xz
spice-76fd64ad96aed9d7e567eb5e447a5d83181743f2.zip
server/tests: refactor Command
Diffstat (limited to 'server/tests/test_display_resolution_changes.c')
-rw-r--r--server/tests/test_display_resolution_changes.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/tests/test_display_resolution_changes.c b/server/tests/test_display_resolution_changes.c
index ef26ee17..4a66a755 100644
--- a/server/tests/test_display_resolution_changes.c
+++ b/server/tests/test_display_resolution_changes.c
@@ -23,7 +23,7 @@ void pinger(void *opaque)
core->timer_start(ping_timer, ping_ms);
}
-void set_primary_params(void *cb_opaque, uint64_t *arg1, uint64_t *arg2)
+void set_primary_params(Command *command)
{
#if 0
static int toggle = 0;
@@ -39,14 +39,14 @@ void set_primary_params(void *cb_opaque, uint64_t *arg1, uint64_t *arg2)
#endif
static int count = 0;
- *arg1 = 800 + sin((float)count / 6) * 200;
- *arg2 = 600 + cos((float)count / 6) * 200;
+ command->create_primary.width = 800 + sin((float)count / 6) * 200;
+ command->create_primary.height = 600 + cos((float)count / 6) * 200;
count++;
}
static Command commands[] = {
- {DESTROY_PRIMARY, 0, 0, NULL, NULL},
- {CREATE_PRIMARY, 0, 0, set_primary_params, NULL},
+ {DESTROY_PRIMARY, NULL},
+ {CREATE_PRIMARY, set_primary_params},
};
int main(void)