From fb5a73a39fb7e6e5924db362062cba628525028a Mon Sep 17 00:00:00 2001 From: George Marques Date: Wed, 2 Nov 2016 18:26:42 -0200 Subject: Rename WinRT files to UWP --- platform/uwp/joystick_uwp.h | 81 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 platform/uwp/joystick_uwp.h (limited to 'platform/uwp/joystick_uwp.h') diff --git a/platform/uwp/joystick_uwp.h b/platform/uwp/joystick_uwp.h new file mode 100644 index 0000000000..0ae8b35b02 --- /dev/null +++ b/platform/uwp/joystick_uwp.h @@ -0,0 +1,81 @@ +/*************************************************************************/ +/* joystick_uwp.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. */ +/*************************************************************************/ +#ifndef JOYSTICK_WINRT_H +#define JOYSTICK_WINRT_H + +#include "main/input_default.h" + +ref class JoystickWinrt sealed { + +internal: + + void register_events(); + uint32_t process_controllers(uint32_t p_last_id); + + JoystickWinrt(); + JoystickWinrt(InputDefault* p_input); + +private: + + enum { + MAX_CONTROLLERS = 4, + }; + + enum ControllerType { + GAMEPAD_CONTROLLER, + ARCADE_STICK_CONTROLLER, + RACING_WHEEL_CONTROLLER, + }; + + struct ControllerDevice { + + Windows::Gaming::Input::IGameController^ controller_reference; + + int id; + bool connected; + ControllerType type; + + ControllerDevice() { + id = -1; + connected = false; + type = ControllerType::GAMEPAD_CONTROLLER; + } + }; + + ControllerDevice controllers[MAX_CONTROLLERS]; + + InputDefault* input; + + void OnGamepadAdded(Platform::Object^ sender, Windows::Gaming::Input::Gamepad^ value); + void OnGamepadRemoved(Platform::Object^ sender, Windows::Gaming::Input::Gamepad^ value); + + InputDefault::JoyAxis axis_correct(double p_val, bool p_negate = false, bool p_trigger = false) const; +}; + +#endif -- cgit v1.2.3 From 411faaa6f478f837aa40893eaadf67e2b5d57cec Mon Sep 17 00:00:00 2001 From: George Marques Date: Wed, 2 Nov 2016 19:22:49 -0200 Subject: Rename remaining WinRT references to UWP --- platform/uwp/joystick_uwp.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'platform/uwp/joystick_uwp.h') diff --git a/platform/uwp/joystick_uwp.h b/platform/uwp/joystick_uwp.h index 0ae8b35b02..47ec738a18 100644 --- a/platform/uwp/joystick_uwp.h +++ b/platform/uwp/joystick_uwp.h @@ -26,20 +26,20 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef JOYSTICK_WINRT_H -#define JOYSTICK_WINRT_H +#ifndef JOYSTICK_UWP_H +#define JOYSTICK_UWP_H #include "main/input_default.h" -ref class JoystickWinrt sealed { +ref class JoystickUWP sealed { internal: void register_events(); uint32_t process_controllers(uint32_t p_last_id); - JoystickWinrt(); - JoystickWinrt(InputDefault* p_input); + JoystickUWP(); + JoystickUWP(InputDefault* p_input); private: -- cgit v1.2.3 From c7bc44d5ad9aae4902280012f7654e2318cd910e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 1 Jan 2017 22:01:57 +0100 Subject: Welcome in 2017, dear changelog reader! That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games! --- platform/uwp/joystick_uwp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'platform/uwp/joystick_uwp.h') diff --git a/platform/uwp/joystick_uwp.h b/platform/uwp/joystick_uwp.h index 47ec738a18..f854f0b471 100644 --- a/platform/uwp/joystick_uwp.h +++ b/platform/uwp/joystick_uwp.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2017 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 */ -- cgit v1.2.3