Explicity check not javascript when including pseudoterminal

If compiling for javascript platform on linux '__unix__' will be defined,
so instead check for the abscence of '__EMSCRIPTEN__'.
This commit is contained in:
Leroy Hopson 2021-06-15 13:39:10 +07:00
parent 0437d0f18c
commit c1334896d6
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA

View file

@ -1,5 +1,5 @@
#include "terminal.h"
#if defined(__unix__) // Linux and macOS.
#if defined(__unix__) /* Linux and macOS */ && !defined(__EMSCRIPTEN__)
#include "pseudoterminal.h"
#endif
@ -16,7 +16,7 @@ extern "C" void GDN_EXPORT godot_nativescript_init(void *handle) {
godot::Godot::nativescript_init(handle);
godot::register_tool_class<godot::Terminal>();
#if defined(__unix__)
#if defined(__unix__) && !defined(__EMSCRIPTEN__)
godot::register_class<godot::Pseudoterminal>();
#endif
}