mirror of
https://github.com/livingcomputermuseum/ContrAlto.git
synced 2026-04-25 11:41:50 +00:00
Added "-rompath" startup option to allow specifying an alternate path for microcode ROMs. Updated raw Ethernet handling to work with ncap (which replaces WinPcap since it's no longer being updated) running in WinPcap mode. Fixed bug with DebuggerPrompt -- when run with stdin/out redirected, Console.Width is 0, resulting in a div/zero issue.
This commit is contained in:
@@ -199,8 +199,11 @@ namespace Contralto.SdlUI
|
||||
clear = sb.ToString();
|
||||
}
|
||||
|
||||
int column = ((_textPosition + _originColumn) % Console.BufferWidth);
|
||||
int row = ((_textPosition + _originColumn) / Console.BufferWidth) + _originRow;
|
||||
// Default to 80 if BufferWidth is zero (this can happen if stdout is being redirected)
|
||||
int bufferWidth = Console.BufferWidth > 0 ? Console.BufferWidth : 80;
|
||||
|
||||
int column = ((_textPosition + _originColumn) % bufferWidth);
|
||||
int row = ((_textPosition + _originColumn) / bufferWidth) + _originRow;
|
||||
|
||||
// Move cursor to origin to draw string
|
||||
Console.CursorLeft = _originColumn;
|
||||
|
||||
Reference in New Issue
Block a user