elw00d/consoleframework

Example crashes on Windows 10 with specific window size properties

Closed this issue · 2 comments

To reproduce you should set properties to following, then maximize and restore the console window twice.


Windows 10 console seems buggy. Its unexpectedly lowers the buffer size of window in second maximization. Added workaround for this, but console maximization/restore in Windows 10 seems really broken.. (wrong buffer size is passed to application, and consoleApp cant restore its initial state). Hope this will be fixed.

// Duo bug with console in Windows 10 Technical Preview (unexpected decreasing Console.BufferSize)
// we should take Max of window width. See https://github.com/elw00d/consoleframework/issues/21
Console.SetBufferSize(
    Math.Max(savedBufferSize.Width, Console.WindowWidth),
    Math.Max(savedBufferSize.Height, Console.WindowHeight)
);