Skip to content

Commit 0b25561

Browse files
authored
No wonder it doesn't work in editor
1 parent 5055961 commit 0b25561

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/JoystickNode.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ void JoystickNode::ccTouchMoved(CCTouch *touch, CCEvent *event) {
102102
}
103103

104104
if (inp != m_currentInput) {
105-
if (auto pl = PlayLayer::get()) {
106-
handleInput(pl, inp, m_currentInput);
105+
if (auto uil = UILayer::get(); uil && uil->m_gameLayer) {
106+
handleInput(uil->m_gameLayer, inp, m_currentInput);
107107
}
108108
}
109109
m_currentInput = inp;

0 commit comments

Comments
 (0)