libmsx
C library for MSX
Loading...
Searching...
No Matches
input.h
Go to the documentation of this file.
1// -*- coding: utf-8-unix -*-
2/*
3 * Copyright (c) 2021-2025 Daishi Mori (mori0091)
4 *
5 * This software is released under the MIT License.\n
6 * See https://github.com/mori0091/libmsx/blob/main/LICENSE
7 *
8 * GitHub libmsx project\n
9 * https://github.com/mori0091/libmsx
10 */
22#pragma once
23
24#ifndef INPUT_H
25#define INPUT_H
26
27#include <stdint.h>
28
41#define VK_UP (1 << 0)
42
48#define VK_DOWN (1 << 1)
49
55#define VK_LEFT (1 << 2)
56
62#define VK_RIGHT (1 << 3)
63
69#define VK_FIRE_0 (1 << 4)
70
76#define VK_FIRE_1 (1 << 5)
77
112uint8_t joypad_get_state(uint8_t controller);
113
116#endif
uint8_t joypad_get_state(uint8_t controller)
MSX Get the status of the joystick buttons and levers.