Skip to content

Commit 19c694c

Browse files
committed
Put Teensy supported board warning in nested if
Will only warn about supported Teensy boards if using an unsupported Teensy board, and not for other board types
1 parent 1b61dad commit 19c694c

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

src/XInput.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,16 @@
3030
#warning "USB type is not set to XInput in boards menu! Board will not behave as an XInput device"
3131
#endif
3232

33-
// Teensy 3.1-3.2: __MK20DX256__
34-
// Teensy LC: __MKL26Z64__
35-
// Teensy 3.5: __MK64FX512__
36-
// Teensy 3.6: __MK66FX1M0__
37-
38-
#if defined(TEENSYDUINO) && \
39-
(defined(__MK20DX256__) || defined(__MKL26Z64__) || \
40-
defined(__MK64FX512__) || defined(__MK66FX1M0__))
41-
#else
42-
#warning "Not a supported board! Must use Teensy 3.1/3.2, LC, 3.5, or 3.6"
43-
#endif
33+
#if defined(TEENSYDUINO)
34+
// Teensy 3.1-3.2: __MK20DX256__
35+
// Teensy LC: __MKL26Z64__
36+
// Teensy 3.5: __MK64FX512__
37+
// Teensy 3.6: __MK66FX1M0__
38+
#if !defined(__MK20DX256__) && !defined(__MKL26Z64__) && \
39+
!defined(__MK64FX512__) && !defined(__MK66FX1M0__)
40+
#warning "Not a supported board! Must use Teensy 3.1/3.2, LC, 3.5, or 3.6"
41+
#endif /* if supported Teensy board */
42+
#endif /* if defined(TEENSYDUINO) */
4443

4544
// --------------------------------------------------------
4645
// XInput Button Maps |

0 commit comments

Comments
 (0)