Commit 5163752e authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Handle the COORD <-> DWORD conversion the canonical way.

parent 24677dd4
......@@ -796,10 +796,13 @@ DWORD WINAPI GetConsoleTitleW(LPWSTR title, DWORD size)
#undef GetLargestConsoleWindowSize
DWORD WINAPI GetLargestConsoleWindowSize(HANDLE hConsoleOutput)
{
COORD c;
c.X = 80;
c.Y = 24;
return *(DWORD *)&c;
union {
COORD c;
DWORD w;
} x;
x.c.X = 80;
x.c.Y = 24;
return x.w;
}
#endif /* defined(__i386__) */
......
......@@ -180,12 +180,12 @@ DWORD WINAPI GetLargestConsoleWindowSize(HANDLE);
inline static COORD __wine_GetLargestConsoleWindowSize_wrapper(HANDLE h)
{
COORD c;
DWORD dw = GetLargestConsoleWindowSize(h);
c.X = LOWORD(dw);
c.Y = HIWORD(dw);
return c;
union {
COORD c;
DWORD dw;
} u;
u.dw = GetLargestConsoleWindowSize(h);
return u.c;
}
#define GetLargestConsoleWindowSize(h) __wine_GetLargestConsoleWindowSize_wrapper(h)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment