mirror of
https://github.com/AppleWin/AppleWin.git
synced 2026-04-20 15:17:50 +00:00
Debugger: Simplify console print (PR #1038)
. Simplify console display functions using StrFormat() . Update TestDebugger that needs StrFormat() now
This commit is contained in:
@@ -247,9 +247,7 @@ Update_t CmdConfigGetFont(int nArgs)
|
||||
{
|
||||
for (int iFont = 0; iFont < NUM_FONTS; iFont++)
|
||||
{
|
||||
TCHAR sText[CONSOLE_WIDTH] = TEXT("");
|
||||
ConsoleBufferPushFormat(sText, " Font: %-20s A:%2d M:%2d",
|
||||
// g_sFontNameCustom, g_nFontWidthAvg, g_nFontWidthMax );
|
||||
ConsoleBufferPushFormat(" Font: %-20s A:%2d M:%2d",
|
||||
g_aFontConfig[iFont]._sFontName,
|
||||
g_aFontConfig[iFont]._nFontWidthAvg,
|
||||
g_aFontConfig[iFont]._nFontWidthMax);
|
||||
@@ -276,8 +274,7 @@ Update_t CmdConfigFont(int nArgs)
|
||||
if ((!_tcscmp(g_aArgs[iArg].sArg, g_aParameters[PARAM_WILDSTAR].m_sName)) ||
|
||||
(!_tcscmp(g_aArgs[iArg].sArg, g_aParameters[PARAM_MEM_SEARCH_WILD].m_sName)))
|
||||
{
|
||||
TCHAR sText[CONSOLE_WIDTH];
|
||||
ConsoleBufferPushFormat(sText, "Lines: %d Font Px: %d Line Px: %d"
|
||||
ConsoleBufferPushFormat("Lines: %d Font Px: %d Line Px: %d"
|
||||
, g_nDisasmDisplayLines
|
||||
, g_aFontConfig[FONT_DISASM_DEFAULT]._nFontHeight
|
||||
, g_aFontConfig[FONT_DISASM_DEFAULT]._nLineHeight);
|
||||
@@ -355,9 +352,7 @@ void DebuggerMouseClick(int x, int y)
|
||||
int cy = nOffsetInScreenY / nFontHeight;
|
||||
|
||||
#if _DEBUG
|
||||
char sText[CONSOLE_WIDTH];
|
||||
sprintf(sText, "x:%d y:%d cx:%d cy:%d", x, y, cx, cy);
|
||||
ConsoleDisplayPush(sText);
|
||||
ConsoleDisplayPushFormat("x:%d y:%d cx:%d cy:%d", x, y, cx, cy);
|
||||
DebugDisplay();
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user