Skip to content

Trouble with user input and boot services at the same time #838

Closed
@DecrepitHuman

Description

@DecrepitHuman

I've written a display driver using embedded_graphics and the GraphicsOutput protocol. I'm using that to display geometry & text to the screen, and need to get keyboard input at the same time. I cannot do this at the moment because of the mutable borrow at SystemTable<Boot>::stdin() and the immutable borrow at SystemTable<Boot>::boot_services() that is used for the display driver. I can break these rules by casting the struct to a pointer and then de-referencing it to obtain a new "owned" instance but this is most definitely a ugly solution and I'm not 100% if this will cause problems (more specifically, I don't know if this will interfere with the ::boot_services() call).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions