04 April 2018, 08:39 | #1 |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,548
|
Preventing background interaction when running in QAMIGA mode
I had a bug report re: Road Avenger from Predseda.
"A technical notice: system is not closed up / locked when the game is launched from WB. It means if you are clicking with a mouse / pressing keys in the game, you also do the same in workbench behind. This could accidentally lead to some unexpected actions in your system. The same with TimeGal." Road Avenger (as does TimeGal) runs 99% of the time in QAMIGA mode, it has to because it's constantly loading data from the disk (it only briefly drops to BLITZ to use the CreateDisplay command) What should I be doing to prevent background interaction? |
04 April 2018, 11:09 | #2 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,381
|
Ooh, interesting situation! The simplest thing I can think of is to open a fullscreen window without the normal window gadgets right before the game starts. That will absorb most of the keyboard and mouse inputs, other than left-Amiga shortcuts for screen flipping or system patches.
Other than that, some careful use of Forbid() and Permit() will stop and start multitasking as and when you need it. If you're constantly streaming that might not be doable, but if you're loading in chunks, you can very quickly turn it on and off as you go. It won't make for very system-friendly behaviour however... |
05 April 2018, 00:36 | #3 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,357
|
Isn't there a "close WB" command?
|
05 April 2018, 01:18 | #4 |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,548
|
@Daedalus The window idea sounds like the easiest, though I've never used Window before! After some experimenting I came up with this, does that look right to you?
Screen 0,1,"" Window 0, 0, 0, 320, 256, $800, "", 0, 0 @idrougge Cheers! I didn't know about the CloseWB option.. but I presume if it's used there's now way to get back into Workbench afterwards? I think on the balance, it'd be more useful if users didn't have to restart their Amigas after playing the game, but I've got other projects where it'll be handy |
05 April 2018, 02:06 | #5 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,381
|
Hmmm, I don't know a CloseWB command, but if it's available (maybe in the 3rd party libraries?) then that would be the easiest way to go. I suspect it would just reopen the WB screen again when it finishes since that happens with lots of other programs that close Workbench, though I couldn't be sure.
As for the window method, yep, that looks perfect. I was actually thinking of opening a window on Workbench instead (WbToScreen 0 assigns Screen ID 0 to the Workbench screen so you can use it in Blitz), but that's the same effect. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Interaction of signals and noixemul | pipper | Coders. System | 0 | 05 February 2018 20:01 |
Is my CyberVision 64/3D running in ZII mode? | nogginthenog | support.Hardware | 3 | 04 December 2016 18:27 |
Slamtilt running in background :S | xoen | support.Games | 2 | 09 February 2010 07:45 |
If I have WinUAE running on a 50 or 100Hz screen in PAL mode (50 fps), [more] | fmcpma | support.WinUAE | 3 | 27 August 2006 11:17 |
Sound running slow only in windowed mode | andreas | support.WinUAE | 0 | 15 June 2002 01:42 |
|
|