Handle the COORD <-> DWORD conversion the canonical way.
This commit is contained in:
parent
24677dd4d9
commit
5163752e8e
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue