From 832e49adefa93de566a13a46eb2a46babf037925 Mon Sep 17 00:00:00 2001 From: Crayon2000 Date: Tue, 30 Apr 2019 18:51:30 -0400 Subject: [PATCH] Fix README --- README.md | 6 +++--- examples/ttf/source/main.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c75aec3..35d3cf5 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ libpngu is supplied as source code libpng is supplied via devkitPro pacman (ppc-libpng) libfreetype is supplied via devkitPro pacman (ppc-freetype) libjpeg is supplied via devkitPro pacman (ppc-libjpeg-turbo) -libfat is supplied via devkitPro pacman (libfat) +libfat is supplied via devkitPro pacman (libfat-ogc) ``` The easy way is to install GRRLIB and all the required libraries in a single @@ -97,7 +97,7 @@ command: ```bash c: cd \grr\GRRLIB - pacman --sync --needed --noconfirm libfat ppc-libpng ppc-freetype ppc-libjpeg-turbo + pacman --sync --needed --noconfirm libfat-ogc ppc-libpng ppc-freetype ppc-libjpeg-turbo make clean all install ``` @@ -109,7 +109,7 @@ installed and you are ready to start developing Wii homebrew games. If you want, you could install the libfat, libpng, libfreetype and libjpeg with there dependencies in a single command: ```bash - pacman --sync --needed --noconfirm libfat ppc-libpng ppc-freetype ppc-libjpeg-turbo + pacman --sync --needed --noconfirm libfat-ogc ppc-libpng ppc-freetype ppc-libjpeg-turbo ``` Each library could also be installed individually: diff --git a/examples/ttf/source/main.c b/examples/ttf/source/main.c index e546852..5a70b63 100644 --- a/examples/ttf/source/main.c +++ b/examples/ttf/source/main.c @@ -67,7 +67,7 @@ int main(int argc, char **argv) { if(ShowFPS == true) { char FPS[255]; - sprintf(FPS, "Current FPS: %d", CalculateFrameRate()); + snprintf(FPS, sizeof(FPS), "Current FPS: %d", CalculateFrameRate()); GRRLIB_PrintfTTF(500+1, 25+1, myFont, FPS, 12, 0x000000FF); GRRLIB_PrintfTTF(500, 25, myFont, FPS, 12, 0xFFFFFFFF); } @@ -126,7 +126,7 @@ static bool ScreenShot() { char path[255]; time_t now = time(NULL); struct tm *ti = localtime(&now); - sprintf(path, "sd:/grrlib_ttf_%d%02d%02d%02d%02d%02d.png", + snprintf(path, sizeof(path), "sd:/grrlib_ttf_%d%02d%02d%02d%02d%02d.png", ti->tm_year + 1900, ti->tm_mon + 1, ti->tm_mday, ti->tm_hour, ti->tm_min, ti->tm_sec); return GRRLIB_ScrShot(path); }