wineserver: Change console.c constants

Hugh McMaster hugh.mcmaster at masterindexing.com
Sun Aug 11 03:46:32 CDT 2013


This patch modifies server/console.c to allow wineconsole programs to change the screen buffer and window size internally. Explanations for each change are given below.

     screen_buffer->width          = 80;
-    screen_buffer->height         = 150;
+    screen_buffer->height         = 25;

The width and height of the screen buffer should be 80 and 25 respectively, as the default size of cmd.exe on Windows is 80 x 25. More importantly, however, the screen buffer height should not be larger than the max_height value. So, modifying screen_buffer-> height to 25 is important.

     screen_buffer->max_width      = 80;
     screen_buffer->max_height     = 25;

The max_width and max_height values are overwritten by wineconsole upon initiation.

-    screen_buffer->win.right      = screen_buffer->max_width - 1;
+    screen_buffer->win.right      = screen_buffer->width - 1;
-    screen_buffer->win.bottom     = screen_buffer->max_height - 1;
+    screen_buffer->win.bottom     = screen_buffer->height - 1;

The width and height of the window should use the (safer) values stored in screen_buffer->width and screen_buffer->height respectively.  The maximum values should not be used.  Also, unless stored in the registry, the window size defaults to 80 x 25, so using these values for the window size is valid.


---
 server/console.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0004-console.txt
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20130811/82f14539/attachment.txt>


More information about the wine-patches mailing list