Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • 0
bufu1337

gpu.bind() BUG

Question

Hello guys,

due to my scripting for my  Screen Sharing script (multiple servers with 2 screens) i bumped into a bug and i didnt find a solution for that:

i have two screens (naming MainScreen, TempScreen), both have one keyboard, standing a few blocks away from each other. And one server, the server has to switch between them.

Now the server starts on MainScreen and with

components.gpu.bind(TempScreen, true)

switching to the TempScreen...

unfortunately when i want to type something on the TempScreen nothing happens, i can get on the screen but he doesnt type... going to the MainScreen and typing there, nothing... going back to TempScreen and hahaha, the typed text from MainScreen is shown there...

How can i bind the keyboard, is there a command for the keyboard? I didnt find anything in the wiki about that... this bug torpedos my Screen Sharing script because another server has to use the MainScreen after this, but the keyboard stays for both servers

Edit: like i described, the keyboard is obviously bound to the server and not to the screen like it is described in the wiki

Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

This isn't a bug, per se, but you are venturing into unsupported territory of openos

For performance reasons and simplicity of code, the core of openos is optimized for the most common workflow, which is 1 screen. There is caching involved in the tty layer of openos to read and write to the same screen and gpu.

Some day I'll provide a userspace api for managing multiple screens and multiple windows

You'll need to release the keyboard manually :) See, I just don't support this in openos

`require("tty").window.keyboard = nil`

1. This is NOT future proof. When the day comes that I build a multi-screen and multi-window api layer, I am free to change this data structure.

2. Yes this is safe to do (in openos today), the code expects that the kb can be "released" like this

3. I would do this after you switch screens on the gpu

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.