diff --git a/GRRLIB/GRRLIB/GRRLIB.c b/GRRLIB/GRRLIB/GRRLIB.c index 45441c7..fb06c20 100644 --- a/GRRLIB/GRRLIB/GRRLIB.c +++ b/GRRLIB/GRRLIB/GRRLIB.c @@ -13,6 +13,7 @@ #include "../lib/libpng/pngu/pngu.h" #include "../lib/libjpeg/jpeglib.h" #include "GRRLIB.h" +#include #include #define DEFAULT_FIFO_SIZE (256 * 1024) /**< GX fifo buffer size. */ @@ -900,10 +901,9 @@ void GRRLIB_Init() { if(rmode == NULL) return; - /* Widescreen patch by CashMan's Productions (http://www.CashMan-Productions.fr.nf) */ - if (CONF_GetAspectRatio() == CONF_ASPECT_16_9) - { - rmode->viWidth = 678; + // Widescreen patch by CashMan's Productions (http://www.CashMan-Productions.fr.nf) + if(CONF_GetAspectRatio() == CONF_ASPECT_16_9) { + rmode->viWidth = 678; rmode->viXOrigin = (VI_MAX_WIDTH_NTSC - 678)/2; } @@ -1020,16 +1020,16 @@ void GRRLIB_Exit() { /** * Make a PNG screenshot on the SD card. - * @param File Name of the file to write. - * @return True if every thing worked, false otherwise. + * libfat is required to use the function. + * @param File name of the file to write. + * @return true if every thing worked, false otherwise. */ bool GRRLIB_ScrShot(const char* File) { - IMGCTX pngContext; int ErrorCode = -1; + IMGCTX pngContext; - if(fatInitDefault() && (pngContext = PNGU_SelectImageFromDevice(File))) - { + if(fatInitDefault() && (pngContext = PNGU_SelectImageFromDevice(File))) { ErrorCode = PNGU_EncodeFromYCbYCr(pngContext, 640, 480, xfb[fb], 0); PNGU_ReleaseImageContext(pngContext); } diff --git a/GRRLIB/GRRLIB/GRRLIB.h b/GRRLIB/GRRLIB/GRRLIB.h index fe765e0..5f51b13 100644 --- a/GRRLIB/GRRLIB/GRRLIB.h +++ b/GRRLIB/GRRLIB/GRRLIB.h @@ -14,7 +14,6 @@ */ #include -#include #ifdef __cplusplus extern "C" {