Browse Source

Export the number of players from main

master
Raphael Assenat 7 months ago
parent
commit
5d06a6d6a3
2 changed files with 4 additions and 2 deletions
  1. +1
    -2
      main.c
  2. +3
    -0
      main.h

+ 1
- 2
main.c View File

@ -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();


+ 3
- 0
main.h View File

@ -1,8 +1,11 @@
#ifndef _main_h__
#define _main_h__
#include <stdint.h>
#include "config.h"
extern unsigned char current_pad_type[NUM_CHANNELS];
extern uint8_t num_players;
#endif // _main_h__

Loading…
Cancel
Save