summaryrefslogtreecommitdiff
path: root/platform/x11
diff options
context:
space:
mode:
Diffstat (limited to 'platform/x11')
-rw-r--r--platform/x11/export/export.cpp28
-rw-r--r--platform/x11/export/export.h31
-rw-r--r--platform/x11/joystick_linux.cpp8
-rw-r--r--platform/x11/os_x11.cpp6
4 files changed, 62 insertions, 11 deletions
diff --git a/platform/x11/export/export.cpp b/platform/x11/export/export.cpp
index bed57fbe9f..c6675ace72 100644
--- a/platform/x11/export/export.cpp
+++ b/platform/x11/export/export.cpp
@@ -1,3 +1,31 @@
+/*************************************************************************/
+/* export.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* http://www.godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
#include "export.h"
#include "platform/x11/logo.h"
#include "tools/editor/editor_import_export.h"
diff --git a/platform/x11/export/export.h b/platform/x11/export/export.h
index 1077709ea1..9dc13d7459 100644
--- a/platform/x11/export/export.h
+++ b/platform/x11/export/export.h
@@ -1,4 +1,29 @@
-
-
+/*************************************************************************/
+/* export.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* http://www.godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
void register_x11_exporter();
-
diff --git a/platform/x11/joystick_linux.cpp b/platform/x11/joystick_linux.cpp
index 5ce0219df7..82f79c2640 100644
--- a/platform/x11/joystick_linux.cpp
+++ b/platform/x11/joystick_linux.cpp
@@ -439,11 +439,9 @@ void joystick_linux::joystick_vibration_stop(int p_id, uint64_t p_timestamp)
return;
}
- struct input_event stop;
- stop.type = EV_FF;
- stop.code = joy.ff_effect_id;
- stop.value = 0;
- write(joy.fd, (const void*)&stop, sizeof(stop));
+ if (ioctl(joy.fd, EVIOCRMFF, joy.ff_effect_id) < 0) {
+ return;
+ }
joy.ff_effect_id = -1;
joy.ff_effect_timestamp = p_timestamp;
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 1ca779ef7c..c9349c1bbe 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -1625,7 +1625,7 @@ void OS_X11::process_xevents() {
//Reply that all is well.
XClientMessageEvent m;
- memset(&m, sizeof(m), 0);
+ memset(&m, 0, sizeof(m));
m.type = ClientMessage;
m.display = x11_display;
m.window = xdnd_source_window;
@@ -1662,7 +1662,7 @@ void OS_X11::process_xevents() {
//xdnd position event, reply with an XDND status message
//just depending on type of data for now
XClientMessageEvent m;
- memset(&m, sizeof(m), 0);
+ memset(&m, 0, sizeof(m));
m.type = ClientMessage;
m.display = event.xclient.display;
m.window = event.xclient.data.l[0];
@@ -1689,7 +1689,7 @@ void OS_X11::process_xevents() {
else {
//Reply that we're not interested.
XClientMessageEvent m;
- memset(&m, sizeof(m), 0);
+ memset(&m, 0, sizeof(m));
m.type = ClientMessage;
m.display = event.xclient.display;
m.window = event.xclient.data.l[0];