A few joystick related cleanups

This commit is contained in:
Jasmine Iwanek
2025-06-30 09:00:23 -04:00
parent 24a1163a82
commit be7406637e
3 changed files with 25 additions and 32 deletions

View File

@@ -15,7 +15,7 @@
*
* Copyright 2016-2022 Miran Grca.
* Copyright 2008-2018 Sarah Walker.
* Copyright 2021 RichardG.
* Copyright 2021 RichardG.
* Copyright 2021-2025 Jasmine Iwanek.
*/
#ifndef EMU_GAMEPORT_H
@@ -52,6 +52,26 @@
#define GAMEPORT_8ADDR 0x080000
#define GAMEPORT_SIO 0x1000000
typedef struct joystick_if_t {
const char *name;
const char *internal_name;
void *(*init)(void);
void (*close)(void *priv);
uint8_t (*read)(void *priv);
void (*write)(void *priv);
int (*read_axis)(void *priv, int axis);
void (*a0_over)(void *priv);
int axis_count;
int button_count;
int pov_count;
int max_joysticks;
const char *axis_names[MAX_JOY_AXES];
const char *button_names[MAX_JOY_BUTTONS];
const char *pov_names[MAX_JOY_POVS];
} joystick_if_t;
typedef struct plat_joystick_t {
char name[260];
@@ -90,26 +110,6 @@ typedef struct joystick_t {
int pov_mapping[MAX_JOY_POVS][2];
} joystick_t;
typedef struct joystick_if_t {
const char *name;
const char *internal_name;
void *(*init)(void);
void (*close)(void *priv);
uint8_t (*read)(void *priv);
void (*write)(void *priv);
int (*read_axis)(void *priv, int axis);
void (*a0_over)(void *priv);
int axis_count;
int button_count;
int pov_count;
int max_joysticks;
const char *axis_names[MAX_JOY_AXES];
const char *button_names[MAX_JOY_BUTTONS];
const char *pov_names[MAX_JOY_POVS];
} joystick_if_t;
extern device_t game_ports[GAMEPORT_MAX];
#ifdef __cplusplus
@@ -186,14 +186,6 @@ extern const joystick_if_t joystick_sw_pad;
extern const joystick_if_t joystick_tm_fcs;
extern const joystick_if_t joystick_tm_fcs_rcs;
extern int gameport_available(int);
extern int gameport_has_config(int);
extern const char *gameport_get_internal_name(int);
extern int gampeport_get_from_internal_name(char *);
#ifdef EMU_DEVICE_H
extern const device_t *gameport_getdevice(int);
#endif
#ifdef __cplusplus
}
#endif