From 0029977ae10115eaaf102427125c7a65c8af0416 Mon Sep 17 00:00:00 2001 From: WarmUpTill Date: Sun, 5 Dec 2021 21:39:13 +0100 Subject: [PATCH] Adjust and move default priorities New users will be confused if their macros are not executed, if they are "blocked" by other scene switching methods. --- src/headers/macro.hpp | 1 - src/headers/switch-audio.hpp | 1 - src/headers/switch-executable.hpp | 1 - src/headers/switch-file.hpp | 1 - src/headers/switch-idle.hpp | 1 - src/headers/switch-media.hpp | 1 - src/headers/switch-screen-region.hpp | 1 - src/headers/switch-sequence.hpp | 1 - src/headers/switch-time.hpp | 1 - src/headers/switch-video.hpp | 1 - src/headers/switch-window.hpp | 1 - src/headers/switcher-data-structs.hpp | 12 ++++++++++++ 12 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/headers/macro.hpp b/src/headers/macro.hpp index 45a49def..425f8353 100644 --- a/src/headers/macro.hpp +++ b/src/headers/macro.hpp @@ -12,7 +12,6 @@ #include constexpr auto macro_func = 10; -constexpr auto default_priority_10 = macro_func; constexpr auto logic_root_offset = 100; diff --git a/src/headers/switch-audio.hpp b/src/headers/switch-audio.hpp index 1b6f2afa..c6fe9619 100644 --- a/src/headers/switch-audio.hpp +++ b/src/headers/switch-audio.hpp @@ -14,7 +14,6 @@ #include "volume-control.hpp" constexpr auto audio_func = 8; -constexpr auto default_priority_8 = audio_func; typedef enum { ABOVE, diff --git a/src/headers/switch-executable.hpp b/src/headers/switch-executable.hpp index d3f2bd72..f2cb2e1c 100644 --- a/src/headers/switch-executable.hpp +++ b/src/headers/switch-executable.hpp @@ -10,7 +10,6 @@ #include "switch-generic.hpp" constexpr auto exe_func = 3; -constexpr auto default_priority_3 = exe_func; struct ExecutableSwitch : SceneSwitcherEntry { static bool pause; diff --git a/src/headers/switch-file.hpp b/src/headers/switch-file.hpp index 19ff02cc..5432f250 100644 --- a/src/headers/switch-file.hpp +++ b/src/headers/switch-file.hpp @@ -11,7 +11,6 @@ #include constexpr auto read_file_func = 0; -constexpr auto default_priority_0 = read_file_func; typedef enum { LOCAL, diff --git a/src/headers/switch-idle.hpp b/src/headers/switch-idle.hpp index 205d4d80..41d02a02 100644 --- a/src/headers/switch-idle.hpp +++ b/src/headers/switch-idle.hpp @@ -10,7 +10,6 @@ constexpr auto default_idle_time = 60; constexpr auto idle_func = 2; -constexpr auto default_priority_2 = idle_func; struct IdleData : SceneSwitcherEntry { static bool pause; diff --git a/src/headers/switch-media.hpp b/src/headers/switch-media.hpp index 109050e1..4fe799c0 100644 --- a/src/headers/switch-media.hpp +++ b/src/headers/switch-media.hpp @@ -9,7 +9,6 @@ #include "switch-generic.hpp" constexpr auto media_func = 6; -constexpr auto default_priority_6 = media_func; typedef enum { TIME_RESTRICTION_NONE, diff --git a/src/headers/switch-screen-region.hpp b/src/headers/switch-screen-region.hpp index 1c921cbb..6dc8769f 100644 --- a/src/headers/switch-screen-region.hpp +++ b/src/headers/switch-screen-region.hpp @@ -10,7 +10,6 @@ #include "switch-generic.hpp" constexpr auto screen_region_func = 4; -constexpr auto default_priority_4 = screen_region_func; struct ScreenRegionSwitch : SceneSwitcherEntry { static bool pause; diff --git a/src/headers/switch-sequence.hpp b/src/headers/switch-sequence.hpp index 1d579269..d80ed822 100644 --- a/src/headers/switch-sequence.hpp +++ b/src/headers/switch-sequence.hpp @@ -12,7 +12,6 @@ #include "duration-control.hpp" constexpr auto round_trip_func = 1; -constexpr auto default_priority_1 = round_trip_func; struct SceneSequenceSwitch : SceneSwitcherEntry { static bool pause; diff --git a/src/headers/switch-time.hpp b/src/headers/switch-time.hpp index 0e5e885c..0de30abb 100644 --- a/src/headers/switch-time.hpp +++ b/src/headers/switch-time.hpp @@ -11,7 +11,6 @@ #include "switch-generic.hpp" constexpr auto time_func = 7; -constexpr auto default_priority_7 = time_func; typedef enum { ANY_DAY = 0, diff --git a/src/headers/switch-video.hpp b/src/headers/switch-video.hpp index 69d87e41..213cf182 100644 --- a/src/headers/switch-video.hpp +++ b/src/headers/switch-video.hpp @@ -12,7 +12,6 @@ #include "screenshot-helper.hpp" constexpr auto video_func = 9; -constexpr auto default_priority_9 = video_func; enum class videoSwitchType { MATCH, diff --git a/src/headers/switch-window.hpp b/src/headers/switch-window.hpp index 0cfc5a1d..c4209e35 100644 --- a/src/headers/switch-window.hpp +++ b/src/headers/switch-window.hpp @@ -9,7 +9,6 @@ #include "switch-generic.hpp" constexpr auto window_title_func = 5; -constexpr auto default_priority_5 = window_title_func; struct WindowSwitch : SceneSwitcherEntry { static bool pause; diff --git a/src/headers/switcher-data-structs.hpp b/src/headers/switcher-data-structs.hpp index c3437bd4..a2137a45 100644 --- a/src/headers/switcher-data-structs.hpp +++ b/src/headers/switcher-data-structs.hpp @@ -33,6 +33,18 @@ constexpr auto previous_scene_name = "Previous Scene"; constexpr auto current_transition_name = "Current Transition"; constexpr auto tab_count = 18; +constexpr auto default_priority_0 = macro_func; +constexpr auto default_priority_1 = read_file_func; +constexpr auto default_priority_2 = idle_func; +constexpr auto default_priority_3 = audio_func; +constexpr auto default_priority_4 = media_func; +constexpr auto default_priority_5 = video_func; +constexpr auto default_priority_6 = time_func; +constexpr auto default_priority_7 = screen_region_func; +constexpr auto default_priority_8 = round_trip_func; +constexpr auto default_priority_9 = window_title_func; +constexpr auto default_priority_10 = exe_func; + typedef enum { NO_SWITCH = 0, SWITCH = 1, RANDOM_SWITCH = 2 } NoMatch; typedef enum { PERSIST = 0, START = 1, STOP = 2 } StartupBehavior;