X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fconfig.cc;h=94d8a69a289018f1b2e67d9f3a06bd76c65a9ae8;hb=b6235aa37eac2c91358ff058389b4391b52f4615;hp=485ecbad7326a6348d8bc8ea4df6a5238419e47f;hpb=6154d5f85664a26e9490c9120bef5e742af94490;p=dcpomatic.git diff --git a/src/lib/config.cc b/src/lib/config.cc index 485ecbad7..94d8a69a2 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2014 Carl Hetherington + Copyright (C) 2012-2015 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -73,7 +73,7 @@ Config::Config () , _check_for_updates (false) , _check_for_test_updates (false) , _maximum_j2k_bandwidth (250000000) - , _log_types (Log::TYPE_GENERAL | Log::TYPE_WARNING | Log::TYPE_ERROR) + , _log_types (Log::TYPE_GENERAL | Log::TYPE_WARNING | Log::TYPE_ERROR | Log::TYPE_DEBUG) #ifdef DCPOMATIC_WINDOWS , _win32_console (false) #endif @@ -85,8 +85,8 @@ Config::Config () _allowed_dcp_frame_rates.push_back (50); _allowed_dcp_frame_rates.push_back (60); - _colour_conversions.push_back (PresetColourConversion (_("sRGB"), dcp::ColourConversion::srgb_to_xyz)); - _colour_conversions.push_back (PresetColourConversion (_("Rec. 709"), dcp::ColourConversion::rec709_to_xyz)); + _colour_conversions.push_back (PresetColourConversion (_("sRGB"), dcp::ColourConversion::srgb_to_xyz ())); + _colour_conversions.push_back (PresetColourConversion (_("Rec. 709"), dcp::ColourConversion::rec709_to_xyz ())); reset_kdm_email (); } @@ -179,12 +179,15 @@ Config::read () try { for (list::iterator i = cc.begin(); i != cc.end(); ++i) { - _colour_conversions.push_back (PresetColourConversion (*i)); + /* This is a bit of a hack; use 32 (the first Film state file version for the 2.x branch) + for version 2 and 10 (the current Film state version for the 1.x branch) for version 1. + */ + _colour_conversions.push_back (PresetColourConversion (*i, version == 2 ? 32 : 10)); } } catch (cxml::Error) { /* Probably failed to load an old-style ColourConversion tag; just give up */ - _colour_conversions.push_back (PresetColourConversion (_("sRGB"), dcp::ColourConversion::srgb_to_xyz)); - _colour_conversions.push_back (PresetColourConversion (_("Rec. 709"), dcp::ColourConversion::rec709_to_xyz)); + _colour_conversions.push_back (PresetColourConversion (_("sRGB"), dcp::ColourConversion::srgb_to_xyz ())); + _colour_conversions.push_back (PresetColourConversion (_("Rec. 709"), dcp::ColourConversion::rec709_to_xyz ())); } list cin = f.node_children ("Cinema");