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/os_uwp.cpp | 23 | ||||
-rw-r--r-- | platform/uwp/os_uwp.h | 10 |
5 files changed, 22 insertions, 30 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/os_uwp.cpp b/platform/uwp/os_uwp.cpp index 6ac5b55156..1114f5359a 100644 --- a/platform/uwp/os_uwp.cpp +++ b/platform/uwp/os_uwp.cpp @@ -28,14 +28,12 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -// Must include Winsock before windows.h (included by os_uwp.h) -#include "drivers/unix/net_socket_posix.h" - #include "os_uwp.h" #include "core/config/project_settings.h" #include "core/io/marshalls.h" #include "drivers/unix/ip_unix.h" +#include "drivers/unix/net_socket_posix.h" #include "drivers/windows/dir_access_windows.h" #include "drivers/windows/file_access_windows.h" #include "drivers/windows/mutex_windows.h" @@ -163,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; @@ -177,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; } @@ -321,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 @@ -443,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; @@ -459,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 c9b2600c8e..74a9e96b2c 100644 --- a/platform/uwp/os_uwp.h +++ b/platform/uwp/os_uwp.h @@ -45,6 +45,7 @@ #include <fcntl.h> #include <io.h> #include <stdio.h> +#define WIN32_LEAN_AND_MEAN #include <windows.h> class OS_UWP : public OS { @@ -116,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; @@ -189,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; |