浏览代码

libobs-opengl: Replace OBS_UNUSED with UNUSED_PARAMETER

OBS_UNUSED is not portable to MSVC.
tytan652 3 年之前
父节点
当前提交
057e433bdb
共有 3 个文件被更改,包括 16 次插入7 次删除
  1. 3 1
      libobs-opengl/gl-egl-common.c
  2. 4 2
      libobs-opengl/gl-nix.c
  3. 9 4
      libobs-opengl/gl-wayland-egl.c

+ 3 - 1
libobs-opengl/gl-egl-common.c

@@ -178,10 +178,12 @@ create_dmabuf_egl_image(EGLDisplay egl_display, unsigned int width,
 }
 
 struct gs_texture *gl_egl_create_texture_from_eglimage(
-	EGLDisplay egl_display OBS_UNUSED, uint32_t width, uint32_t height,
+	EGLDisplay egl_display, uint32_t width, uint32_t height,
 	enum gs_color_format color_format, EGLint target, EGLImage image)
 {
+	UNUSED_PARAMETER(egl_display);
 	UNUSED_PARAMETER(target);
+
 	struct gs_texture *texture = NULL;
 	texture = gs_texture_create(width, height, color_format, 1, NULL,
 				    GS_DYNAMIC);

+ 4 - 2
libobs-opengl/gl-nix.c

@@ -120,9 +120,11 @@ extern void device_present(gs_device_t *device)
 	gl_vtable->device_present(device);
 }
 
-extern bool device_is_monitor_hdr(gs_device_t *device OBS_UNUSED,
-				  void *monitor OBS_UNUSED)
+extern bool device_is_monitor_hdr(gs_device_t *device, void *monitor)
 {
+	UNUSED_PARAMETER(device);
+	UNUSED_PARAMETER(monitor);
+
 	return false;
 }
 

+ 9 - 4
libobs-opengl/gl-wayland-egl.c

@@ -384,11 +384,16 @@ static bool gl_wayland_egl_device_query_dmabuf_modifiers_for_format(
 }
 
 static struct gs_texture *gl_wayland_egl_device_texture_create_from_pixmap(
-	gs_device_t *device OBS_UNUSED, uint32_t width OBS_UNUSED,
-	uint32_t height OBS_UNUSED,
-	enum gs_color_format color_format OBS_UNUSED,
-	uint32_t target OBS_UNUSED, void *pixmap OBS_UNUSED)
+	gs_device_t *device, uint32_t width, uint32_t height,
+	enum gs_color_format color_format, uint32_t target, void *pixmap)
 {
+	UNUSED_PARAMETER(device);
+	UNUSED_PARAMETER(width);
+	UNUSED_PARAMETER(height);
+	UNUSED_PARAMETER(color_format);
+	UNUSED_PARAMETER(target);
+	UNUSED_PARAMETER(pixmap);
+
 	return NULL;
 }