Fixed various warnings.
This commit is contained in:
parent
6bc3def9d1
commit
2e17cee5a9
@ -43,7 +43,8 @@ struct _wlfDispContext
|
||||
UINT32 lastSentDeviceScaleFactor;
|
||||
};
|
||||
|
||||
static UINT wlf_disp_sendLayout(DispClientContext* disp, rdpMonitor* monitors, size_t nmonitors);
|
||||
static UINT wlf_disp_sendLayout(DispClientContext* disp, const rdpMonitor* monitors,
|
||||
size_t nmonitors);
|
||||
|
||||
static BOOL wlf_disp_settings_changed(wlfDispContext* wlfDisp)
|
||||
{
|
||||
@ -206,7 +207,7 @@ static void wlf_disp_OnGraphicsReset(void* context, const GraphicsResetEventArgs
|
||||
}
|
||||
}
|
||||
|
||||
static void wlf_disp_OnTimer(void* context, TimerEventArgs* e)
|
||||
static void wlf_disp_OnTimer(void* context, const TimerEventArgs* e)
|
||||
{
|
||||
wlfContext* wlc;
|
||||
wlfDispContext* wlfDisp;
|
||||
@ -258,13 +259,25 @@ void wlf_disp_free(wlfDispContext* disp)
|
||||
free(disp);
|
||||
}
|
||||
|
||||
UINT wlf_disp_sendLayout(DispClientContext* disp, rdpMonitor* monitors, size_t nmonitors)
|
||||
UINT wlf_disp_sendLayout(DispClientContext* disp, const rdpMonitor* monitors, size_t nmonitors)
|
||||
{
|
||||
UINT ret = CHANNEL_RC_OK;
|
||||
DISPLAY_CONTROL_MONITOR_LAYOUT* layouts;
|
||||
size_t i;
|
||||
wlfDispContext* wlfDisp = (wlfDispContext*)disp->custom;
|
||||
rdpSettings* settings = wlfDisp->wlc->context.settings;
|
||||
wlfDispContext* wlfDisp;
|
||||
rdpSettings* settings;
|
||||
|
||||
WINPR_ASSERT(disp);
|
||||
WINPR_ASSERT(monitors);
|
||||
WINPR_ASSERT(nmonitors > 0);
|
||||
|
||||
wlfDisp = (wlfDispContext*)disp->custom;
|
||||
WINPR_ASSERT(wlfDisp);
|
||||
WINPR_ASSERT(wlfDisp->wlc);
|
||||
|
||||
settings = wlfDisp->wlc->context.settings;
|
||||
WINPR_ASSERT(settings);
|
||||
|
||||
layouts = calloc(nmonitors, sizeof(DISPLAY_CONTROL_MONITOR_LAYOUT));
|
||||
|
||||
if (!layouts)
|
||||
@ -272,27 +285,30 @@ UINT wlf_disp_sendLayout(DispClientContext* disp, rdpMonitor* monitors, size_t n
|
||||
|
||||
for (i = 0; i < nmonitors; i++)
|
||||
{
|
||||
layouts[i].Flags = (monitors[i].is_primary ? DISPLAY_CONTROL_MONITOR_PRIMARY : 0);
|
||||
layouts[i].Left = monitors[i].x;
|
||||
layouts[i].Top = monitors[i].y;
|
||||
layouts[i].Width = monitors[i].width;
|
||||
layouts[i].Height = monitors[i].height;
|
||||
layouts[i].Orientation = ORIENTATION_LANDSCAPE;
|
||||
layouts[i].PhysicalWidth = monitors[i].attributes.physicalWidth;
|
||||
layouts[i].PhysicalHeight = monitors[i].attributes.physicalHeight;
|
||||
const rdpMonitor* monitor = &monitors[i];
|
||||
DISPLAY_CONTROL_MONITOR_LAYOUT* layout = &layouts[i];
|
||||
|
||||
switch (monitors[i].attributes.orientation)
|
||||
layout->Flags = (monitor->is_primary ? DISPLAY_CONTROL_MONITOR_PRIMARY : 0);
|
||||
layout->Left = monitor->x;
|
||||
layout->Top = monitor->y;
|
||||
layout->Width = monitor->width;
|
||||
layout->Height = monitor->height;
|
||||
layout->Orientation = ORIENTATION_LANDSCAPE;
|
||||
layout->PhysicalWidth = monitor->attributes.physicalWidth;
|
||||
layout->PhysicalHeight = monitor->attributes.physicalHeight;
|
||||
|
||||
switch (monitor->attributes.orientation)
|
||||
{
|
||||
case 90:
|
||||
layouts[i].Orientation = ORIENTATION_PORTRAIT;
|
||||
layout->Orientation = ORIENTATION_PORTRAIT;
|
||||
break;
|
||||
|
||||
case 180:
|
||||
layouts[i].Orientation = ORIENTATION_LANDSCAPE_FLIPPED;
|
||||
layout->Orientation = ORIENTATION_LANDSCAPE_FLIPPED;
|
||||
break;
|
||||
|
||||
case 270:
|
||||
layouts[i].Orientation = ORIENTATION_PORTRAIT_FLIPPED;
|
||||
layout->Orientation = ORIENTATION_PORTRAIT_FLIPPED;
|
||||
break;
|
||||
|
||||
case 0:
|
||||
@ -304,12 +320,12 @@ UINT wlf_disp_sendLayout(DispClientContext* disp, rdpMonitor* monitors, size_t n
|
||||
*
|
||||
* So we default to ORIENTATION_LANDSCAPE
|
||||
*/
|
||||
layouts[i].Orientation = ORIENTATION_LANDSCAPE;
|
||||
layout->Orientation = ORIENTATION_LANDSCAPE;
|
||||
break;
|
||||
}
|
||||
|
||||
layouts[i].DesktopScaleFactor = settings->DesktopScaleFactor;
|
||||
layouts[i].DeviceScaleFactor = settings->DeviceScaleFactor;
|
||||
layout->DesktopScaleFactor = settings->DesktopScaleFactor;
|
||||
layout->DeviceScaleFactor = settings->DeviceScaleFactor;
|
||||
}
|
||||
|
||||
ret = IFCALLRESULT(CHANNEL_RC_OK, disp->SendMonitorLayout, disp, nmonitors, layouts);
|
||||
|
@ -41,18 +41,25 @@ struct _xfDispContext
|
||||
xfContext* xfc;
|
||||
DispClientContext* disp;
|
||||
BOOL haveXRandr;
|
||||
int eventBase, errorBase;
|
||||
int lastSentWidth, lastSentHeight;
|
||||
int eventBase;
|
||||
int errorBase;
|
||||
UINT32 lastSentWidth;
|
||||
UINT32 lastSentHeight;
|
||||
BYTE reserved[4];
|
||||
UINT64 lastSentDate;
|
||||
int targetWidth, targetHeight;
|
||||
UINT32 targetWidth;
|
||||
UINT32 targetHeight;
|
||||
BOOL activated;
|
||||
BOOL fullscreen;
|
||||
UINT16 lastSentDesktopOrientation;
|
||||
BYTE reserved2[2];
|
||||
UINT32 lastSentDesktopScaleFactor;
|
||||
UINT32 lastSentDeviceScaleFactor;
|
||||
BYTE reserved3[4];
|
||||
};
|
||||
|
||||
static UINT xf_disp_sendLayout(DispClientContext* disp, rdpMonitor* monitors, int nmonitors);
|
||||
static UINT xf_disp_sendLayout(DispClientContext* disp, const rdpMonitor* monitors,
|
||||
UINT32 nmonitors);
|
||||
|
||||
static BOOL xf_disp_settings_changed(xfDispContext* xfDisp)
|
||||
{
|
||||
@ -131,8 +138,8 @@ static BOOL xf_disp_sendResize(xfDispContext* xfDisp)
|
||||
layout.Orientation = settings->DesktopOrientation;
|
||||
layout.DesktopScaleFactor = settings->DesktopScaleFactor;
|
||||
layout.DeviceScaleFactor = settings->DeviceScaleFactor;
|
||||
layout.PhysicalWidth = xfDisp->targetWidth / 75 * 25.4f;
|
||||
layout.PhysicalHeight = xfDisp->targetHeight / 75 * 25.4f;
|
||||
layout.PhysicalWidth = xfDisp->targetWidth / 75.0 * 25.4;
|
||||
layout.PhysicalHeight = xfDisp->targetHeight / 75.0 * 25.4;
|
||||
|
||||
if (IFCALLRESULT(CHANNEL_RC_OK, xfDisp->disp->SendMonitorLayout, xfDisp->disp, 1,
|
||||
&layout) != CHANNEL_RC_OK)
|
||||
@ -193,7 +200,7 @@ static BOOL xf_disp_check_context(void* context, xfContext** ppXfc, xfDispContex
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void xf_disp_OnActivated(void* context, ActivatedEventArgs* e)
|
||||
static void xf_disp_OnActivated(void* context, const ActivatedEventArgs* e)
|
||||
{
|
||||
xfContext* xfc;
|
||||
xfDispContext* xfDisp;
|
||||
@ -292,13 +299,25 @@ void xf_disp_free(xfDispContext* disp)
|
||||
free(disp);
|
||||
}
|
||||
|
||||
UINT xf_disp_sendLayout(DispClientContext* disp, rdpMonitor* monitors, int nmonitors)
|
||||
UINT xf_disp_sendLayout(DispClientContext* disp, const rdpMonitor* monitors, UINT32 nmonitors)
|
||||
{
|
||||
UINT ret = CHANNEL_RC_OK;
|
||||
UINT32 i;
|
||||
xfDispContext* xfDisp;
|
||||
rdpSettings* settings;
|
||||
DISPLAY_CONTROL_MONITOR_LAYOUT* layouts;
|
||||
int i;
|
||||
xfDispContext* xfDisp = (xfDispContext*)disp->custom;
|
||||
rdpSettings* settings = xfDisp->xfc->context.settings;
|
||||
|
||||
WINPR_ASSERT(disp);
|
||||
WINPR_ASSERT(monitors);
|
||||
WINPR_ASSERT(nmonitors > 0);
|
||||
|
||||
xfDisp = (xfDispContext*)disp->custom;
|
||||
WINPR_ASSERT(xfDisp);
|
||||
WINPR_ASSERT(xfDisp->xfc);
|
||||
|
||||
settings = xfDisp->xfc->context.settings;
|
||||
WINPR_ASSERT(settings);
|
||||
|
||||
layouts = calloc(nmonitors, sizeof(DISPLAY_CONTROL_MONITOR_LAYOUT));
|
||||
|
||||
if (!layouts)
|
||||
@ -306,27 +325,30 @@ UINT xf_disp_sendLayout(DispClientContext* disp, rdpMonitor* monitors, int nmoni
|
||||
|
||||
for (i = 0; i < nmonitors; i++)
|
||||
{
|
||||
layouts[i].Flags = (monitors[i].is_primary ? DISPLAY_CONTROL_MONITOR_PRIMARY : 0);
|
||||
layouts[i].Left = monitors[i].x;
|
||||
layouts[i].Top = monitors[i].y;
|
||||
layouts[i].Width = monitors[i].width;
|
||||
layouts[i].Height = monitors[i].height;
|
||||
layouts[i].Orientation = ORIENTATION_LANDSCAPE;
|
||||
layouts[i].PhysicalWidth = monitors[i].attributes.physicalWidth;
|
||||
layouts[i].PhysicalHeight = monitors[i].attributes.physicalHeight;
|
||||
const rdpMonitor* monitor = &monitors[i];
|
||||
DISPLAY_CONTROL_MONITOR_LAYOUT* layout = &layouts[i];
|
||||
|
||||
switch (monitors[i].attributes.orientation)
|
||||
layout->Flags = (monitor->is_primary ? DISPLAY_CONTROL_MONITOR_PRIMARY : 0);
|
||||
layout->Left = monitor->x;
|
||||
layout->Top = monitor->y;
|
||||
layout->Width = monitor->width;
|
||||
layout->Height = monitor->height;
|
||||
layout->Orientation = ORIENTATION_LANDSCAPE;
|
||||
layout->PhysicalWidth = monitor->attributes.physicalWidth;
|
||||
layout->PhysicalHeight = monitor->attributes.physicalHeight;
|
||||
|
||||
switch (monitor->attributes.orientation)
|
||||
{
|
||||
case 90:
|
||||
layouts[i].Orientation = ORIENTATION_PORTRAIT;
|
||||
layout->Orientation = ORIENTATION_PORTRAIT;
|
||||
break;
|
||||
|
||||
case 180:
|
||||
layouts[i].Orientation = ORIENTATION_LANDSCAPE_FLIPPED;
|
||||
layout->Orientation = ORIENTATION_LANDSCAPE_FLIPPED;
|
||||
break;
|
||||
|
||||
case 270:
|
||||
layouts[i].Orientation = ORIENTATION_PORTRAIT_FLIPPED;
|
||||
layout->Orientation = ORIENTATION_PORTRAIT_FLIPPED;
|
||||
break;
|
||||
|
||||
case 0:
|
||||
@ -338,12 +360,12 @@ UINT xf_disp_sendLayout(DispClientContext* disp, rdpMonitor* monitors, int nmoni
|
||||
*
|
||||
* So we default to ORIENTATION_LANDSCAPE
|
||||
*/
|
||||
layouts[i].Orientation = ORIENTATION_LANDSCAPE;
|
||||
layout->Orientation = ORIENTATION_LANDSCAPE;
|
||||
break;
|
||||
}
|
||||
|
||||
layouts[i].DesktopScaleFactor = settings->DesktopScaleFactor;
|
||||
layouts[i].DeviceScaleFactor = settings->DeviceScaleFactor;
|
||||
layout->DesktopScaleFactor = settings->DesktopScaleFactor;
|
||||
layout->DeviceScaleFactor = settings->DeviceScaleFactor;
|
||||
}
|
||||
|
||||
ret = IFCALLRESULT(CHANNEL_RC_OK, disp->SendMonitorLayout, disp, nmonitors, layouts);
|
||||
|
@ -18,7 +18,7 @@ struct _YUV_CONTEXT
|
||||
TP_CALLBACK_ENVIRON ThreadPoolEnv;
|
||||
};
|
||||
|
||||
struct _YUV_PROCESS_WORK_PARAM
|
||||
struct s_YUV_PROCESS_WORK_PARAM
|
||||
{
|
||||
YUV_CONTEXT* context;
|
||||
const BYTE* pYUVData[3];
|
||||
@ -28,9 +28,9 @@ struct _YUV_PROCESS_WORK_PARAM
|
||||
UINT32 nDstStep;
|
||||
RECTANGLE_16 rect;
|
||||
};
|
||||
typedef struct _YUV_PROCESS_WORK_PARAM YUV_PROCESS_WORK_PARAM;
|
||||
typedef struct s_YUV_PROCESS_WORK_PARAM YUV_PROCESS_WORK_PARAM;
|
||||
|
||||
struct _YUV_COMBINE_WORK_PARAM
|
||||
struct s_YUV_COMBINE_WORK_PARAM
|
||||
{
|
||||
YUV_CONTEXT* context;
|
||||
const BYTE* pYUVData[3];
|
||||
@ -40,9 +40,9 @@ struct _YUV_COMBINE_WORK_PARAM
|
||||
RECTANGLE_16 rect;
|
||||
BYTE type;
|
||||
};
|
||||
typedef struct _YUV_COMBINE_WORK_PARAM YUV_COMBINE_WORK_PARAM;
|
||||
typedef struct s_YUV_COMBINE_WORK_PARAM YUV_COMBINE_WORK_PARAM;
|
||||
|
||||
struct _YUV_ENCODE_WORK_PARAM
|
||||
struct s_YUV_ENCODE_WORK_PARAM
|
||||
{
|
||||
YUV_CONTEXT* context;
|
||||
const BYTE* pSrcData;
|
||||
@ -56,7 +56,7 @@ struct _YUV_ENCODE_WORK_PARAM
|
||||
BYTE* pYUVChromaData[3];
|
||||
UINT32 iStride[3];
|
||||
};
|
||||
typedef struct _YUV_ENCODE_WORK_PARAM YUV_ENCODE_WORK_PARAM;
|
||||
typedef struct s_YUV_ENCODE_WORK_PARAM YUV_ENCODE_WORK_PARAM;
|
||||
|
||||
static INLINE BOOL avc420_yuv_to_rgb(const BYTE* pYUVData[3], const UINT32 iStride[3],
|
||||
const RECTANGLE_16* rect, UINT32 nDstStep, BYTE* pDstData,
|
||||
@ -667,7 +667,7 @@ fail:
|
||||
}
|
||||
|
||||
BOOL yuv420_context_encode(YUV_CONTEXT* context, const BYTE* pSrcData, UINT32 nSrcStep,
|
||||
UINT32 SrcFormat, const UINT32 iStride[], BYTE* pYUVData[],
|
||||
UINT32 SrcFormat, const UINT32 iStride[3], BYTE* pYUVData[3],
|
||||
const RECTANGLE_16* regionRects, UINT32 numRegionRects)
|
||||
{
|
||||
if (!context || !pSrcData || !iStride || !pYUVData || !regionRects)
|
||||
@ -678,8 +678,8 @@ BOOL yuv420_context_encode(YUV_CONTEXT* context, const BYTE* pSrcData, UINT32 nS
|
||||
}
|
||||
|
||||
BOOL yuv444_context_encode(YUV_CONTEXT* context, BYTE version, const BYTE* pSrcData,
|
||||
UINT32 nSrcStep, UINT32 SrcFormat, const UINT32 iStride[],
|
||||
BYTE* pYUVLumaData[], BYTE* pYUVChromaData[],
|
||||
UINT32 nSrcStep, UINT32 SrcFormat, const UINT32 iStride[3],
|
||||
BYTE* pYUVLumaData[3], BYTE* pYUVChromaData[3],
|
||||
const RECTANGLE_16* regionRects, UINT32 numRegionRects)
|
||||
{
|
||||
PTP_WORK_CALLBACK cb;
|
||||
|
Loading…
x
Reference in New Issue
Block a user