[gnome-settings-daemon/gnome-3-2] color: Apply the color profile even if the device has an invalid EDID
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/gnome-3-2] color: Apply the color profile even if the device has an invalid EDID
- Date: Fri, 16 Mar 2012 10:42:15 +0000 (UTC)
commit ad47e7d0f2b1bb09f6a2d2ca65804b89baeddb5c
Author: Richard Hughes <richard hughsie com>
Date: Thu Mar 15 10:31:40 2012 +0000
color: Apply the color profile even if the device has an invalid EDID
It appears quite a lot of real-world hardware returns bad EDID data.
plugins/color/gsd-color-manager.c | 42 +++++++++++++++++-------------------
1 files changed, 20 insertions(+), 22 deletions(-)
---
diff --git a/plugins/color/gsd-color-manager.c b/plugins/color/gsd-color-manager.c
index 55a2fa7..0e2f5f0 100644
--- a/plugins/color/gsd-color-manager.c
+++ b/plugins/color/gsd-color-manager.c
@@ -1140,35 +1140,33 @@ gcm_session_device_assign_connect_cb (GObject *object,
goto out;
}
- /* get the output EDID */
+ /* create profile from device edid if it exists */
edid = gcm_session_get_output_edid (manager, output, &error);
if (edid == NULL) {
g_warning ("unable to get EDID for %s: %s",
cd_device_get_id (device),
error->message);
- g_error_free (error);
- goto out;
- }
+ g_clear_error (&error);
- /* create profile from device edid if it does not exist */
- autogen_filename = g_strdup_printf ("edid-%s.icc",
- gcm_edid_get_checksum (edid));
- autogen_path = g_build_filename (g_get_user_data_dir (),
- "icc", autogen_filename, NULL);
-
- if (g_file_test (autogen_path, G_FILE_TEST_EXISTS)) {
- g_debug ("auto-profile edid %s exists", autogen_path);
} else {
- g_debug ("auto-profile edid does not exist, creating as %s",
- autogen_path);
- ret = gcm_apply_create_icc_profile_for_edid (manager,
- edid,
- autogen_path,
- &error);
- if (!ret) {
- g_warning ("failed to create profile from EDID data: %s",
- error->message);
- g_clear_error (&error);
+ autogen_filename = g_strdup_printf ("edid-%s.icc",
+ gcm_edid_get_checksum (edid));
+ autogen_path = g_build_filename (g_get_user_data_dir (),
+ "icc", autogen_filename, NULL);
+ if (g_file_test (autogen_path, G_FILE_TEST_EXISTS)) {
+ g_debug ("auto-profile edid %s exists", autogen_path);
+ } else {
+ g_debug ("auto-profile edid does not exist, creating as %s",
+ autogen_path);
+ ret = gcm_apply_create_icc_profile_for_edid (manager,
+ edid,
+ autogen_path,
+ &error);
+ if (!ret) {
+ g_warning ("failed to create profile from EDID data: %s",
+ error->message);
+ g_clear_error (&error);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]