mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 08:37:41 +00:00
(360) Some improvements to font rendering
This commit is contained in:
parent
1373ba167d
commit
52402d02c5
@ -22,6 +22,7 @@
|
||||
|
||||
#include "xdk360_video.h"
|
||||
#include "../general.h"
|
||||
#include "../message.h"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
@ -283,9 +284,9 @@ static bool xdk360_gfx_frame(void *data, const void *frame,
|
||||
{
|
||||
if(IS_TIMER_EXPIRED() || g_first_msg)
|
||||
{
|
||||
g_screen_console.Format(true, msg);
|
||||
g_screen_console.Format(msg);
|
||||
g_first_msg = 0;
|
||||
SET_TIMER_EXPIRATION(60);
|
||||
SET_TIMER_EXPIRATION(30);
|
||||
}
|
||||
|
||||
g_screen_console.Render();
|
||||
|
@ -204,8 +204,7 @@ void Console::Add( wchar_t wch )
|
||||
m_Lines[ m_nCurLine ][0] = wch;
|
||||
}
|
||||
|
||||
if(IS_TIMER_EXPIRED())
|
||||
m_cCurLineLength++;
|
||||
m_cCurLineLength++;
|
||||
}
|
||||
|
||||
|
||||
@ -213,40 +212,28 @@ void Console::Add( wchar_t wch )
|
||||
// Name: Format()
|
||||
// Desc: Output a variable argument list using a format string
|
||||
//--------------------------------------------------------------------------------------
|
||||
void Console::Format(int clear_screen, _In_z_ _Printf_format_string_ LPCSTR strFormat, ... )
|
||||
void Console::Format(_In_z_ _Printf_format_string_ LPCSTR strFormat, ... )
|
||||
{
|
||||
if(clear_screen)
|
||||
{
|
||||
m_nCurLine = 0;
|
||||
m_cCurLineLength = 0;
|
||||
memset( m_Buffer, 0, m_cScreenHeightVirtual * ( m_cScreenWidth + 1 ) * sizeof( wchar_t ) );
|
||||
}
|
||||
m_nCurLine = 0;
|
||||
m_cCurLineLength = 0;
|
||||
memset( m_Buffer, 0, m_cScreenHeightVirtual * ( m_cScreenWidth + 1 ) * sizeof( wchar_t ) );
|
||||
|
||||
va_list pArgList;
|
||||
va_start( pArgList, strFormat );
|
||||
FormatV( strFormat, pArgList );
|
||||
va_end( pArgList );
|
||||
|
||||
// Render the output
|
||||
Render();
|
||||
}
|
||||
|
||||
void Console::Format(int clear_screen, _In_z_ _Printf_format_string_ LPCWSTR wstrFormat, ... )
|
||||
void Console::Format(_In_z_ _Printf_format_string_ LPCWSTR wstrFormat, ... )
|
||||
{
|
||||
if(clear_screen)
|
||||
{
|
||||
m_nCurLine = 0;
|
||||
m_cCurLineLength = 0;
|
||||
memset( m_Buffer, 0, m_cScreenHeightVirtual * ( m_cScreenWidth + 1 ) * sizeof( wchar_t ) );
|
||||
}
|
||||
m_nCurLine = 0;
|
||||
m_cCurLineLength = 0;
|
||||
memset( m_Buffer, 0, m_cScreenHeightVirtual * ( m_cScreenWidth + 1 ) * sizeof( wchar_t ) );
|
||||
|
||||
va_list pArgList;
|
||||
va_start( pArgList, wstrFormat );
|
||||
FormatV( wstrFormat, pArgList );
|
||||
va_end( pArgList );
|
||||
|
||||
// Render the output
|
||||
Render();
|
||||
}
|
||||
|
||||
|
||||
|
@ -47,8 +47,8 @@ public:
|
||||
void Destroy();
|
||||
|
||||
// Console output
|
||||
void Format(int clear_screen, _In_z_ _Printf_format_string_ LPCSTR strFormat, ... );
|
||||
void Format(int clear_screen, _In_z_ _Printf_format_string_ LPCWSTR wstrFormat, ... );
|
||||
void Format(_In_z_ _Printf_format_string_ LPCSTR strFormat, ... );
|
||||
void Format(_In_z_ _Printf_format_string_ LPCWSTR wstrFormat, ... );
|
||||
void FormatV( _In_z_ _Printf_format_string_ LPCSTR strFormat, va_list pArgList );
|
||||
void FormatV( _In_z_ _Printf_format_string_ LPCWSTR wstrFormat, va_list pArgList );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user