Re: [mpg123-devel] Please test new network code in/out of mpg123 (now with HTTPS support)!
Brought to you by:
sobukus
From: Thomas O. <tho...@or...> - 2022-05-16 18:09:42
|
[repeating my reply on-list] Am Mon, 16 May 2022 09:33:57 -0700 schrieb Dave Yeo <dav...@gm...>: OK, so these would be minimal snippets to get key reads … > #define INCL_KBD > #define INCL_DOSPROCESS > #include <os2.h> > DosSleep(5); > > if(!KbdCharIn(&key,IO_NOWAIT,0) && key.chChar) > > { > > *val = key.chChar; > > return 1; > > } Well, I integrated that into mpg123 trunk now. Can we settle the DosSleep() value? It should match the timeout used for select with POSIX. Please report back if control now works. Or about a new error. > Almost, > H:\tmp>test.exe > terminal fd: 0 > got key: Î > got key: a > got key: s > got key: f > got key: d > got key: q > > Keep getting that Î on program start before pressing a key. Well, we could workaround this and just ignore the value. This is what mpg123 does with unknown keys. But figuring out where it comes from and how to deal with it properly would be better. Also: If you press an actual multibyte character, what happens here? > Leaving it running without the DosSleep(5) does block things badly, DosSleep(5) is 5 … microseconds? Nanoseconds? > ps Term is set to os2 Does it react to escape sequences for reverse video and hiding cursor? Mpg123 will attempt to use those. So … have a go with current trunk, please. Report how things look. If a progress bar is drawn … might upload a Video someplace to demonstrate some future retro computing;-) Alrighty then, Thomas |