diff options
Diffstat (limited to 'platform/uwp')
| -rw-r--r-- | platform/uwp/app.cpp | 1 | ||||
| -rw-r--r-- | platform/uwp/app.h | 1 | ||||
| -rw-r--r-- | platform/uwp/export/export.cpp | 3 | ||||
| -rw-r--r-- | platform/uwp/export/export.h | 1 | ||||
| -rw-r--r-- | platform/uwp/gl_context_egl.cpp | 1 | ||||
| -rw-r--r-- | platform/uwp/gl_context_egl.h | 1 | ||||
| -rw-r--r-- | platform/uwp/joypad_uwp.cpp | 19 | ||||
| -rw-r--r-- | platform/uwp/joypad_uwp.h | 3 | ||||
| -rw-r--r-- | platform/uwp/os_uwp.cpp | 9 | ||||
| -rw-r--r-- | platform/uwp/os_uwp.h | 4 | ||||
| -rw-r--r-- | platform/uwp/platform_config.h | 1 | ||||
| -rw-r--r-- | platform/uwp/thread_uwp.cpp | 1 | ||||
| -rw-r--r-- | platform/uwp/thread_uwp.h | 1 |
13 files changed, 26 insertions, 20 deletions
diff --git a/platform/uwp/app.cpp b/platform/uwp/app.cpp index 35b25b1de5..2946aa1eae 100644 --- a/platform/uwp/app.cpp +++ b/platform/uwp/app.cpp @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/platform/uwp/app.h b/platform/uwp/app.h index fd6fc950a7..647ef0261b 100644 --- a/platform/uwp/app.h +++ b/platform/uwp/app.h @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp index a9b26056fc..4a164e5ba1 100644 --- a/platform/uwp/export/export.cpp +++ b/platform/uwp/export/export.cpp @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -1032,7 +1033,7 @@ void AppxPackager::finish() { Error err = read_cert_file(certificate_path, certificate_pass, &cert_file); if (err != OK) { - EditorNode::add_io_error(TTR("Couldn't read the certficate file. Are the path and password both correct?")); + EditorNode::add_io_error(TTR("Couldn't read the certificate file. Are the path and password both correct?")); package->close(); memdelete(package); package = NULL; diff --git a/platform/uwp/export/export.h b/platform/uwp/export/export.h index 2d6e02bb10..81bd848241 100644 --- a/platform/uwp/export/export.h +++ b/platform/uwp/export/export.h @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/platform/uwp/gl_context_egl.cpp b/platform/uwp/gl_context_egl.cpp index 6c9efc26b4..d79ce75db5 100644 --- a/platform/uwp/gl_context_egl.cpp +++ b/platform/uwp/gl_context_egl.cpp @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/platform/uwp/gl_context_egl.h b/platform/uwp/gl_context_egl.h index c397c1206b..908b8dceec 100644 --- a/platform/uwp/gl_context_egl.h +++ b/platform/uwp/gl_context_egl.h @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/platform/uwp/joypad_uwp.cpp b/platform/uwp/joypad_uwp.cpp index dd57ed94ae..34e36f7b66 100644 --- a/platform/uwp/joypad_uwp.cpp +++ b/platform/uwp/joypad_uwp.cpp @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -40,7 +41,7 @@ void JoypadUWP::register_events() { ref new EventHandler<Gamepad ^>(this, &JoypadUWP::OnGamepadRemoved); } -uint32_t JoypadUWP::process_controllers(uint32_t p_last_id) { +void JoypadUWP::process_controllers() { for (int i = 0; i < MAX_CONTROLLERS; i++) { @@ -55,23 +56,21 @@ uint32_t JoypadUWP::process_controllers(uint32_t p_last_id) { int button_mask = (int)GamepadButtons::Menu; for (int j = 0; j < 14; j++) { - p_last_id = input->joy_button(p_last_id, controllers[i].id, j, (int)reading.Buttons & button_mask); + input->joy_button(controllers[i].id, j, (int)reading.Buttons & button_mask); button_mask *= 2; } - p_last_id = input->joy_axis(p_last_id, controllers[i].id, JOY_AXIS_0, axis_correct(reading.LeftThumbstickX)); - p_last_id = input->joy_axis(p_last_id, controllers[i].id, JOY_AXIS_1, axis_correct(reading.LeftThumbstickY, true)); - p_last_id = input->joy_axis(p_last_id, controllers[i].id, JOY_AXIS_2, axis_correct(reading.RightThumbstickX)); - p_last_id = input->joy_axis(p_last_id, controllers[i].id, JOY_AXIS_3, axis_correct(reading.RightThumbstickY, true)); - p_last_id = input->joy_axis(p_last_id, controllers[i].id, JOY_AXIS_4, axis_correct(reading.LeftTrigger, false, true)); - p_last_id = input->joy_axis(p_last_id, controllers[i].id, JOY_AXIS_5, axis_correct(reading.RightTrigger, false, true)); + input->joy_axis(controllers[i].id, JOY_AXIS_0, axis_correct(reading.LeftThumbstickX)); + input->joy_axis(controllers[i].id, JOY_AXIS_1, axis_correct(reading.LeftThumbstickY, true)); + input->joy_axis(controllers[i].id, JOY_AXIS_2, axis_correct(reading.RightThumbstickX)); + input->joy_axis(controllers[i].id, JOY_AXIS_3, axis_correct(reading.RightThumbstickY, true)); + input->joy_axis(controllers[i].id, JOY_AXIS_4, axis_correct(reading.LeftTrigger, false, true)); + input->joy_axis(controllers[i].id, JOY_AXIS_5, axis_correct(reading.RightTrigger, false, true)); break; } } } - - return p_last_id; } JoypadUWP::JoypadUWP() { diff --git a/platform/uwp/joypad_uwp.h b/platform/uwp/joypad_uwp.h index e5a961e70e..7337ffb3ce 100644 --- a/platform/uwp/joypad_uwp.h +++ b/platform/uwp/joypad_uwp.h @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -37,7 +38,7 @@ ref class JoypadUWP sealed { /* clang-format off */ internal: void register_events(); - uint32_t process_controllers(uint32_t p_last_id); + void process_controllers(); /* clang-format on */ JoypadUWP(); diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp index 19ed2b57a3..8b7e821ab3 100644 --- a/platform/uwp/os_uwp.cpp +++ b/platform/uwp/os_uwp.cpp @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -344,15 +345,12 @@ String OSUWP::get_clipboard() const { void OSUWP::input_event(InputEvent &p_event) { - p_event.ID = ++last_id; - input->parse_input_event(p_event); if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.pressed && p_event.mouse_button.button_index > 3) { //send release for mouse wheel p_event.mouse_button.pressed = false; - p_event.ID = ++last_id; input->parse_input_event(p_event); } }; @@ -534,7 +532,7 @@ OSUWP::MouseMode OSUWP::get_mouse_mode() const { return mouse_mode; } -Point2 OSUWP::get_mouse_pos() const { +Point2 OSUWP::get_mouse_position() const { return Point2(old_x, old_y); } @@ -680,7 +678,7 @@ uint64_t OSUWP::get_ticks_usec() const { void OSUWP::process_events() { - last_id = joypad->process_controllers(last_id); + joypad->process_controllers(); process_key_events(); } @@ -907,7 +905,6 @@ OSUWP::OSUWP() { pressrc = 0; old_invalid = true; - last_id = 0; mouse_mode = MOUSE_MODE_VISIBLE; #ifdef STDOUT_FILE stdo = fopen("stdout.txt", "wb"); diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h index ebbb8af39c..88a1dddae3 100644 --- a/platform/uwp/os_uwp.h +++ b/platform/uwp/os_uwp.h @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -92,7 +93,6 @@ private: bool outside; int old_x, old_y; Point2i center; - unsigned int last_id; VisualServer *visual_server; Rasterizer *rasterizer; PhysicsServer *physics_server; @@ -190,7 +190,7 @@ public: void set_mouse_mode(MouseMode p_mode); MouseMode get_mouse_mode() const; - virtual Point2 get_mouse_pos() const; + virtual Point2 get_mouse_position() const; virtual int get_mouse_button_state() const; virtual void set_window_title(const String &p_title); diff --git a/platform/uwp/platform_config.h b/platform/uwp/platform_config.h index 7939e1c9ee..77d2c9cadb 100644 --- a/platform/uwp/platform_config.h +++ b/platform/uwp/platform_config.h @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/platform/uwp/thread_uwp.cpp b/platform/uwp/thread_uwp.cpp index ff079be375..436941707c 100644 --- a/platform/uwp/thread_uwp.cpp +++ b/platform/uwp/thread_uwp.cpp @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/platform/uwp/thread_uwp.h b/platform/uwp/thread_uwp.h index b4e67c8b5c..0424f0f577 100644 --- a/platform/uwp/thread_uwp.h +++ b/platform/uwp/thread_uwp.h @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ |