wfreerdp: fix build on Windows
This commit is contained in:
parent
08373c50bc
commit
89e5fef11f
@ -568,15 +568,13 @@ void wf_gdi_surface_bits(wfContext* wfc, SURFACE_BITS_COMMAND* surface_bits_comm
|
|||||||
RFX_MESSAGE* message;
|
RFX_MESSAGE* message;
|
||||||
BITMAPINFO bitmap_info;
|
BITMAPINFO bitmap_info;
|
||||||
|
|
||||||
RFX_CONTEXT* rfx_context = (RFX_CONTEXT*) wfc->rfx_context;
|
|
||||||
NSC_CONTEXT* nsc_context = (NSC_CONTEXT*) wfc->nsc_context;
|
|
||||||
|
|
||||||
tile_bitmap = (char*) malloc(32);
|
tile_bitmap = (char*) malloc(32);
|
||||||
ZeroMemory(tile_bitmap, 32);
|
ZeroMemory(tile_bitmap, 32);
|
||||||
|
|
||||||
if (surface_bits_command->codecID == RDP_CODEC_ID_REMOTEFX)
|
if (surface_bits_command->codecID == RDP_CODEC_ID_REMOTEFX)
|
||||||
{
|
{
|
||||||
message = rfx_process_message(rfx_context, surface_bits_command->bitmapData, surface_bits_command->bitmapDataLength);
|
freerdp_client_codecs_prepare(wfc->codecs, FREERDP_CODEC_REMOTEFX);
|
||||||
|
message = rfx_process_message(wfc->codecs->rfx, surface_bits_command->bitmapData, surface_bits_command->bitmapDataLength);
|
||||||
|
|
||||||
/* blit each tile */
|
/* blit each tile */
|
||||||
for (i = 0; i < message->numTiles; i++)
|
for (i = 0; i < message->numTiles; i++)
|
||||||
@ -607,11 +605,12 @@ void wf_gdi_surface_bits(wfContext* wfc, SURFACE_BITS_COMMAND* surface_bits_comm
|
|||||||
wf_invalidate_region(wfc, tx, ty, message->rects[i].width, message->rects[i].height);
|
wf_invalidate_region(wfc, tx, ty, message->rects[i].width, message->rects[i].height);
|
||||||
}
|
}
|
||||||
|
|
||||||
rfx_message_free(rfx_context, message);
|
rfx_message_free(wfc->codecs->rfx, message);
|
||||||
}
|
}
|
||||||
else if (surface_bits_command->codecID == RDP_CODEC_ID_NSCODEC)
|
else if (surface_bits_command->codecID == RDP_CODEC_ID_NSCODEC)
|
||||||
{
|
{
|
||||||
nsc_process_message(nsc_context, surface_bits_command->bpp, surface_bits_command->width, surface_bits_command->height,
|
freerdp_client_codecs_prepare(wfc->codecs, FREERDP_CODEC_NSCODEC);
|
||||||
|
nsc_process_message(wfc->codecs->nsc, surface_bits_command->bpp, surface_bits_command->width, surface_bits_command->height,
|
||||||
surface_bits_command->bitmapData, surface_bits_command->bitmapDataLength);
|
surface_bits_command->bitmapData, surface_bits_command->bitmapDataLength);
|
||||||
ZeroMemory(&bitmap_info, sizeof(bitmap_info));
|
ZeroMemory(&bitmap_info, sizeof(bitmap_info));
|
||||||
bitmap_info.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
bitmap_info.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
||||||
@ -622,7 +621,7 @@ void wf_gdi_surface_bits(wfContext* wfc, SURFACE_BITS_COMMAND* surface_bits_comm
|
|||||||
bitmap_info.bmiHeader.biCompression = BI_RGB;
|
bitmap_info.bmiHeader.biCompression = BI_RGB;
|
||||||
SetDIBitsToDevice(wfc->primary->hdc, surface_bits_command->destLeft, surface_bits_command->destTop,
|
SetDIBitsToDevice(wfc->primary->hdc, surface_bits_command->destLeft, surface_bits_command->destTop,
|
||||||
surface_bits_command->width, surface_bits_command->height, 0, 0, 0, surface_bits_command->height,
|
surface_bits_command->width, surface_bits_command->height, 0, 0, 0, surface_bits_command->height,
|
||||||
nsc_context->BitmapData, &bitmap_info, DIB_RGB_COLORS);
|
wfc->codecs->nsc->BitmapData, &bitmap_info, DIB_RGB_COLORS);
|
||||||
wf_invalidate_region(wfc, surface_bits_command->destLeft, surface_bits_command->destTop,
|
wf_invalidate_region(wfc, surface_bits_command->destLeft, surface_bits_command->destTop,
|
||||||
surface_bits_command->width, surface_bits_command->height);
|
surface_bits_command->width, surface_bits_command->height);
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include <winpr/crt.h>
|
#include <winpr/crt.h>
|
||||||
|
|
||||||
#include <freerdp/codec/bitmap.h>
|
#include <freerdp/codecs.h>
|
||||||
|
|
||||||
#include "wf_gdi.h"
|
#include "wf_gdi.h"
|
||||||
#include "wf_graphics.h"
|
#include "wf_graphics.h"
|
||||||
|
@ -376,12 +376,6 @@ BOOL wf_post_connect(freerdp* instance)
|
|||||||
if (settings->RemoteFxCodec)
|
if (settings->RemoteFxCodec)
|
||||||
{
|
{
|
||||||
wfc->tile = wf_image_new(wfc, 64, 64, 32, NULL);
|
wfc->tile = wf_image_new(wfc, 64, 64, 32, NULL);
|
||||||
wfc->rfx_context = rfx_context_new(FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (settings->NSCodec)
|
|
||||||
{
|
|
||||||
wfc->nsc_context = nsc_context_new();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,8 +111,6 @@ struct wf_context
|
|||||||
wfBitmap* tile;
|
wfBitmap* tile;
|
||||||
DWORD mainThreadId;
|
DWORD mainThreadId;
|
||||||
DWORD keyboardThreadId;
|
DWORD keyboardThreadId;
|
||||||
RFX_CONTEXT* rfx_context;
|
|
||||||
NSC_CONTEXT* nsc_context;
|
|
||||||
|
|
||||||
BOOL sw_gdi;
|
BOOL sw_gdi;
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ struct _BITMAP_INTERLEAVED_CONTEXT
|
|||||||
BYTE* FlipBuffer;
|
BYTE* FlipBuffer;
|
||||||
};
|
};
|
||||||
|
|
||||||
int interleaved_decompress(BITMAP_INTERLEAVED_CONTEXT* interleaved, BYTE* pSrcData, UINT32 SrcSize, int bpp,
|
FREERDP_API int interleaved_decompress(BITMAP_INTERLEAVED_CONTEXT* interleaved, BYTE* pSrcData, UINT32 SrcSize, int bpp,
|
||||||
BYTE** ppDstData, DWORD DstFormat, int nDstStep, int nXDst, int nYDst, int nWidth, int nHeight);
|
BYTE** ppDstData, DWORD DstFormat, int nDstStep, int nXDst, int nYDst, int nWidth, int nHeight);
|
||||||
|
|
||||||
FREERDP_API BITMAP_INTERLEAVED_CONTEXT* bitmap_interleaved_context_new(BOOL Compressor);
|
FREERDP_API BITMAP_INTERLEAVED_CONTEXT* bitmap_interleaved_context_new(BOOL Compressor);
|
||||||
|
@ -316,7 +316,7 @@ BITMAP_INTERLEAVED_CONTEXT* bitmap_interleaved_context_new(BOOL Compressor)
|
|||||||
{
|
{
|
||||||
BITMAP_INTERLEAVED_CONTEXT* interleaved;
|
BITMAP_INTERLEAVED_CONTEXT* interleaved;
|
||||||
|
|
||||||
interleaved = (BITMAP_INTERLEAVED_CONTEXT*) calloc(1, sizeof(BITMAP_INTERLEAVED_CONTEXT*));
|
interleaved = (BITMAP_INTERLEAVED_CONTEXT*) calloc(1, sizeof(BITMAP_INTERLEAVED_CONTEXT));
|
||||||
|
|
||||||
if (interleaved)
|
if (interleaved)
|
||||||
{
|
{
|
||||||
|
@ -60,7 +60,7 @@ if(WITH_SSE2)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
set(OPTIMIZATION "${OPTIMIZATION} /arch:SSE2 /O2")
|
set(OPTIMIZATION "${OPTIMIZATION} /arch:SSE2")
|
||||||
endif()
|
endif()
|
||||||
elseif(WITH_NEON)
|
elseif(WITH_NEON)
|
||||||
if(CMAKE_COMPILER_IS_GNUCC)
|
if(CMAKE_COMPILER_IS_GNUCC)
|
||||||
@ -76,11 +76,6 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
|||||||
set_property(SOURCE ${${MODULE_PREFIX}_SRCS} PROPERTY COMPILE_FLAGS "-O2")
|
set_property(SOURCE ${${MODULE_PREFIX}_SRCS} PROPERTY COMPILE_FLAGS "-O2")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
|
||||||
set_property(SOURCE ${${MODULE_PREFIX}_SRCS} PROPERTY COMPILE_FLAGS "/O2")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} ${${MODULE_PREFIX}_OPT_SRCS})
|
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} ${${MODULE_PREFIX}_OPT_SRCS})
|
||||||
|
|
||||||
add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
|
add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
|
||||||
|
Loading…
Reference in New Issue
Block a user