diff options
| author | Lucas Shaw <49287729+shawlucas@users.noreply.github.com> | 2020-06-17 04:16:30 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-17 07:16:30 -0400 |
| commit | b86edcf92c1c6882f0bb9dd051eb6a1b0582de8b (patch) | |
| tree | 1a2405029a7b41cc6420060094dc158b03d2b5a2 /src/libultra_code/osContSetCh.c | |
| parent | 229e0c8629b5a3c984a8a2c5ed5aba2aa59d32d7 (diff) | |
Matched some controller files (#178)
* osPfsIsPlug.c and osContSetCh.c OK
* update
* __osPfsGetStatus.c OK
* removed unused asm
* Updated all libultra controller files to use new structs instead of the temporary structs. Added os_pfs.h
* controller updates
* fixed header guard
* Made suggested changes
Diffstat (limited to 'src/libultra_code/osContSetCh.c')
| -rw-r--r-- | src/libultra_code/osContSetCh.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/libultra_code/osContSetCh.c b/src/libultra_code/osContSetCh.c new file mode 100644 index 000000000..cd5c09de9 --- /dev/null +++ b/src/libultra_code/osContSetCh.c @@ -0,0 +1,21 @@ +#include <ultra64.h> +#include <global.h> + +/* + * s32 osContSetCh(u8 ch) + * This function specifies the number of devices for the functions to access when those functions access to multiple + * direct SI devices. + */ +s32 osContSetCh(u8 ch) { + __osSiGetAccess(); + + if (ch > MAXCONTROLLERS) { + __osMaxControllers = MAXCONTROLLERS; + } else { + __osMaxControllers = ch; + } + + __osContLastPoll = -2; + __osSiRelAccess(); + return 0; +} |
