diff include/core/config.h @ 150:ffa535b6d630

*: avoid usage of std::[pair,tuple] https://arne-mertz.de/2017/03/smelly-pair-tuple/ it's better to use real structures and such where variables are easily known... also apparently using [] on structs is actually valid? I had no idea.
author Paper <mrpapersonic@gmail.com>
date Tue, 14 Nov 2023 16:27:33 -0500
parents e41505d24733
children 62e336597bb7
line wrap: on
line diff
--- a/include/core/config.h	Tue Nov 14 13:40:11 2023 -0500
+++ b/include/core/config.h	Tue Nov 14 16:27:33 2023 -0500
@@ -11,6 +11,11 @@
 #include <vector>
 #include <utility>
 
+struct MediaPlayer {
+	bool enabled = true;
+	animia::Player player;
+};
+
 class Config {
 	public:
 		int Load();
@@ -44,9 +49,7 @@
 		struct {
 			public:
 				bool detect_media_players;
-				/* preferably web browsers would be in a separate vector,
-				   but whatever :/ */
-				std::vector<std::pair<bool, animia::Player>> players;
+				std::vector<MediaPlayer> players;
 		} recognition;
 
 		struct {