osPfsIsPlug.3p
1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
.TH osPfsIsPlug 3P local "Silicon Graphics, Inc."
.SH NAME
.upperok
osPfsIsPlug \- poll for CONTROLLER PAK
.SH SYNOPSIS
.nf
\f3
.Op c
#include <ultra64.h>
.sp .8v
s32 osPfsIsPlug(OSMesgQueue \(**mq, u8 \(**bitpattern);
.Op
\f1
.fi
.SH DESCRIPTION
The
.I osPfsIsPlug
call returns a bit pattern to
indicate which game controllers with CONTROLLER PAKs.
The message queue
.I mq
must be an initialized message queue associated with the
.I OS_EVENT_SI
event.
See
.IR osSetEventMesg (3P)
for details on how to create this association.
Since the
.I osPfsIsPlug
routine will wait on the message queue
.I mq,
this queue must not be shared.
In addition, it is required that
.IR osContInit (3P)
must be called to initialize the low level synchronization before osPfsIsPlug can be called.
.sp
A value of 0 is returned if the calls succeed, otherwise
-1 is returned.
.SH EXAMPLE
.nf
.ta 5 18
main()
{
OSMesgQueue intMesgQueue;
OSMesg intMesgBuf[1];
OSContStatus sdata[MAXCONTROLLERS];
u8 cont_pattern, pak_pattern;
.sp
osCreateMesgQueue(&intMesgQueue, intMesgBuf, 1);
osSetEventMesg(OS_EVENT_SI, &intMesgQueue, dummyMessage);
osContInit(&intMesgQueue, &cont_pattern, &sdata[0]);
osPfsIsPlug(&intMesgQueue, &pak_pattern);
}
.fi
.SH "SEE ALSO"
osContInit (3P),
osPfsAllocateFile (3P),
osPfsChecker (3P),
osPfsFileState (3P),
osPfsFreeBlocks (3P),
osPfsInit (3P),
osPfsReSizeFile (3P),
osPfsReadWriteFile (3P),
osPfsSetLabel (3P)