mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[winpr] add WINPR_C_ARRAY_INIT
since C23 allows c++ style initializing replace direct use with this macro
This commit is contained in:
@@ -70,7 +70,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
for (int i = 0;; i++)
|
||||
{
|
||||
_TCHAR name[128] = { 0 };
|
||||
_TCHAR name[128] = WINPR_C_ARRAY_INIT;
|
||||
if (get_screen_info(i, name, ARRAYSIZE(name), &width, &height, &bpp) != 0)
|
||||
{
|
||||
if ((width * height * bpp) == 0)
|
||||
@@ -143,7 +143,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
for (int i = 0;; i++)
|
||||
{
|
||||
_TCHAR name[128] = { 0 };
|
||||
_TCHAR name[128] = WINPR_C_ARRAY_INIT;
|
||||
if (get_screen_info(i, name, ARRAYSIZE(name), &width, &height, &bpp) != 0)
|
||||
{
|
||||
if ((width * height * bpp) == 0)
|
||||
|
||||
@@ -107,7 +107,7 @@ int wf_dxgi_getDuplication(wfInfo* wfi)
|
||||
{
|
||||
HRESULT status;
|
||||
UINT dTop, i = 0;
|
||||
DXGI_OUTPUT_DESC desc = { 0 };
|
||||
DXGI_OUTPUT_DESC desc = WINPR_C_ARRAY_INIT;
|
||||
IDXGIOutput* pOutput;
|
||||
IDXGIDevice* DxgiDevice = NULL;
|
||||
IDXGIAdapter* DxgiAdapter = NULL;
|
||||
|
||||
@@ -65,7 +65,7 @@ BOOL wf_peer_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code)
|
||||
|
||||
BOOL wf_peer_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y)
|
||||
{
|
||||
INPUT mouse_event = { 0 };
|
||||
INPUT mouse_event = WINPR_C_ARRAY_INIT;
|
||||
float width, height;
|
||||
WINPR_UNUSED(input);
|
||||
|
||||
@@ -143,7 +143,7 @@ BOOL wf_peer_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT1
|
||||
{
|
||||
if ((flags & PTR_XFLAGS_BUTTON1) || (flags & PTR_XFLAGS_BUTTON2))
|
||||
{
|
||||
INPUT mouse_event = { 0 };
|
||||
INPUT mouse_event = WINPR_C_ARRAY_INIT;
|
||||
mouse_event.type = INPUT_MOUSE;
|
||||
|
||||
if (flags & PTR_FLAGS_MOVE)
|
||||
|
||||
@@ -47,7 +47,7 @@ static cbCallback cbEvent = NULL;
|
||||
|
||||
int get_screen_info(int id, _TCHAR* name, size_t length, int* width, int* height, int* bpp)
|
||||
{
|
||||
DISPLAY_DEVICE dd = { 0 };
|
||||
DISPLAY_DEVICE dd = WINPR_C_ARRAY_INIT;
|
||||
|
||||
dd.cb = sizeof(DISPLAY_DEVICE);
|
||||
|
||||
@@ -107,7 +107,7 @@ static DWORD WINAPI wf_server_main_loop(LPVOID lpParam)
|
||||
while (wfi->force_all_disconnect == FALSE)
|
||||
{
|
||||
DWORD status;
|
||||
HANDLE handles[MAXIMUM_WAIT_OBJECTS] = { 0 };
|
||||
HANDLE handles[MAXIMUM_WAIT_OBJECTS] = WINPR_C_ARRAY_INIT;
|
||||
DWORD count = instance->GetEventHandles(instance, handles, ARRAYSIZE(handles));
|
||||
|
||||
if (count == 0)
|
||||
|
||||
@@ -201,7 +201,7 @@ static DWORD WINAPI wf_peer_socket_listener(LPVOID lpParam)
|
||||
while (1)
|
||||
{
|
||||
DWORD status;
|
||||
HANDLE handles[MAXIMUM_WAIT_OBJECTS] = { 0 };
|
||||
HANDLE handles[MAXIMUM_WAIT_OBJECTS] = WINPR_C_ARRAY_INIT;
|
||||
DWORD count = client->GetEventHandles(client, handles, ARRAYSIZE(handles));
|
||||
|
||||
if (count == 0)
|
||||
|
||||
Reference in New Issue
Block a user