mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-05 14:57:46 -04:00
improve linux makefile
git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@641 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
4ab30ad461
commit
73a853695e
3 changed files with 57 additions and 34 deletions
|
@ -94,12 +94,15 @@ void text_out16(int x, int y, const char *texto, ...)
|
|||
char buffer[256];
|
||||
int maxw = (SCREEN_WIDTH - x) / 8;
|
||||
|
||||
if (maxw < 0)
|
||||
return;
|
||||
|
||||
va_start(args, texto);
|
||||
vsnprintf(buffer, sizeof(buffer), texto, args);
|
||||
va_end(args);
|
||||
|
||||
if (maxw > 255)
|
||||
maxw = 255;
|
||||
if (maxw > sizeof(buffer) - 1)
|
||||
maxw = sizeof(buffer) - 1;
|
||||
buffer[maxw] = 0;
|
||||
|
||||
text_out16_(x,y,buffer,menu_text_color);
|
||||
|
@ -141,9 +144,15 @@ static void smalltext_out16_(int x, int y, const char *texto, int color)
|
|||
void smalltext_out16(int x, int y, const char *texto, int color)
|
||||
{
|
||||
char buffer[SCREEN_WIDTH/6+1];
|
||||
int maxw = (SCREEN_WIDTH - x) / 6;
|
||||
|
||||
if (maxw < 0)
|
||||
return;
|
||||
|
||||
strncpy(buffer, texto, sizeof(buffer));
|
||||
buffer[sizeof(buffer) - 1] = 0;
|
||||
if (maxw > sizeof(buffer) - 1)
|
||||
maxw = sizeof(buffer) - 1;
|
||||
buffer[maxw] = 0;
|
||||
|
||||
smalltext_out16_(x, y, buffer, color);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue