mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 02:21:15 +00:00
Merge pull request #45315 from RandomShaper/modernize_thread
Modernize Thread
This commit is contained in:
commit
5525cd85c6
87 changed files with 385 additions and 1056 deletions
|
|
@ -74,13 +74,12 @@ void JoypadLinux::Joypad::reset() {
|
|||
JoypadLinux::JoypadLinux(Input *in) {
|
||||
exit_udev = false;
|
||||
input = in;
|
||||
joy_thread = Thread::create(joy_thread_func, this);
|
||||
joy_thread.start(joy_thread_func, this);
|
||||
}
|
||||
|
||||
JoypadLinux::~JoypadLinux() {
|
||||
exit_udev = true;
|
||||
Thread::wait_to_finish(joy_thread);
|
||||
memdelete(joy_thread);
|
||||
joy_thread.wait_to_finish();
|
||||
close_joypad();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue