diff options
Diffstat (limited to 'platform/uwp')
-rw-r--r-- | platform/uwp/app_uwp.cpp | 3 | ||||
-rw-r--r-- | platform/uwp/detect.py | 2 | ||||
-rw-r--r-- | platform/uwp/export/export_plugin.h | 14 | ||||
-rw-r--r-- | platform/uwp/joypad_uwp.cpp | 12 | ||||
-rw-r--r-- | platform/uwp/os_uwp.cpp | 19 | ||||
-rw-r--r-- | platform/uwp/os_uwp.h | 13 |
6 files changed, 28 insertions, 35 deletions
diff --git a/platform/uwp/app_uwp.cpp b/platform/uwp/app_uwp.cpp index 50e33e6c49..9e6ad7a63e 100644 --- a/platform/uwp/app_uwp.cpp +++ b/platform/uwp/app_uwp.cpp @@ -121,8 +121,7 @@ void App::SetWindow(CoreWindow ^ p_window) { window->PointerWheelChanged += ref new TypedEventHandler<CoreWindow ^, PointerEventArgs ^>(this, &App::OnPointerWheelChanged); - mouseChangedNotifier = SignalNotifier::AttachToEvent(L"os_mouse_mode_changed", ref new SignalHandler( - this, &App::OnMouseModeChanged)); + mouseChangedNotifier = SignalNotifier::AttachToEvent(L"os_mouse_mode_changed", ref new SignalHandler(this, &App::OnMouseModeChanged)); mouseChangedNotifier->Enable(); diff --git a/platform/uwp/detect.py b/platform/uwp/detect.py index 28922a4f59..9c91378b22 100644 --- a/platform/uwp/detect.py +++ b/platform/uwp/detect.py @@ -64,14 +64,12 @@ def configure(env): env.Append(CCFLAGS=["/MD"]) env.Append(LINKFLAGS=["/SUBSYSTEM:CONSOLE"]) env.AppendUnique(CPPDEFINES=["WINDOWS_SUBSYSTEM_CONSOLE"]) - env.Append(CPPDEFINES=["DEBUG_ENABLED"]) if env["optimize"] != "none": env.Append(CCFLAGS=["/O2", "/Zi"]) elif env["target"] == "debug": env.Append(CCFLAGS=["/Zi"]) env.Append(CCFLAGS=["/MDd"]) - env.Append(CPPDEFINES=["DEBUG_ENABLED"]) env.Append(LINKFLAGS=["/SUBSYSTEM:CONSOLE"]) env.AppendUnique(CPPDEFINES=["WINDOWS_SUBSYSTEM_CONSOLE"]) env.Append(LINKFLAGS=["/DEBUG"]) diff --git a/platform/uwp/export/export_plugin.h b/platform/uwp/export/export_plugin.h index f295789254..acdd85e888 100644 --- a/platform/uwp/export/export_plugin.h +++ b/platform/uwp/export/export_plugin.h @@ -367,15 +367,15 @@ class EditorExportPlatformUWP : public EditorExportPlatform { static bool _should_compress_asset(const String &p_path, const Vector<uint8_t> &p_data) { /* TODO: This was copied verbatim from Android export. It should be - * refactored to the parent class and also be used for .zip export. - */ + * refactored to the parent class and also be used for .zip export. + */ /* - * By not compressing files with little or not benefit in doing so, - * a performance gain is expected at runtime. Moreover, if the APK is - * zip-aligned, assets stored as they are can be efficiently read by - * Android by memory-mapping them. - */ + * By not compressing files with little or not benefit in doing so, + * a performance gain is expected at runtime. Moreover, if the APK is + * zip-aligned, assets stored as they are can be efficiently read by + * Android by memory-mapping them. + */ // -- Unconditional uncompress to mimic AAPT plus some other diff --git a/platform/uwp/joypad_uwp.cpp b/platform/uwp/joypad_uwp.cpp index b419fb4fae..f8eb4fc96d 100644 --- a/platform/uwp/joypad_uwp.cpp +++ b/platform/uwp/joypad_uwp.cpp @@ -58,12 +58,12 @@ void JoypadUWP::process_controllers() { button_mask *= 2; } - input->joy_axis(joy.id, JOY_AXIS_LEFT_X, axis_correct(reading.LeftThumbstickX)); - input->joy_axis(joy.id, JOY_AXIS_LEFT_Y, axis_correct(reading.LeftThumbstickY, true)); - input->joy_axis(joy.id, JOY_AXIS_RIGHT_X, axis_correct(reading.RightThumbstickX)); - input->joy_axis(joy.id, JOY_AXIS_RIGHT_Y, axis_correct(reading.RightThumbstickY, true)); - input->joy_axis(joy.id, JOY_AXIS_TRIGGER_LEFT, axis_correct(reading.LeftTrigger, false, true)); - input->joy_axis(joy.id, JOY_AXIS_TRIGGER_RIGHT, axis_correct(reading.RightTrigger, false, true)); + input->joy_axis(joy.id, JoyAxis::LEFT_X, axis_correct(reading.LeftThumbstickX)); + input->joy_axis(joy.id, JoyAxis::LEFT_Y, axis_correct(reading.LeftThumbstickY, true)); + input->joy_axis(joy.id, JoyAxis::RIGHT_X, axis_correct(reading.RightThumbstickX)); + input->joy_axis(joy.id, JoyAxis::RIGHT_Y, axis_correct(reading.RightThumbstickY, true)); + input->joy_axis(joy.id, JoyAxis::TRIGGER_LEFT, axis_correct(reading.LeftTrigger, false, true)); + input->joy_axis(joy.id, JoyAxis::TRIGGER_RIGHT, axis_correct(reading.RightTrigger, false, true)); uint64_t timestamp = input->get_joy_vibration_timestamp(joy.id); if (timestamp > joy.ff_timestamp) { diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp index daf3c14f3b..1114f5359a 100644 --- a/platform/uwp/os_uwp.cpp +++ b/platform/uwp/os_uwp.cpp @@ -161,7 +161,7 @@ Error OS_UWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_a outside = true; // FIXME: Hardcoded for now, add Vulkan support. - p_video_driver = VIDEO_DRIVER_GLES2; + p_video_driver = VIDEO_DRIVER_OPENGL; ContextEGL_UWP::Driver opengl_api_type = ContextEGL_UWP::GLES_2_0; bool gl_initialization_error = false; @@ -175,9 +175,9 @@ Error OS_UWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_a } if (opengl_api_type == ContextEGL_UWP::GLES_2_0) { - if (RasterizerGLES2::is_viable() == OK) { - RasterizerGLES2::register_config(); - RasterizerGLES2::make_current(); + if (RasterizerGLES3::is_viable() == OK) { + RasterizerGLES3::register_config(); + RasterizerGLES3::make_current(); } else { gl_initialization_error = true; } @@ -319,7 +319,7 @@ void OS_UWP::finalize() { rendering_server->finish(); memdelete(rendering_server); -#ifdef OPENGL_ENABLED +#ifdef GLES3_ENABLED if (gl_context) memdelete(gl_context); #endif @@ -441,12 +441,13 @@ String OS_UWP::get_name() const { return "UWP"; } -OS::Date OS_UWP::get_date(bool utc) const { +OS::Date OS_UWP::get_date(bool p_utc) const { SYSTEMTIME systemtime; - if (utc) + if (utc) { GetSystemTime(&systemtime); - else + } else { GetLocalTime(&systemtime); + } Date date; date.day = systemtime.wDay; @@ -457,7 +458,7 @@ OS::Date OS_UWP::get_date(bool utc) const { return date; } -OS::Time OS_UWP::get_time(bool utc) const { +OS::Time OS_UWP::get_time(bool p_utc) const { SYSTEMTIME systemtime; if (utc) GetSystemTime(&systemtime); diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h index 7945f409a1..0b4d6b73b6 100644 --- a/platform/uwp/os_uwp.h +++ b/platform/uwp/os_uwp.h @@ -59,7 +59,7 @@ public: bool alt = false, shift = false, control = false; MessageType type = KEY_EVENT_MESSAGE; bool pressed = false; - Key keycode = KEY_NONE; + Key keycode = Key::NONE; unsigned int physical_keycode = 0; unsigned int unicode = 0; bool echo = false; @@ -107,7 +107,7 @@ private: bool control_mem; bool meta_mem; bool force_quit; - MouseButton last_button_state = MOUSE_BUTTON_NONE; + MouseButton last_button_state = MouseButton::NONE; CursorShape cursor_shape; @@ -117,11 +117,6 @@ private: Windows::System::Display::DisplayRequest ^ display_request; - void _post_dpad(DWORD p_dpad, int p_device, bool p_pressed); - - void _drag_event(int idx, UINT uMsg, WPARAM wParam, LPARAM lParam); - void _touch_event(int idx, UINT uMsg, WPARAM wParam, LPARAM lParam); - ref class ManagedType { public: property bool alert_close_handle; @@ -190,8 +185,8 @@ public: virtual String get_name() const; - virtual Date get_date(bool utc) const; - virtual Time get_time(bool utc) const; + virtual Date get_date(bool p_utc) const; + virtual Time get_time(bool p_utc) const; virtual TimeZoneInfo get_time_zone_info() const; virtual uint64_t get_unix_time() const; |