From 5d06a6d6a32af82baf680a816d83f2c08a7c9149 Mon Sep 17 00:00:00 2001 From: Raphael Assenat Date: Thu, 4 Mar 2021 15:46:59 +0900 Subject: [PATCH] Export the number of players from main --- main.c | 3 +-- main.h | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 4b3aed1..4c1c744 100644 --- a/main.c +++ b/main.c @@ -541,6 +541,7 @@ void hwinit(void) } +uint8_t num_players = 1; unsigned char current_pad_type[NUM_CHANNELS] = { }; Gamepad *detectPad(unsigned char chn) @@ -661,7 +662,6 @@ int main(void) uint8_t gamepad_vibrate = 0; uint8_t state = STATE_WAIT_POLLTIME; uint8_t channel; - uint8_t num_players = 1; uint8_t i; hwinit(); @@ -851,7 +851,6 @@ int keyboard_main(void) uint8_t gamepad_vibrate = 0; uint8_t state = STATE_WAIT_POLLTIME; uint8_t channel; - uint8_t num_players = 1; uint8_t i; hwinit(); diff --git a/main.h b/main.h index dcb20a6..01027d1 100644 --- a/main.h +++ b/main.h @@ -1,8 +1,11 @@ #ifndef _main_h__ #define _main_h__ +#include + #include "config.h" extern unsigned char current_pad_type[NUM_CHANNELS]; +extern uint8_t num_players; #endif // _main_h__