summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2022-02-07 01:30:35 +0100
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2022-02-07 01:31:02 +0100
commitd13246d52f7ee4eaf90ddc6c30458e853db313d1 (patch)
tree36f8cab9e0209ff1698a6f0a7154b4701072a55d
parentec53e6d22f2a7cdac2af05d77a6b18ea83dcba6c (diff)
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.
-rw-r--r--libpsx/include/psx.h20
1 files 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