From 1f2c01c19d001c0e9b8cabc2522ae91e79f70944 Mon Sep 17 00:00:00 2001
From: midipix <writeonce@midipix.org>
Date: Mon, 3 May 2021 02:34:19 +0000
Subject: driver api: slbt_get_flavor_settings(): initial implementation.

---
 src/driver/slbt_driver_ctx.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

(limited to 'src')

diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index fecf27d..37d5660 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -1882,6 +1882,26 @@ int  slbt_set_alternate_host(
 	return 0;
 }
 
+int slbt_get_flavor_settings(
+	const char *                            flavor,
+	const struct slbt_flavor_settings **    settings)
+{
+	if (!strcmp(flavor,"midipix"))
+		*settings = &host_flavor_midipix;
+	else if (!strcmp(flavor,"mingw"))
+		*settings = &host_flavor_mingw;
+	else if (!strcmp(flavor,"cygwin"))
+		*settings = &host_flavor_cygwin;
+	else if (!strcmp(flavor,"darwin"))
+		*settings = &host_flavor_darwin;
+	else if (!strcmp(flavor,"default"))
+		*settings = &host_flavor_default;
+	else
+		*settings = 0;
+
+	return *settings ? 0 : -1;
+}
+
 const struct slbt_source_version * slbt_source_version(void)
 {
 	return &slbt_src_version;
-- 
cgit v1.2.3