From d13246d52f7ee4eaf90ddc6c30458e853db313d1 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Mon, 7 Feb 2022 01:30:35 +0100 Subject: [PATCH] psx.h: define root counter specs as macros ISO C considers enumerators of int type, so any value larger than 0x7FFFFFFF is considered invalid on platforms where sizeof (int) == 4. A workaround for this limitation on the language is to use macros instead. --- libpsx/include/psx.h | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/libpsx/include/psx.h b/libpsx/include/psx.h index 9fdbff0..d1d73c0 100644 --- a/libpsx/include/psx.h +++ b/libpsx/include/psx.h @@ -125,18 +125,14 @@ enum cop0_register_numbers /** * Root counter specifications */ - -enum psx_rcnt_specs -{ - /** Pixel clock*/ - RCntCNT0 = 0xf2000000, - /** Horizontal sync*/ - RCntCNT1 = 0xf2000001, - /** System clock / 8 */ - RCntCNT2 = 0xf2000002, - /** VSync (VBlank) */ - RCntCNT3 = 0xf2000003, -}; +/** Pixel clock*/ +#define RCntCNT0 0xf2000000 +/** Horizontal sync*/ +#define RCntCNT1 0xf2000001 +/** System clock / 8 */ +#define RCntCNT2 0xf2000002 +/** VSync (VBlank) */ +#define RCntCNT3 0xf2000003 /** * Root counter modes