Skip to content

Commit

Permalink
some config stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
HaxSam committed May 12, 2024
1 parent b8a6ba7 commit 482eebc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ static void momentum_app_scene_misc_vgm_foreground_changed(VariableItem* item) {
uint8_t index = variable_item_get_current_value_index(item);
variable_item_set_current_value_text(item, vgm_colors[index].name);
momentum_settings.vgm_color_fg.rgb = vgm_colors[index].color;
momentum_settings.vgm_color_fg.mode = VgmColorModeCustom;

if(strcmp("Rainbow", vgm_colors[index].name) == 0) {
momentum_settings.vgm_color_fg.mode = VgmColorModeRainbow;
Expand All @@ -93,6 +94,7 @@ static void momentum_app_scene_misc_vgm_background_changed(VariableItem* item) {
uint8_t index = variable_item_get_current_value_index(item);
variable_item_set_current_value_text(item, vgm_colors[index].name);
momentum_settings.vgm_color_bg.rgb = vgm_colors[index].color;
momentum_settings.vgm_color_bg.mode = VgmColorModeCustom;

if(strcmp("Rainbow", vgm_colors[index].name) == 0) {
momentum_settings.vgm_color_bg.mode = VgmColorModeRainbow;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ void momentum_app_scene_misc_vgm_color_on_enter(void* context) {
byte_input_set_header_text(byte_input, "Set VGM Color");

if(scene_manager_get_scene_state(app->scene_manager, MomentumAppSceneMiscVgmColor)) {
app->vgm_color = momentum_settings.vgm_color_bg;
app->vgm_color = momentum_settings.vgm_color_bg.rgb;
} else {
app->vgm_color = momentum_settings.vgm_color_fg;
app->vgm_color = momentum_settings.vgm_color_fg.rgb;
}
app->vgm_color.value = __REVSH(app->vgm_color.value);

Expand All @@ -44,9 +44,9 @@ bool momentum_app_scene_misc_vgm_color_on_event(void* context, SceneManagerEvent
case ByteInputResultOk:
app->vgm_color.value = __REVSH(app->vgm_color.value);
if(scene_manager_get_scene_state(app->scene_manager, MomentumAppSceneMiscVgmColor)) {
momentum_settings.vgm_color_bg = app->vgm_color;
momentum_settings.vgm_color_bg.rgb = app->vgm_color;
} else {
momentum_settings.vgm_color_fg = app->vgm_color;
momentum_settings.vgm_color_fg.rgb = app->vgm_color;
}
app->save_settings = true;
scene_manager_previous_scene(app->scene_manager);
Expand Down

0 comments on commit 482eebc

Please sign in to comment.