int overwrite_content;
int com_core_thread;
int use_xmonitor;
+ int premultiplied;
};
extern struct conf g_conf;
#define SLAVE_MAX_LOAD g_conf.slave_max_load
#define DEFAULT_PING_TIME g_conf.ping_time
+#define PREMULTIPLIED_COLOR g_conf.premultiplied
#define MAX_ABI 256
#define MAX_PKGNAME 512
#include "util.h"
#include "debug.h"
-HAPI struct conf g_conf = {
+struct conf g_conf = {
.width = 0,
.height = 0,
.overwrite_content = 0,
.com_core_thread = 1,
.use_xmonitor = 1,
+ .premultiplied = 1,
};
HAPI void conf_update_size(void)
}
}
+static void premultiplied_handler(char *buffer)
+{
+ if (sscanf(buffer, "%d", &g_conf.premultiplied) != 1) {
+ ErrPrint("Failed to parse the premultiplied color\n");
+ }
+
+ DbgPrint("Premultiplied: %d\n", g_conf.premultiplied);
+}
+
HAPI int conf_loader(void)
{
FILE *fp;
.handler = input_path_handler,
},
{
+ .name = "premultiplied",
+ .handler = premultiplied_handler,
+ },
+ {
.name = NULL,
.handler = NULL,
},