home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #6
/
amigamamagazinepolishissue1998.iso
/
coders
/
jËzyki_programowania
/
amigae
/
e_v3.2a
/
src
/
various
/
2ndmouseport.e
next >
Wrap
Text File
|
2001-03-31
|
703b
|
29 lines
-> switches mouseports
OPT OSVERSION=37
MODULE 'devices/input', 'exec/io'
PROC main()
DEF request=NIL:PTR TO iostd,port=NIL
IF port:=CreateMsgPort()
IF request:=CreateIORequest(port,SIZEOF iostd)
IF OpenDevice('input.device',0,request,0)=0
request.command:=IND_SETMPORT
request.data:=[1]:CHAR -> 0 for original port, 1 for joyport
request.length:=1
DoIO(request)
CloseDevice(request)
ELSE
PutStr('Could not open input device\n')
ENDIF
DeleteIORequest(request)
ELSE
PutStr('Could not create iorequest\n')
ENDIF
DeleteMsgPort(port)
ELSE
PutStr('Could not open port\n')
ENDIF
ENDPROC