06 February 2022, 14:25 | #1 |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,189
|
Prevent input from reaching CLI/WB
I'm sure this must have been asked a million times, but I haven't been able to find anything (that I can get to work).
I'm trying to do some graphics stuff in a not too system-unfriendly manner so I do: Code:
SetTaskPri(FindTask(NULL), 127); Forbid(); LoadView(NULL); WaitTOF(); WaitTOF(); AddIntServer(INTB_VERTB, &intr); while (ciaa->ciapra & (1 << CIAB_GAMEPORT0)) { // Somewhat naughty stuff that writes to custom registers etc. } // restore old view / copper Permit(); I've tried: - Opening a dummy window - Sending CMD_STOP/CMD_START (also tried throwing in CMD_RESET/CMD_FLUSH for good measure) to input.device - Adding an input handler to input.device and just returning NULL/modifying RAWKEY/RAWMOUSE events to set NOBUTTON (Similar to the code here: https://github.com/weiju/amiga_c_mod...n/example_01.c) - SetVBuf(Input(), NULL, BUF_NONE, -1) and draining Input() - Looked at this post: https://eab.abime.net/showthread.php?p=1507339 and tried opening RAW: (this opens a new window, which I guess is to be expected, so maybe I would need to reopen stdin/Input()?) Waiting for LMB to be released again before exiting the loop seems to take care of that part at least. I don't care if the keypresses are shown in console window, just that they don't pause the shell (or executed as commands). Adding an input handler seems to almost work, but it seems to only be called after my main loop (yes, I've also tried removing Forbid/Permit, and waiting for the message port in the IORequest structure). I know I can just bang the system on its head and fiddle with DMACON/INTENA, but that's what I'm trying to avoid... Note: Primary using VBCC, but also tried with Bebbo's GCC. |
06 February 2022, 14:57 | #2 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,488
|
|
06 February 2022, 18:39 | #3 |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,189
|
Ross, you're the best, exactly that. Works perfectly
Seems like I was pretty close (but still too far away...), but glad I asked because I hadn't though of the pr_WindowPtr thing for requesters. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
TYPEing rs232 serial input to CLI terminal | Tavis | support.Other | 6 | 01 March 2019 02:11 |
how to prevent windows audio cd playpack during emulation? | honx | support.WinUAE | 24 | 11 December 2018 10:48 |
How to prevent 100% CPU usage ? | mahen | support.FS-UAE | 3 | 01 November 2017 20:19 |
reaching bottom screen with Copper | sodapop | Coders. Asm / Hardware | 21 | 09 March 2016 19:22 |
will a NTSC A520 prevent me... | NfernalNfluence | support.Hardware | 0 | 08 September 2007 12:07 |
|
|