mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-01 15:49:51 +08:00
libobs,plugins: Remove one-case switches
This commit is contained in:
+1
-8
@@ -326,15 +326,8 @@ void log_system_info(void)
|
||||
log_distribution_info();
|
||||
log_desktop_session_info();
|
||||
#endif
|
||||
switch (obs_get_nix_platform()) {
|
||||
case OBS_NIX_PLATFORM_X11_EGL:
|
||||
if (obs_get_nix_platform() == OBS_NIX_PLATFORM_X11_EGL)
|
||||
obs_nix_x11_log_info();
|
||||
break;
|
||||
#ifdef ENABLE_WAYLAND
|
||||
case OBS_NIX_PLATFORM_WAYLAND:
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
bool obs_hotkeys_platform_init(struct obs_core_hotkeys *hotkeys)
|
||||
|
||||
+4
-10
@@ -608,8 +608,7 @@ static void render_item_texture(struct obs_scene_item *item,
|
||||
|
||||
float multiplier = 1.f;
|
||||
|
||||
switch (current_space) {
|
||||
case GS_CS_709_SCRGB:
|
||||
if (current_space == GS_CS_709_SCRGB) {
|
||||
switch (source_space) {
|
||||
case GS_CS_SRGB:
|
||||
case GS_CS_SRGB_16F:
|
||||
@@ -618,8 +617,7 @@ static void render_item_texture(struct obs_scene_item *item,
|
||||
}
|
||||
}
|
||||
|
||||
switch (source_space) {
|
||||
case GS_CS_709_SCRGB:
|
||||
if (source_space == GS_CS_709_SCRGB) {
|
||||
switch (current_space) {
|
||||
case GS_CS_SRGB:
|
||||
case GS_CS_SRGB_16F:
|
||||
@@ -634,10 +632,8 @@ static void render_item_texture(struct obs_scene_item *item,
|
||||
switch (source_space) {
|
||||
case GS_CS_SRGB:
|
||||
case GS_CS_SRGB_16F:
|
||||
switch (current_space) {
|
||||
case GS_CS_709_SCRGB:
|
||||
if (current_space == GS_CS_709_SCRGB)
|
||||
tech_name = "DrawUpscaleMultiply";
|
||||
}
|
||||
break;
|
||||
case GS_CS_709_EXTENDED:
|
||||
switch (current_space) {
|
||||
@@ -663,10 +659,8 @@ static void render_item_texture(struct obs_scene_item *item,
|
||||
switch (source_space) {
|
||||
case GS_CS_SRGB:
|
||||
case GS_CS_SRGB_16F:
|
||||
switch (current_space) {
|
||||
case GS_CS_709_SCRGB:
|
||||
if (current_space == GS_CS_709_SCRGB)
|
||||
tech_name = "DrawMultiply";
|
||||
}
|
||||
break;
|
||||
case GS_CS_709_EXTENDED:
|
||||
switch (current_space) {
|
||||
|
||||
@@ -386,8 +386,7 @@ void deinterlace_render(obs_source_t *s)
|
||||
switch (source_space) {
|
||||
case GS_CS_SRGB:
|
||||
case GS_CS_SRGB_16F:
|
||||
switch (current_space) {
|
||||
case GS_CS_709_SCRGB:
|
||||
if (current_space == GS_CS_709_SCRGB) {
|
||||
tech_name = "DrawMultiply";
|
||||
multiplier = obs_get_video_sdr_white_level() / 80.0f;
|
||||
}
|
||||
|
||||
+1
-2
@@ -2498,8 +2498,7 @@ static inline void obs_source_render_async_video(obs_source_t *source)
|
||||
}
|
||||
break;
|
||||
case GS_CS_SRGB_16F:
|
||||
switch (current_space) {
|
||||
case GS_CS_709_SCRGB:
|
||||
if (current_space == GS_CS_709_SCRGB) {
|
||||
tech_name = "DrawMultiply";
|
||||
multiplier =
|
||||
obs_get_video_sdr_white_level() / 80.0f;
|
||||
|
||||
@@ -31,16 +31,9 @@ bool obs_module_load(void)
|
||||
{
|
||||
enum obs_nix_platform_type platform = obs_get_nix_platform();
|
||||
|
||||
switch (platform) {
|
||||
case OBS_NIX_PLATFORM_X11_EGL:
|
||||
if (platform == OBS_NIX_PLATFORM_X11_EGL) {
|
||||
obs_register_source(&xshm_input);
|
||||
xcomposite_load();
|
||||
break;
|
||||
|
||||
#ifdef ENABLE_WAYLAND
|
||||
case OBS_NIX_PLATFORM_WAYLAND:
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -194,8 +194,7 @@ get_tech_name_and_multiplier(enum gs_color_space current_space,
|
||||
switch (source_space) {
|
||||
case GS_CS_SRGB:
|
||||
case GS_CS_SRGB_16F:
|
||||
switch (current_space) {
|
||||
case GS_CS_709_SCRGB:
|
||||
if (current_space == GS_CS_709_SCRGB) {
|
||||
tech_name = "DrawMultiply";
|
||||
*multiplier = obs_get_video_sdr_white_level() / 80.0f;
|
||||
}
|
||||
|
||||
@@ -199,8 +199,7 @@ get_tech_name_and_multiplier(enum gs_color_space current_space,
|
||||
switch (source_space) {
|
||||
case GS_CS_SRGB:
|
||||
case GS_CS_SRGB_16F:
|
||||
switch (current_space) {
|
||||
case GS_CS_709_SCRGB:
|
||||
if (current_space == GS_CS_709_SCRGB) {
|
||||
tech_name = "DrawMultiply";
|
||||
*multiplier = obs_get_video_sdr_white_level() / 80.0f;
|
||||
}
|
||||
|
||||
@@ -634,8 +634,7 @@ get_tech_name_and_multiplier(enum gs_color_space current_space,
|
||||
switch (source_space) {
|
||||
case GS_CS_SRGB:
|
||||
case GS_CS_SRGB_16F:
|
||||
switch (current_space) {
|
||||
case GS_CS_709_SCRGB:
|
||||
if (current_space == GS_CS_709_SCRGB) {
|
||||
tech_name = "DrawMultiply";
|
||||
*multiplier = obs_get_video_sdr_white_level() / 80.0f;
|
||||
}
|
||||
|
||||
@@ -281,16 +281,9 @@ get_tech_name_and_multiplier(const struct scale_filter_data *filter,
|
||||
switch (source_space) {
|
||||
case GS_CS_SRGB:
|
||||
case GS_CS_SRGB_16F:
|
||||
switch (current_space) {
|
||||
case GS_CS_709_SCRGB:
|
||||
*multiplier = obs_get_video_sdr_white_level() / 80.f;
|
||||
}
|
||||
break;
|
||||
case GS_CS_709_EXTENDED:
|
||||
switch (current_space) {
|
||||
case GS_CS_709_SCRGB:
|
||||
if (current_space == GS_CS_709_SCRGB)
|
||||
*multiplier = obs_get_video_sdr_white_level() / 80.f;
|
||||
}
|
||||
break;
|
||||
case GS_CS_709_SCRGB:
|
||||
switch (current_space) {
|
||||
@@ -307,10 +300,8 @@ get_tech_name_and_multiplier(const struct scale_filter_data *filter,
|
||||
switch (source_space) {
|
||||
case GS_CS_SRGB:
|
||||
case GS_CS_SRGB_16F:
|
||||
switch (current_space) {
|
||||
case GS_CS_709_SCRGB:
|
||||
if (current_space == GS_CS_709_SCRGB)
|
||||
tech_name = "DrawUndistortMultiply";
|
||||
}
|
||||
break;
|
||||
case GS_CS_709_EXTENDED:
|
||||
switch (current_space) {
|
||||
@@ -337,10 +328,8 @@ get_tech_name_and_multiplier(const struct scale_filter_data *filter,
|
||||
switch (source_space) {
|
||||
case GS_CS_SRGB:
|
||||
case GS_CS_SRGB_16F:
|
||||
switch (current_space) {
|
||||
case GS_CS_709_SCRGB:
|
||||
if (current_space == GS_CS_709_SCRGB)
|
||||
tech_name = "DrawUpscaleMultiply";
|
||||
}
|
||||
break;
|
||||
case GS_CS_709_EXTENDED:
|
||||
switch (current_space) {
|
||||
@@ -366,10 +355,8 @@ get_tech_name_and_multiplier(const struct scale_filter_data *filter,
|
||||
switch (source_space) {
|
||||
case GS_CS_SRGB:
|
||||
case GS_CS_SRGB_16F:
|
||||
switch (current_space) {
|
||||
case GS_CS_709_SCRGB:
|
||||
if (current_space == GS_CS_709_SCRGB)
|
||||
tech_name = "DrawMultiply";
|
||||
}
|
||||
break;
|
||||
case GS_CS_709_EXTENDED:
|
||||
switch (current_space) {
|
||||
|
||||
@@ -195,8 +195,7 @@ get_tech_name_and_multiplier(enum gs_color_space current_space,
|
||||
switch (source_space) {
|
||||
case GS_CS_SRGB:
|
||||
case GS_CS_SRGB_16F:
|
||||
switch (current_space) {
|
||||
case GS_CS_709_SCRGB:
|
||||
if (current_space == GS_CS_709_SCRGB) {
|
||||
tech_name = "DrawMultiply";
|
||||
*multiplier = obs_get_video_sdr_white_level() / 80.0f;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user