mirror of
https://github.com/raphnet/gc_n64_usb-v3
synced 2024-08-13 17:03:49 -04:00
Share common N64 and GC buffers
This commit is contained in:
parent
03fcfa5b6c
commit
831487efe2
@ -1,2 +1,2 @@
|
||||
OBJS=main.o usb.o usbpad.o mappings.o gcn64_protocol.o n64.o gamecube.o usart1.o bootloader.o eeprom.o config.o hiddata.o usbstrings.o intervaltimer.o version.o gcn64txrx.o
|
||||
OBJS=main.o usb.o usbpad.o mappings.o gcn64_protocol.o n64.o gamecube.o usart1.o bootloader.o eeprom.o config.o hiddata.o usbstrings.o intervaltimer.o version.o gcn64txrx.o gamepads.o
|
||||
VERSIONSTR=\"3.0.0\"
|
||||
|
@ -32,12 +32,6 @@ static void gamecubeInit(void);
|
||||
static char gamecubeUpdate(void);
|
||||
static char gamecubeChanged(void);
|
||||
|
||||
/* What was most recently read from the controller */
|
||||
static gamepad_data last_built_report;
|
||||
|
||||
/* What was most recently sent to the host */
|
||||
static gamepad_data last_sent_report;
|
||||
|
||||
static char gc_rumbling = 0;
|
||||
static char origins_set = 0;
|
||||
static unsigned char orig_x, orig_y, orig_cx, orig_cy;
|
||||
|
6
gamepads.c
Normal file
6
gamepads.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include "gamepads.h"
|
||||
|
||||
/* Shared between N64 and GC (only one is used at a time). Saves memory. */
|
||||
|
||||
gamepad_data last_sent_report;
|
||||
gamepad_data last_built_report;
|
@ -80,6 +80,12 @@ typedef struct {
|
||||
char (*probe)(void); /* return true if found */
|
||||
} Gamepad;
|
||||
|
||||
/* What was most recently read from the controller */
|
||||
extern gamepad_data last_built_report;
|
||||
|
||||
/* What was most recently sent to the host */
|
||||
extern gamepad_data last_sent_report;
|
||||
|
||||
#endif // _gamepads_h__
|
||||
|
||||
|
||||
|
7
n64.c
7
n64.c
@ -36,13 +36,6 @@ static char must_rumble = 0;
|
||||
static char force_rumble = 0;
|
||||
#endif
|
||||
|
||||
|
||||
/* What was most recently read from the controller */
|
||||
static gamepad_data last_built_report;
|
||||
|
||||
/* What was most recently reported through getReport */
|
||||
static gamepad_data last_sent_report;
|
||||
|
||||
static void n64Init(void)
|
||||
{
|
||||
n64Update();
|
||||
|
Loading…
Reference in New Issue
Block a user