09 May 2021, 04:10 | #1 |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,543
|
Checking volume exists/mounted without popping requester?
Is there a way to check that a volume is mounted (specifically, checking if someone's inserted a disk into df1: ) without popping the intuition requester?
(I'm aware of the hack given in the manual - Poke.l Peek.l(Peek.l(4)+276)+184,-1 - to disable the requester entirely, but I'd prefer to avoid doing that if at all possible since the game might be played in a Workbench environment) |
10 May 2021, 14:34 | #2 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,369
|
You could periodically scan the list of volumes, either using OS dos.library calls, or using the ElmoreDOSLib. It contains GetAssigns and Assign$ keywords, that can work something like this:
Code:
GetAssigns 2 ; 2 represents volumes done = False Repeat x$ = Assign$ If x$ = "" Then done = 1 If LCase$(x$) = "testvolume:" Then done = 2 Until done If done = 2 NPrint "TestVolume: is mounted" End If |
11 May 2021, 00:39 | #3 | |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,543
|
Quote:
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to check if a volume/drive exists? | Foebane | support.Apps | 9 | 16 February 2023 17:26 |
integrating cd volume in master volume | honx | request.UAE Wishlist | 2 | 14 June 2020 22:43 |
CD audio volume change is not applied if Paula volume is changed, too | thomas | support.WinUAE | 1 | 21 March 2014 16:50 |
Shell: test if a volume is mounted | z00mba | support.Apps | 2 | 17 June 2006 12:28 |
A4000 popping sound | jrom | support.Hardware | 7 | 10 May 2004 10:32 |
|
|