]> O.S.I.I.S - jp/vkvg.git/commitdiff
record return value fix for vkvg_rectangle
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Sun, 20 Feb 2022 21:10:08 +0000 (22:10 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Sun, 20 Feb 2022 21:10:08 +0000 (22:10 +0100)
src/recording/vkvg_record_internal.h
src/vkvg_context.c

index a52a3b88d6443146e936fe69103eb22ddce99ad0..13e6b1a5e0172d4dcc6eea90da27126cdb68faa8 100644 (file)
@@ -122,6 +122,12 @@ void                               _record                         (vkvg_recording_t* rec,...);
                return;\
        }\
 }
+#define RECORD2(ctx,...) {\
+       if (ctx->recording)     {\
+               _record (ctx->recording,__VA_ARGS__);\
+               return 0;\
+       }\
+}
 
 
 #endif
index 4a9fda969b1d2b38ef6e5aede30f625d086bdf7d..03988ab41a8ddb3f76becfd55db3a30b52b7af9c 100644 (file)
@@ -610,7 +610,7 @@ void vkvg_fill_rectangle (VkvgContext ctx, float x, float y, float w, float h){
 vkvg_status_t vkvg_rectangle (VkvgContext ctx, float x, float y, float w, float h){
        if (ctx->status)
                return ctx->status;
-       RECORD(ctx, VKVG_CMD_RECTANGLE, x, y, w, h);
+       RECORD2(ctx, VKVG_CMD_RECTANGLE, x, y, w, h);
        LOG(VKVG_LOG_INFO_CMD, "\tCMD: rectangle: %f,%f,%f,%f\n", x, y, w, h);
        _finish_path (ctx);