Skip to content

Commit

Permalink
always use faston when re-enabling after preset change
Browse files Browse the repository at this point in the history
  • Loading branch information
profezzorn committed Jul 21, 2024
1 parent 19d188e commit c727b1e
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions props/prop_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ class PropBase : CommandParser, Looper, protected SaberBase, public ModeInterfac
current_preset_.SetPreset(preset_num);
AllocateBladeStyles();
chdir(current_preset_.font.get());
if (previously_on.on()) On(EffectLocation(0, previously_on));
if (previously_on.on()) FastOn(EffectLocation(0, previously_on));
if (announce) {
PVLOG_STATUS << "Current Preset: " << current_preset_name() << "\n";
SaberBase::DoNewFont();
Expand All @@ -427,17 +427,7 @@ class PropBase : CommandParser, Looper, protected SaberBase, public ModeInterfac
// Set/Update Font & Style, skips Preon effect using FastOn (for use in Edit Mode and "fast" preset changes)
void SetPresetFast(int preset_num) {
PVLOG_DEBUG << "SetPresetFast(" << preset_num << ")\n";
TRACE(PROP, "start");
BladeSet previously_on = BladeOff();
SaveColorChangeIfNeeded();
// First free all styles, then allocate new ones to avoid memory
// fragmentation.
FreeBladeStyles();
current_preset_.SetPreset(preset_num);
AllocateBladeStyles();
chdir(current_preset_.font.get());
if (previously_on.on()) FastOn(EffectLocation(0, previously_on));
TRACE(PROP, "end");
SetPreset(preset_num, false);
}

// Update Preon IntArg in Edit Mode
Expand Down

0 comments on commit c727b1e

Please sign in to comment.