From ac6ea9b9a4d4d37b0545ddada10d8830447cdfae Mon Sep 17 00:00:00 2001 From: cyberwarriorx Date: Sun, 4 Jun 2006 22:32:56 +0000 Subject: [PATCH] -Changed's unsigned long's to u32. Should be more 64-bit compatible --- desmume/src/FIFO.c | 8 ++++---- desmume/src/FIFO.h | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/desmume/src/FIFO.c b/desmume/src/FIFO.c index ef299ad99..bcd453cff 100644 --- a/desmume/src/FIFO.c +++ b/desmume/src/FIFO.c @@ -23,7 +23,7 @@ void FIFOInit(FIFO * fifo) { - unsigned long i; + u32 i; fifo->begin = 0; fifo->end = 0; @@ -34,7 +34,7 @@ void FIFOInit(FIFO * fifo) fifo->error = FALSE; } -void FIFOAdd(FIFO * fifo, unsigned long v) +void FIFOAdd(FIFO * fifo, u32 v) { if(fifo->full) { @@ -47,14 +47,14 @@ void FIFOAdd(FIFO * fifo, unsigned long v) fifo->empty = FALSE; } -unsigned long FIFOValue(FIFO * fifo) +u32 FIFOValue(FIFO * fifo) { if(fifo->empty) { fifo->error = TRUE; return 0; } - unsigned long v = fifo->data[fifo->begin]; + u32 v = fifo->data[fifo->begin]; fifo->begin = (fifo->begin + 1)& 0x1FFF; fifo->empty = (fifo->begin == fifo->end); return v; diff --git a/desmume/src/FIFO.h b/desmume/src/FIFO.h index 2fa05277e..0bc6eb095 100644 --- a/desmume/src/FIFO.h +++ b/desmume/src/FIFO.h @@ -30,17 +30,17 @@ extern "C" { typedef struct { - unsigned long data[0x2000]; - unsigned long begin; - unsigned long end; + u32 data[0x2000]; + u32 begin; + u32 end; BOOL full; BOOL empty; BOOL error; } FIFO; void FIFOInit(FIFO * fifo); -void FIFOAdd(FIFO * fifo, unsigned long v); -unsigned long FIFOValue(FIFO * fifo); +void FIFOAdd(FIFO * fifo, u32 v); +u32 FIFOValue(FIFO * fifo); #ifdef __cplusplus }