Skip to content

Commit

Permalink
Merge branch 'master' into orbit
Browse files Browse the repository at this point in the history
  • Loading branch information
Unreal-Dan committed May 3, 2024
2 parents 9f75632 + 9f4cfab commit 2f64a7c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 2 additions & 4 deletions VortexEngine/src/Patterns/Pattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,8 @@ bool Pattern::unserialize(ByteStream &buffer)
// start with the default args for this pattern
PatternArgs args = PatternBuilder::getDefaultArgs(m_patternID);
// then unserialize any different args overtop of the defaults
if (args.unserialize(buffer) != ARG_NONE) {
// if any args were unserialized, set them
setArgs(args);
}
args.unserialize(buffer);
setArgs(args);
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion VortexEngine/src/Patterns/PatternArgs.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ typedef uint8_t ArgMap;
// some helpers to set/clear/check
#define ARGMAP_SET(map, arg) (map |= ARG(arg))
#define ARGMAP_CLEAR(map, arg) (map &= ~ARG(arg))
#define ARGMAP_ISSET(map, arg) (map & ARG(arg))
#define ARGMAP_ISSET(map, arg) ((map & ARG(arg)) != 0)

// a structured method for passing arguments to patterns, there's definitely more dynamic
// ways to approach this but I'm aiming for simple and lightweight here
Expand Down
2 changes: 2 additions & 0 deletions VortexEngine/src/Patterns/PatternBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ Pattern *PatternBuilder::make(PatternID id, const PatternArgs *args)
DEBUG_LOGF("Invalid pattern id: %u", id);
id = PATTERN_FIRST;
}
#if VORTEX_SLIM == 0
if (isMultiLedPatternID(id)) {
return makeMulti(id, args);
}
#endif
return makeSingle(id, args);
}

Expand Down

0 comments on commit 2f64a7c

Please sign in to comment.