Skip to content

Commit 2a3852b

Browse files
committed
Fix compiling with latest Godot, remove seemingly unnecessary header
1 parent 3928943 commit 2a3852b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

util/godot/core/gdvirtual.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@
22
#define ZN_GODOT_GDVIRTUAL_H
33

44
#if defined(ZN_GODOT)
5-
#include <core/object/script_language.h> // needed for GDVIRTUAL macro
6-
#include <core/object/gdvirtual.gen.inc> // Also needed for GDVIRTUAL macro...
5+
#include "../core/version.h"
6+
7+
#include <core/object/script_language.h>
8+
9+
#if GODOT_VERSION_MAJOR == 4 && GODOT_VERSION_MINOR <= 6
10+
#include <core/object/gdvirtual.gen.inc>
11+
#else
12+
#include <core/object/gdvirtual.gen.h>
13+
#endif
14+
715
#elif defined(ZN_GODOT_EXTENSION)
816
#include <godot_cpp/core/gdvirtual.gen.inc>
917
#endif

0 commit comments

Comments
 (0)