Changeset 87a7cdb in mainline for uspace/srv/hid/display/main.c


Ignore:
Timestamp:
2019-12-05T19:35:12Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
71cbe5c
Parents:
973efd36
Message:

Enumerate display devices for output, RFB conversion (WIP)

Currently we can only have one active output device. Bitmaps
do not work as ipcgfx does not accept alloc != NULL.
Need to fill in tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/display/main.c

    r973efd36 r87a7cdb  
    8484
    8585/** Initialize display server */
    86 static errno_t display_srv_init(void)
     86static errno_t display_srv_init(ds_output_t **routput)
    8787{
    8888        ds_display_t *disp = NULL;
    8989        ds_seat_t *seat = NULL;
     90        ds_output_t *output = NULL;
    9091        gfx_context_t *gc = NULL;
    9192        errno_t rc;
     
    101102                goto error;
    102103
    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;
    109104#if 0
    110105        rc = ds_input_open(disp);
     
    112107                goto error;
    113108#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
    114119        async_set_fallback_port_handler(display_client_conn, disp);
    115120
     
    128133        }
    129134
     135        *routput = output;
    130136        return EOK;
    131137error:
     
    134140                ds_input_close(disp);
    135141#endif
     142        if (output != NULL)
     143                ds_output_destroy(output);
    136144        if (gc != NULL)
    137145                gfx_context_delete(gc);
     
    199207{
    200208        errno_t rc;
     209        ds_output_t *output;
    201210
    202211        printf("%s: Display server\n", NAME);
     
    207216        }
    208217
    209         rc = display_srv_init();
     218        rc = display_srv_init(&output);
    210219        if (rc != EOK)
    211220                return 1;
Note: See TracChangeset for help on using the changeset viewer.