Changeset 87a7cdb in mainline for uspace/srv/hid/display/main.c
- Timestamp:
- 2019-12-05T19:35:12Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 71cbe5c
- Parents:
- 973efd36
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/main.c
r973efd36 r87a7cdb 84 84 85 85 /** Initialize display server */ 86 static errno_t display_srv_init( void)86 static errno_t display_srv_init(ds_output_t **routput) 87 87 { 88 88 ds_display_t *disp = NULL; 89 89 ds_seat_t *seat = NULL; 90 ds_output_t *output = NULL; 90 91 gfx_context_t *gc = NULL; 91 92 errno_t rc; … … 101 102 goto error; 102 103 103 rc = output_init(display_kbd_event, (void *) disp,104 display_pos_event, (void *) disp, &gc);105 if (rc != EOK)106 goto error;107 108 disp->gc = gc;109 104 #if 0 110 105 rc = ds_input_open(disp); … … 112 107 goto error; 113 108 #endif 109 rc = ds_output_create(display_kbd_event, (void *) disp, 110 display_pos_event, (void *) disp, &output); 111 if (rc != EOK) 112 goto error; 113 114 output->def_display = disp; 115 rc = ds_output_start_discovery(output); 116 if (rc != EOK) 117 goto error; 118 114 119 async_set_fallback_port_handler(display_client_conn, disp); 115 120 … … 128 133 } 129 134 135 *routput = output; 130 136 return EOK; 131 137 error: … … 134 140 ds_input_close(disp); 135 141 #endif 142 if (output != NULL) 143 ds_output_destroy(output); 136 144 if (gc != NULL) 137 145 gfx_context_delete(gc); … … 199 207 { 200 208 errno_t rc; 209 ds_output_t *output; 201 210 202 211 printf("%s: Display server\n", NAME); … … 207 216 } 208 217 209 rc = display_srv_init( );218 rc = display_srv_init(&output); 210 219 if (rc != EOK) 211 220 return 1;
Note:
See TracChangeset
for help on using the changeset viewer.