# GBDK 2020 Docs: joypads_t Struct Reference

joypads_t Struct Reference

`#include <gb.h>`

## Data Fields

uint8_t | npads
union {
struct {
uint8_t joy0
uint8_t joy1
uint8_t joy2
uint8_t joy3
} |
uint8_t joypads [4]
}; |

## Detailed Description

Multiplayer joypad structure.

Must be initialized with joypad_init() first then it may be used to poll all avaliable joypads with joypad_ex()

## Field Documentation

## npads

uint8_t joypads_t::npads

## joy0

uint8_t joypads_t::joy0

## joy1

uint8_t joypads_t::joy1

## joy2

uint8_t joypads_t::joy2

## joy3

uint8_t joypads_t::joy3

## joypads

uint8_t joypads_t::joypads[4]

## @1

union { ... }

The documentation for this struct was generated from the following files:

- gb/gb.h
- sms/sms.h