diff --git a/include/coreinit/filesystem.h b/include/coreinit/filesystem.h index 54537450..37652b61 100644 --- a/include/coreinit/filesystem.h +++ b/include/coreinit/filesystem.h @@ -380,14 +380,14 @@ FSStatus FSGetFreeSpaceSize(FSClient *client, FSCmdBlock *block, char *path, - u64 *outSize, + uint64_t *outSize, uint32_t flags); FSStatus FSGetFreeSpaceSizeAsync(FSClient *client, FSCmdBlock *block, char *path, - u64 *outSize, + uint64_t *outSize, uint32_t flags, FSAsyncData *asyncData); diff --git a/include/coreinit/title.h b/include/coreinit/title.h index c37a15a1..a0787d41 100644 --- a/include/coreinit/title.h +++ b/include/coreinit/title.h @@ -1,11 +1,17 @@ #pragma once #include +/** + * \defgroup coreinit_title Title + * \ingroup coreinit + * @{ + */ + #ifdef __cplusplus extern "C" { #endif -u64 OSGetTitleID(void); +uint64_t OSGetTitleID(void); #ifdef __cplusplus } diff --git a/include/gx2r/surface.h b/include/gx2r/surface.h index 1a435739..6e71a89c 100644 --- a/include/gx2r/surface.h +++ b/include/gx2r/surface.h @@ -14,21 +14,21 @@ extern "C" { typedef struct GX2Surface GX2Surface; -bool +BOOL GX2RCreateSurface(GX2Surface *surface, GX2RResourceFlags flags); -bool +BOOL GX2RCreateSurfaceUserMemory(GX2Surface *surface, uint8_t *image, uint8_t *mipmap, GX2RResourceFlags flags); -void +BOOL GX2RDestroySurfaceEx(GX2Surface *surface, GX2RResourceFlags flags); -void +BOOL GX2RInvalidateSurface(GX2Surface *surface, int32_t level, GX2RResourceFlags flags); diff --git a/include/wut_types.h b/include/wut_types.h index 8d25225e..667ef8f7 100644 --- a/include/wut_types.h +++ b/include/wut_types.h @@ -1,8 +1,7 @@ #pragma once #include -#include -typedef int BOOL; +typedef int32_t BOOL; #ifndef TRUE #define TRUE 1 @@ -11,34 +10,3 @@ typedef int BOOL; #ifndef FALSE #define FALSE 0 #endif - -typedef uint8_t u8; -typedef uint16_t u16; -typedef uint32_t u32; -typedef uint64_t u64; - -typedef int8_t s8; -typedef int16_t s16; -typedef int32_t s32; -typedef int64_t s64; - -typedef volatile u8 vu8; -typedef volatile u16 vu16; -typedef volatile u32 vu32; -typedef volatile u64 vu64; - -typedef volatile s8 vs8; -typedef volatile s16 vs16; -typedef volatile s32 vs32; -typedef volatile s64 vs64; - -typedef s16 sfp16; -typedef s32 sfp32; -typedef u16 ufp16; -typedef u32 ufp32; - -typedef float f32; -typedef double f64; - -typedef volatile float vf32; -typedef volatile double vf64; diff --git a/libraries/libwhb/src/gfx.c b/libraries/libwhb/src/gfx.c index 165c446e..c47f2cc8 100644 --- a/libraries/libwhb/src/gfx.c +++ b/libraries/libwhb/src/gfx.c @@ -464,7 +464,7 @@ WHBGfxBeginRender() OSTime lastFlip, lastVsync; uint32_t waitCount = 0; - while (true) { + while (1) { GX2GetSwapStatus(&swapCount, &flipCount, &lastFlip, &lastVsync); if (flipCount >= swapCount) { diff --git a/libraries/wutdevoptab_sd/devoptab_sd.c b/libraries/wutdevoptab_sd/devoptab_sd.c index d6ea25f4..7677d6f2 100644 --- a/libraries/wutdevoptab_sd/devoptab_sd.c +++ b/libraries/wutdevoptab_sd/devoptab_sd.c @@ -36,8 +36,8 @@ __wut_fs_devoptab = FSClient * __wut_devoptab_sd_client = NULL; -static bool -__wut_fs_initialised = false; +static BOOL +__wut_fs_initialised = FALSE; FSStatus __init_wut_devoptab_sd() @@ -69,7 +69,7 @@ __init_wut_devoptab_sd() if(dev != -1) { setDefaultDevice(dev); - __wut_fs_initialised = true; + __wut_fs_initialised = TRUE; // Mount the SD card rc = FSGetMountSource(__wut_devoptab_sd_client, &fsCmd, FS_MOUNT_SOURCE_SD, &mountSource, -1); diff --git a/libraries/wutdevoptab_sd/devoptab_sd_getmtime.c b/libraries/wutdevoptab_sd/devoptab_sd_getmtime.c index a693f5c6..c283b8e4 100644 --- a/libraries/wutdevoptab_sd/devoptab_sd_getmtime.c +++ b/libraries/wutdevoptab_sd/devoptab_sd_getmtime.c @@ -2,7 +2,7 @@ int __wut_fs_getmtime(const char *name, - u64 *mtime) + uint64_t *mtime) { // TODO: Last modified time can probably be get via FSGetStatFile return -1; diff --git a/libraries/wutdevoptab_sd/devoptab_sd_read.c b/libraries/wutdevoptab_sd/devoptab_sd_read.c index 2976271d..00a09fb8 100644 --- a/libraries/wutdevoptab_sd/devoptab_sd_read.c +++ b/libraries/wutdevoptab_sd/devoptab_sd_read.c @@ -7,7 +7,7 @@ __wut_fs_read(struct _reent *r, size_t len) { FSStatus rc; - u32 bytes, bytesRead = 0; + uint32_t bytes, bytesRead = 0; __wut_fs_file_t *file = (__wut_fs_file_t *)fd; // Check that the file was opened with read access @@ -29,7 +29,7 @@ __wut_fs_read(struct _reent *r, } // Copy to internal buffer and read in chunks. - u8 *tmp_buffer = memalign(0x40, 8192); + uint8_t *tmp_buffer = memalign(0x40, 8192); while(len > 0) { size_t toRead = len; diff --git a/libraries/wutdevoptab_sd/devoptab_sd_seek.c b/libraries/wutdevoptab_sd/devoptab_sd_seek.c index 2241e725..b1629f7d 100644 --- a/libraries/wutdevoptab_sd/devoptab_sd_seek.c +++ b/libraries/wutdevoptab_sd/devoptab_sd_seek.c @@ -7,7 +7,7 @@ __wut_fs_seek(struct _reent *r, int whence) { FSStatus rc; - u64 offset; + uint64_t offset; __wut_fs_file_t *file = (__wut_fs_file_t *)fd; // Set up command block diff --git a/libraries/wutdevoptab_sd/devoptab_sd_statvfs.c b/libraries/wutdevoptab_sd/devoptab_sd_statvfs.c index 7fbd55dd..b823b236 100644 --- a/libraries/wutdevoptab_sd/devoptab_sd_statvfs.c +++ b/libraries/wutdevoptab_sd/devoptab_sd_statvfs.c @@ -6,7 +6,6 @@ __wut_fs_statvfs(struct _reent *r, struct statvfs *buf) { FSStatus rc; - bool writable = false; char *path_fix = __wut_fs_fixpath(r, path); if (!path_fix) { diff --git a/libraries/wutdevoptab_sd/devoptab_sd_write.c b/libraries/wutdevoptab_sd/devoptab_sd_write.c index fe4a5215..5edaa870 100644 --- a/libraries/wutdevoptab_sd/devoptab_sd_write.c +++ b/libraries/wutdevoptab_sd/devoptab_sd_write.c @@ -7,7 +7,7 @@ __wut_fs_write(struct _reent *r, size_t len) { FSStatus rc; - u32 bytes, bytesWritten = 0; + uint32_t bytes, bytesWritten = 0; __wut_fs_file_t *file = (__wut_fs_file_t *)fd; // Check that the file was opened with write access @@ -17,7 +17,7 @@ __wut_fs_write(struct _reent *r, } // Copy to internal buffer and write in chunks. - u8 *tmp_buffer = memalign(0x40, 8192); + uint8_t *tmp_buffer = memalign(0x40, 8192); while(len > 0) { size_t toWrite = len;