summaryrefslogtreecommitdiff
path: root/scene/2d/audio_stream_player_2d.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-08-20 12:55:46 -0300
committerGitHub <noreply@github.com>2017-08-20 12:55:46 -0300
commit541fdffc0ab2115238fe9cedbf1c088b15f11fdf (patch)
tree187c5d0278e5075907fef8a86b4d00d6a0b7161a /scene/2d/audio_stream_player_2d.cpp
parent831e21e89ba0275b43b6a351e538256b8ce715a3 (diff)
parent90b8a5b71ef79e0339826507c4b290f0c51b7cd2 (diff)
Merge pull request #10319 from neikeq/pr-engine-editor-hint
Adds Engine::is_editor_hint() method
Diffstat (limited to 'scene/2d/audio_stream_player_2d.cpp')
-rw-r--r--scene/2d/audio_stream_player_2d.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp
index 1423a804ff..73782e1515 100644
--- a/scene/2d/audio_stream_player_2d.cpp
+++ b/scene/2d/audio_stream_player_2d.cpp
@@ -1,7 +1,10 @@
#include "audio_stream_player_2d.h"
+
+#include "engine.h"
#include "scene/2d/area_2d.h"
#include "scene/main/viewport.h"
+
void AudioStreamPlayer2D::_mix_audio() {
if (!stream_playback.is_valid()) {
@@ -120,7 +123,7 @@ void AudioStreamPlayer2D::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
AudioServer::get_singleton()->add_callback(_mix_audios, this);
- if (autoplay && !get_tree()->is_editor_hint()) {
+ if (autoplay && !Engine::get_singleton()->is_editor_hint()) {
play();
}
}