[vlc-devel] [PATCH 03/41] vout:win32: remove bogus defines
Steve Lhomme
robux4 at ycbcr.xyz
Fri Mar 22 16:13:41 CET 2019
It's hiding possible issues without some pointer assumptions. In fact we have
valuable warnings now.
---
modules/video_output/win32/common.c | 20 +++++++++-----------
modules/video_output/win32/events.c | 2 --
2 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index f78bdeb5c5..154b476467 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -40,8 +40,6 @@
#define COBJMACROS
#include <shobjidl.h>
-#define vout_display_sys_win32_t vout_display_sys_t
-
#include "common.h"
#include "../video_chroma/copy.h"
@@ -49,7 +47,7 @@ static void CommonChangeThumbnailClip(vout_display_t *, bool show);
#if !VLC_WINSTORE_APP
static int CommonControlSetFullscreen(vout_display_t *, bool is_fullscreen);
-static bool GetRect(const vout_display_sys_t *sys, RECT *out)
+static bool GetRect(const vout_display_sys_win32_t *sys, RECT *out)
{
if (sys->b_windowless)
return false;
@@ -70,7 +68,7 @@ static unsigned int GetPictureHeight(const vout_display_t *vd)
/* */
int CommonInit(vout_display_t *vd, bool b_windowless, const vout_display_cfg_t *vdcfg)
{
- vout_display_sys_t *sys = vd->sys;
+ vout_display_sys_win32_t *sys = vd->sys;
sys->hwnd = NULL;
sys->hvideownd = NULL;
@@ -140,7 +138,7 @@ int CommonInit(vout_display_t *vd, bool b_windowless, const vout_display_cfg_t *
*****************************************************************************/
static void UpdateRectsInternal(vout_display_t *vd, bool is_forced)
{
- vout_display_sys_t *sys = vd->sys;
+ vout_display_sys_win32_t *sys = vd->sys;
const video_format_t *source = &vd->source;
#define rect_src sys->area.rect_src
#define rect_src_clipped sys->area.rect_src_clipped
@@ -312,7 +310,7 @@ void UpdateRects(vout_display_t *vd)
/* */
void CommonClean(vout_display_t *vd)
{
- vout_display_sys_t *sys = vd->sys;
+ vout_display_sys_win32_t *sys = vd->sys;
if (sys->event) {
CommonChangeThumbnailClip(vd, false);
EventThreadStop(sys->event);
@@ -322,7 +320,7 @@ void CommonClean(vout_display_t *vd)
void CommonManage(vout_display_t *vd)
{
- vout_display_sys_t *sys = vd->sys;
+ vout_display_sys_win32_t *sys = vd->sys;
if (sys->b_windowless)
return;
@@ -374,7 +372,7 @@ void CommonManage(vout_display_t *vd)
*/
void CommonDisplay(vout_display_t *vd)
{
- vout_display_sys_t *sys = vd->sys;
+ vout_display_sys_win32_t *sys = vd->sys;
if (!sys->is_first_display)
return;
@@ -396,7 +394,7 @@ void CommonDisplay(vout_display_t *vd)
/* */
static void CommonChangeThumbnailClip(vout_display_t *vd, bool show)
{
- vout_display_sys_t *sys = vd->sys;
+ vout_display_sys_win32_t *sys = vd->sys;
/* Windows 7 taskbar thumbnail code */
OSVERSIONINFO winVer;
@@ -443,7 +441,7 @@ static void CommonChangeThumbnailClip(vout_display_t *vd, bool show)
static int CommonControlSetFullscreen(vout_display_t *vd, bool is_fullscreen)
{
- vout_display_sys_t *sys = vd->sys;
+ vout_display_sys_win32_t *sys = vd->sys;
#ifdef MODULE_NAME_IS_direct3d9
if (sys->use_desktop && is_fullscreen)
@@ -543,7 +541,7 @@ void CommonChangeThumbnailClip(vout_display_t *vd, bool show) {}
int CommonControl(vout_display_t *vd, int query, va_list args)
{
- vout_display_sys_t *sys = vd->sys;
+ vout_display_sys_win32_t *sys = vd->sys;
switch (query) {
case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED: /* const vout_display_cfg_t *p_cfg */
diff --git a/modules/video_output/win32/events.c b/modules/video_output/win32/events.c
index 1edcf09d52..2a70ca2917 100644
--- a/modules/video_output/win32/events.c
+++ b/modules/video_output/win32/events.c
@@ -40,8 +40,6 @@
#include <windowsx.h> /* GET_X_LPARAM */
#include <shellapi.h> /* ExtractIcon */
-#define vout_display_sys_win32_t vout_display_sys_t
-
#include "common.h"
/*****************************************************************************
--
2.17.1
More information about the vlc-devel
mailing list