Remove sized types from wut_types.h

stdint.h exists for a reason.
This commit is contained in:
James Benton 2018-06-20 10:26:10 +01:00
parent 4f224c6eb8
commit b4619783ca
11 changed files with 24 additions and 51 deletions

View File

@ -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);

View File

@ -1,11 +1,17 @@
#pragma once
#include <wut.h>
/**
* \defgroup coreinit_title Title
* \ingroup coreinit
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
u64 OSGetTitleID(void);
uint64_t OSGetTitleID(void);
#ifdef __cplusplus
}

View File

@ -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);

View File

@ -1,8 +1,7 @@
#pragma once
#include <stdint.h>
#include <stdbool.h>
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;

View File

@ -464,7 +464,7 @@ WHBGfxBeginRender()
OSTime lastFlip, lastVsync;
uint32_t waitCount = 0;
while (true) {
while (1) {
GX2GetSwapStatus(&swapCount, &flipCount, &lastFlip, &lastVsync);
if (flipCount >= swapCount) {

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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) {

View File

@ -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;