Skip to content

Commit

Permalink
fix max() compat with some compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
arpruss committed Feb 8, 2023
1 parent f6c71c7 commit c821d5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=GameControllersSTM32
version=0.0.6
version=0.0.7
author=Alexander Pruss
maintainer=arpruss <[email protected]>
sentence=Support Nunchuck, GameCube controller and Game Port joysticks on STM32F1
Expand Down
2 changes: 1 addition & 1 deletion src/SegaController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ SegaController::SegaController(unsigned db9_pin_7, unsigned db9_pin_1, unsigned

word SegaController::getState()
{
if (max(millis() - _lastReadTime, 0) < SC_READ_DELAY_MS)
if (millis()-_lastReadTime < SC_READ_DELAY_MS)
{
// Not enough time has elapsed, return previously read state
return _currentState;
Expand Down

0 comments on commit c821d5f

Please sign in to comment.