Commit 3bf456bb authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed GetLargestConsoleWindowSize return type for Winelib apps.

parent 1852ce80
......@@ -357,7 +357,7 @@ debug_channels (comm debugstr dll int resource stress thunk toolhelp win32)
336 stdcall GetHandleInformation(long ptr) GetHandleInformation
337 stub GetLSCallbackTarget
338 stub GetLSCallbackTemplate
339 stdcall GetLargestConsoleWindowSize(long) WIN32_GetLargestConsoleWindowSize
339 stdcall GetLargestConsoleWindowSize(long) GetLargestConsoleWindowSize
340 stdcall GetLastError() GetLastError
341 stdcall GetLocalTime(ptr) GetLocalTime
342 stdcall GetLocaleInfoA(long long ptr long) GetLocaleInfoA
......
......@@ -137,7 +137,22 @@ typedef struct tagINPUT_RECORD
#define MENU_EVENT 0x08
#define FOCUS_EVENT 0x10
COORD WINAPI GetLargestConsoleWindowSize(HANDLE);
#ifdef __i386__
/* Note: this should return a COORD, but calling convention for returning
* structures is different between Windows and gcc on i386. */
DWORD WINAPI GetLargestConsoleWindowSize(HANDLE);
inline static COORD __wine_GetLargestConsoleWindowSize_wrapper(HANDLE h)
{
DWORD dw = GetLargestConsoleWindowSize(h);
return *(COORD *)&dw;
}
#define GetLargestConsoleWindowSize(h) __wine_GetLargestConsoleWindowSize_wrapper(h)
#else /* __i386__ */
COORD WINAPI GetLargestConsoleWindowSize(HANDLE);
#endif /* __i386__ */
BOOL WINAPI ReadConsoleOutputCharacterA(HANDLE,LPSTR,DWORD,COORD,LPDWORD);
BOOL WINAPI ReadConsoleOutputCharacterW(HANDLE,LPWSTR,DWORD,COORD,LPDWORD);
#define ReadConsoleOutputCharacter WINELIB_NAME_AW(ReadConsoleOutputCharacter)
......
......@@ -511,21 +511,28 @@ BOOL WINAPI SetConsoleActiveScreenBuffer(
/***********************************************************************
* GetLargestConsoleWindowSize (KERNEL32.226)
*
* Note: this should return a COORD, but calling convention for returning
* structures is different between Windows and gcc on i386.
*/
COORD WINAPI GetLargestConsoleWindowSize( HANDLE hConsoleOutput )
#ifdef __i386__
#undef GetLargestConsoleWindowSize
DWORD WINAPI GetLargestConsoleWindowSize( HANDLE hConsoleOutput )
{
COORD c;
c.X = 80;
c.Y = 24;
return c;
return *(DWORD *)&c;
}
/* gcc doesn't return structures the same way as dwords */
DWORD WINAPI WIN32_GetLargestConsoleWindowSize( HANDLE hConsoleOutput )
#else /* __i386__ */
COORD WINAPI GetLargestConsoleWindowSize( HANDLE hConsoleOutput )
{
COORD c = GetLargestConsoleWindowSize( hConsoleOutput );
return *(DWORD *)&c;
COORD c;
c.X = 80;
c.Y = 24;
return c;
}
#endif /* __i386__ */
/***********************************************************************
* FreeConsole (KERNEL32.267)
......
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