Skip to content

Commit

Permalink
Fix stuck with homebrew
Browse files Browse the repository at this point in the history
sometimes plugin only allow stub's functions
  • Loading branch information
d3m3vilurr committed Jan 16, 2017
1 parent fcd6fe0 commit 63e9ab6
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions blit.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
*/
#include <psp2/types.h>
#include <psp2/display.h>

#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <psp2/kernel/clib.h>

#include "blit.h"

Expand Down Expand Up @@ -150,7 +146,7 @@ int blit_string(int sx,int sy,const char *msg)

int blit_string_ctr(int sy,const char *msg)
{
int sx = 960/2-strlen(msg)*(16/2);
int sx = 960/2-sceClibStrnlen(msg, 512)*(16/2);
return blit_string(sx,sy,msg);
}

Expand All @@ -160,7 +156,7 @@ int blit_stringf(int sx, int sy, const char *msg, ...)
char string[512];

va_start(list, msg);
vsprintf(string, msg, list);
sceClibVsnprintf(string, 512, msg, list);
va_end(list);

return blit_string(sx, sy, string);
Expand Down

0 comments on commit 63e9ab6

Please sign in to comment.