Skip to content
Snippets Groups Projects
Commit d30a4a0f authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Start of a timeout handing framework.

As of this commit, LORD2 keeps track of the last time a key was
pressed, and a timeout occurs five minutes after that if it's
waiting for a key.  This has issues as the getstr() timeout does
not behave in this manner.

However, if the timeout callback style works, getstr() and the other
dk functions can grow callback support pretty easily, and this seems
like it may be the best way forward.

Further, disconnect handling should be tied up in this, and dorkit
does not have very robust features for this.  In most cases, a
disconnect will be treated the same as a timeout, so the same solution
should likely be usable by both.

The biggest challenge is preventing the need for all the code to
have exceptional condition handling, which can be quite tricky as
battles can end by running a REF file (For example, the training
centre).  This would mean all code paths reachable via REF calls
would need to fail nicely in the face of a connection loss/timeout.
parent 69e5b5f5
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment