summaryrefslogtreecommitdiffstats
path: root/server/tests/test_display_resolution_changes.c
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/test_display_resolution_changes.c')
-rw-r--r--server/tests/test_display_resolution_changes.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/server/tests/test_display_resolution_changes.c b/server/tests/test_display_resolution_changes.c
index 4a66a755..4767ea9e 100644
--- a/server/tests/test_display_resolution_changes.c
+++ b/server/tests/test_display_resolution_changes.c
@@ -7,8 +7,6 @@
#include <stdlib.h>
#include "test_display_base.h"
-SpiceServer *server;
-SpiceCoreInterface *core;
SpiceTimer *ping_timer;
void show_channels(SpiceServer *server);
@@ -17,13 +15,14 @@ int ping_ms = 100;
void pinger(void *opaque)
{
+ Test *test = opaque;
// show_channels is not thread safe - fails if disconnections / connections occur
//show_channels(server);
- core->timer_start(ping_timer, ping_ms);
+ test->core->timer_start(ping_timer, ping_ms);
}
-void set_primary_params(Command *command)
+void set_primary_params(Test *test, Command *command)
{
#if 0
static int toggle = 0;
@@ -51,13 +50,16 @@ static Command commands[] = {
int main(void)
{
+ SpiceCoreInterface *core;
+ Test *test;
+
core = basic_event_loop_init();
- server = test_init(core);
+ test = test_new(core);
//spice_server_set_image_compression(server, SPICE_IMAGE_COMPRESS_OFF);
- test_add_display_interface(server);
- test_set_command_list(commands, COUNT(commands));
+ test_add_display_interface(test);
+ test_set_command_list(test, commands, COUNT(commands));
- ping_timer = core->timer_add(pinger, NULL);
+ ping_timer = core->timer_add(pinger, test);
core->timer_start(ping_timer, ping_ms);
basic_event_loop_mainloop();