瀏覽代碼

Add RAYLIB_VERSION numbers to raylib.h (#2856)

Ran into an issue in raylib-cpp where a user was using raylib 4.5-dev, even though the library currently only targets 4.2. With having RAYLIB_VERSION_MAJOR and RAYLIB_VERSION_MINOR, we will be able to target different versions of raylib in different ways, via C preprocessor conditionals.

For example:
``` c
newColor = ColorTint(BLUE, RED);
TraceLog(LOG_INFO, "The color should be tinted, but this isn't supported in ryalib <= 4.2");
```
pull/2883/head
Rob Loach 2 年之前
committed by GitHub
父節點
當前提交
4706891cae
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. +3
    -0
      src/raylib.h

+ 3
- 0
src/raylib.h 查看文件

@ -81,6 +81,9 @@
#include <stdarg.h> // Required for: va_list - Only used by TraceLogCallback
#define RAYLIB_VERSION_MAJOR 4
#define RAYLIB_VERSION_MINOR 5
#define RAYLIB_VERSION_PATCH 0
#define RAYLIB_VERSION "4.5-dev"
// Function specifiers in case library is build/used as a shared library (Windows)

Loading…
取消
儲存