]> Chaos Git - corbenik/ctrulib.git/commitdiff
Fix GPUCMD_AddSingleParam() C++ compatibility issue
authorfincs <fincs.alt1@gmail.com>
Wed, 7 Oct 2015 18:50:57 +0000 (20:50 +0200)
committerfincs <fincs.alt1@gmail.com>
Wed, 7 Oct 2015 18:50:57 +0000 (20:50 +0200)
libctru/include/3ds/gpu/gpu.h

index d85484850f6e38c55becce3f352417827d9969ac..aefdef2c5c7a33efaead28e806cf6f1fdf62502a 100644 (file)
@@ -89,7 +89,10 @@ u32 f32tof24(float f);
 u32 f32tof31(float f);
 
 /// Adds a command with a single parameter to the current command buffer.
-#define GPUCMD_AddSingleParam(header, param) GPUCMD_Add((header), (u32[]){(u32)(param)}, 1)
+static inline void GPUCMD_AddSingleParam(u32 header, u32 param)
+{
+       GPUCMD_Add(header, &param, 1);
+}
 
 /// Adds a masked register write to the current command buffer.
 #define GPUCMD_AddMaskedWrite(reg, mask, val) GPUCMD_AddSingleParam(GPUCMD_HEADER(0, (mask), (reg)), (val))