I have noticed a curious Win32 effect: when the intial window client position is set to 0,0 and the client area dimensions are set to the total screen area, you obtain a fullscreen mode.
I attach a patch to the win32 driver to take advantage on this. By example, after recompiling, if I set GRX20DRV to "win32 gw 1024 gh 728 nc 16M" (my screen resolution) and next run "wintest", a full screen GRX application appears.
I think is a good thing, comments?
--- vd_win32.old Sun Nov 18 03:18:56 2001 +++ vd_win32.c Wed Jan 2 19:40:38 2002 @@ -62,7 +62,9 @@ int _nkeysw32pool = 0; int _keysw32pool[_MAXKEYSW32POOL];
+static int maxScreenWidth, maxScreenHeight; static int maxWindowWidth, maxWindowHeight; + // Identifier of the main thread static DWORD mainThreadId; // Handle of the worker thread, which is executing GRXMain @@ -124,6 +126,7 @@ RECT Rect; HDC hDC; HBRUSH hBrush; + int inipos;
if ( mp -> extinfo -> mode != GR_frameText ) { @@ -143,10 +146,13 @@ NULL ); } - Rect.left = 50; - Rect.top = 50; - Rect.right = mp->width + 50; - Rect.bottom = mp->height + 50; + inipos = 50; + if( mp->width == maxScreenWidth && + mp->height == maxScreenHeight ) inipos = 0; + Rect.left = inipos; + Rect.top = inipos; + Rect.right = mp->width + inipos; + Rect.bottom = mp->height + inipos; AdjustWindowRect ( &Rect, WS_OVERLAPPEDWINDOW, FALSE ); maxWindowWidth = Rect.right - Rect.left; maxWindowHeight = Rect.bottom - Rect.top; @@ -260,18 +266,18 @@ // made 'non-present' static int init(char *options) { - int size, i; + int i; - size = GetSystemMetrics(SM_CXSCREEN); + maxScreenWidth = GetSystemMetrics(SM_CXSCREEN); for(i=1; i < itemsof(modes); i++) { - if(modes[i].width > size) + if(modes[i].width > maxScreenWidth) modes[i].present = FALSE; } - size = GetSystemMetrics(SM_CYSCREEN); + maxScreenHeight = GetSystemMetrics(SM_CYSCREEN); for(i=1; i < itemsof(modes); i++) { - if(modes[i].height > size) + if(modes[i].height > maxScreenHeight) modes[i].present = FALSE; } return TRUE;