diff --git a/plugins/win-dshow/data/locale/en-US.ini b/plugins/win-dshow/data/locale/en-US.ini index 7f297c1f3..d654bb1f4 100644 --- a/plugins/win-dshow/data/locale/en-US.ini +++ b/plugins/win-dshow/data/locale/en-US.ini @@ -4,6 +4,7 @@ Device="Device" ColorSpace="Color Space" ColorSpace.Default="Default" ColorRange="Color Range" +ColorRange.Default="Default" ColorRange.Partial="Partial" ColorRange.Full="Full" ConfigureAudio="Configure Audio" diff --git a/plugins/win-dshow/win-dshow.cpp b/plugins/win-dshow/win-dshow.cpp index b6434abf2..c84299bbf 100644 --- a/plugins/win-dshow/win-dshow.cpp +++ b/plugins/win-dshow/win-dshow.cpp @@ -75,6 +75,7 @@ using namespace DShow; #define TEXT_COLOR_SPACE obs_module_text("ColorSpace") #define TEXT_COLOR_DEFAULT obs_module_text("ColorSpace.Default") #define TEXT_COLOR_RANGE obs_module_text("ColorRange") +#define TEXT_RANGE_DEFAULT obs_module_text("ColorRange.Default") #define TEXT_RANGE_PARTIAL obs_module_text("ColorRange.Partial") #define TEXT_RANGE_FULL obs_module_text("ColorRange.Full") #define TEXT_DWNS obs_module_text("DeactivateWhenNotShowing") @@ -1049,8 +1050,11 @@ DShowInput::GetColorRange(obs_data_t *settings) const { const char *range = obs_data_get_string(settings, COLOR_RANGE); - return astrcmpi(range, "full") == 0 ? VIDEO_RANGE_FULL - : VIDEO_RANGE_PARTIAL; + if (astrcmpi(range, "full") == 0) + return VIDEO_RANGE_FULL; + if (astrcmpi(range, "partial") == 0) + return VIDEO_RANGE_PARTIAL; + return VIDEO_RANGE_DEFAULT; } inline bool DShowInput::Activate(obs_data_t *settings) @@ -1139,7 +1143,7 @@ static void GetDShowDefaults(obs_data_t *settings) obs_data_set_default_int(settings, VIDEO_FORMAT, (int)VideoFormat::Any); obs_data_set_default_bool(settings, "active", true); obs_data_set_default_string(settings, COLOR_SPACE, "default"); - obs_data_set_default_string(settings, COLOR_RANGE, "partial"); + obs_data_set_default_string(settings, COLOR_RANGE, "default"); obs_data_set_default_int(settings, AUDIO_OUTPUT_MODE, (int)AudioMode::Capture); } @@ -1873,6 +1877,7 @@ static obs_properties_t *GetDShowProperties(void *obj) p = obs_properties_add_list(ppts, COLOR_RANGE, TEXT_COLOR_RANGE, OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING); + obs_property_list_add_string(p, TEXT_RANGE_DEFAULT, "default"); obs_property_list_add_string(p, TEXT_RANGE_PARTIAL, "partial"); obs_property_list_add_string(p, TEXT_RANGE_FULL, "full");