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-2024 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 */
21#pragma once
22
23#ifndef INPUT_H
24#define INPUT_H
25
26#include <stdint.h>
27
40#define VK_UP (1 << 0)
41
47#define VK_DOWN (1 << 1)
48
54#define VK_LEFT (1 << 2)
55
61#define VK_RIGHT (1 << 3)
62
68#define VK_FIRE_0 (1 << 4)
69
75#define VK_FIRE_1 (1 << 5)
76
111uint8_t joypad_get_state(uint8_t controller);
112
115#endif
uint8_t joypad_get_state(uint8_t controller)
MSX Get the status of the joystick buttons and levers.