You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
DecrepitHuman
changed the title
Trouble with user input
Trouble with user input and boot services at the same time
May 31, 2023
I've written a display driver using
embedded_graphics
and theGraphicsOutput
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 atSystemTable<Boot>::stdin()
and the immutable borrow atSystemTable<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).The text was updated successfully, but these errors were encountered: