{
OverlayStateData *osd = image_get_osd_data(imd);
- if (!osd) return FALSE;
+ if (!osd)
+ {
+ if (show) *show = OSD_SHOW_NOTHING;
+ return FALSE;
+ }
if (show) *show = osd->show;
layout_geometry_get(NULL, &options->layout.main_window.x, &options->layout.main_window.y,
&options->layout.main_window.w, &options->layout.main_window.h);
}
- options->image_overlay.common.enabled = image_osd_get(lw->image, NULL);
+
+ image_osd_get(lw->image, &options->image_overlay.common.enabled);
}
layout_geometry_get_dividers(NULL, &options->layout.main_window.hdivider_pos, &options->layout.main_window.vdivider_pos);
}
}
- image_osd_set(lw->image, (options->image_overlay.common.show_at_startup || options->image_overlay.common.enabled) ? OSD_SHOW_INFO : OSD_SHOW_NOTHING);
+ image_osd_set(lw->image, options->image_overlay.common.enabled | (options->image_overlay.common.show_at_startup ? OSD_SHOW_INFO : OSD_SHOW_NOTHING));
g_free(geometry);
g_free(cmd_path);
/* image overlay */
struct {
struct {
- gint enabled;
+ guint enabled;
gint show_at_startup;
gchar *template_string;
} common;
WRITE_SUBTITLE("Image Overlay Options");
- WRITE_BOOL(image_overlay.common.enabled);
+ WRITE_UINT(image_overlay.common.enabled);
WRITE_BOOL(image_overlay.common.show_at_startup);
WRITE_CHAR(image_overlay.common.template_string);
/* image overlay */
COMPAT_READ_BOOL(fullscreen.show_info, image_overlay.common.show_at_startup);
COMPAT_READ_CHAR(fullscreen.info, image_overlay.common.template_string);
- READ_BOOL(image_overlay.common.enabled);
+ READ_UINT(image_overlay.common.enabled);
READ_BOOL(image_overlay.common.show_at_startup);
READ_CHAR(image_overlay.common.template_string);