From: fincs Date: Wed, 7 Oct 2015 18:50:57 +0000 (+0200) Subject: Fix GPUCMD_AddSingleParam() C++ compatibility issue X-Git-Tag: v1.0.0~82 X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=0e7755af015694862a4d2a4c8f2896b4b9ed8256;p=corbenik%2Fctrulib.git Fix GPUCMD_AddSingleParam() C++ compatibility issue --- diff --git a/libctru/include/3ds/gpu/gpu.h b/libctru/include/3ds/gpu/gpu.h index d854848..aefdef2 100644 --- a/libctru/include/3ds/gpu/gpu.h +++ b/libctru/include/3ds/gpu/gpu.h @@ -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, ¶m, 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))