Skip to content

Commit e063bae

Browse files
committed
[godot] Closes #2958, compatibitlity with deprecated=no
1 parent 5658eec commit e063bae

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

spine-godot/spine_godot/SpineCommon.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#ifndef SPINE_COMMON_H
3131
#define SPINE_COMMON_H
3232

33+
#include "core/version_generated.gen.h"
3334
#ifdef SPINE_GODOT_EXTENSION
3435
#include <godot_cpp/core/version.hpp>
3536
#include <godot_cpp/classes/ref_counted.hpp>
@@ -57,6 +58,15 @@ using namespace godot;
5758
#define RS RenderingServer
5859
#else
5960
#include "core/version.h"
61+
62+
// When running scons with deprecated=no, these are not defined in version.h in Godot 4.5.1
63+
// but our code for older versions of Godot relies on them.
64+
#ifndef VERSION_MAJOR
65+
#define VERSION_MAJOR GODOT_VERSION_MAJOR
66+
#define VERSION_MINOR GODOT_VERSION_MINOR
67+
#define VERSION_PATCH GODOT_VERSION_PATCH
68+
#endif
69+
6070
#if VERSION_MAJOR > 3
6171
#include "core/core_bind.h"
6272
#include "core/error/error_macros.h"

0 commit comments

Comments
 (0)