diff options
Diffstat (limited to 'platform/uwp')
-rw-r--r-- | platform/uwp/SCsub | 3 | ||||
-rw-r--r-- | platform/uwp/app.cpp | 18 | ||||
-rw-r--r-- | platform/uwp/export/export.cpp | 2 | ||||
-rw-r--r-- | platform/uwp/gl_context_egl.cpp | 14 | ||||
-rw-r--r-- | platform/uwp/joypad_uwp.cpp | 6 | ||||
-rw-r--r-- | platform/uwp/os_uwp.cpp | 9 | ||||
-rw-r--r-- | platform/uwp/power_uwp.cpp | 6 |
7 files changed, 30 insertions, 28 deletions
diff --git a/platform/uwp/SCsub b/platform/uwp/SCsub index f0d69fef33..fb0c4a92ae 100644 --- a/platform/uwp/SCsub +++ b/platform/uwp/SCsub @@ -4,9 +4,6 @@ Import('env') files = [ 'thread_uwp.cpp', - '#platform/windows/tcp_server_winsock.cpp', - '#platform/windows/packet_peer_udp_winsock.cpp', - '#platform/windows/stream_peer_winsock.cpp', '#platform/windows/key_mapping_win.cpp', '#platform/windows/windows_terminal_logger.cpp', 'joypad_uwp.cpp', diff --git a/platform/uwp/app.cpp b/platform/uwp/app.cpp index c565999d82..b47b99744e 100644 --- a/platform/uwp/app.cpp +++ b/platform/uwp/app.cpp @@ -77,15 +77,15 @@ public: return 0; } -App::App() - : mWindowClosed(false), - mWindowVisible(true), - mWindowWidth(0), - mWindowHeight(0), - mEglDisplay(EGL_NO_DISPLAY), - mEglContext(EGL_NO_CONTEXT), - mEglSurface(EGL_NO_SURFACE), - number_of_contacts(0) { +App::App() : + mWindowClosed(false), + mWindowVisible(true), + mWindowWidth(0), + mWindowHeight(0), + mEglDisplay(EGL_NO_DISPLAY), + mEglContext(EGL_NO_CONTEXT), + mEglSurface(EGL_NO_SURFACE), + number_of_contacts(0) { } // The first method called when the IFrameworkView is being created. diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp index 7f86b4ae53..45ca097de5 100644 --- a/platform/uwp/export/export.cpp +++ b/platform/uwp/export/export.cpp @@ -1013,7 +1013,7 @@ public: return "UWP"; } - virtual String get_binary_extension() const { + virtual String get_binary_extension(const Ref<EditorExportPreset> &p_preset) const { return "appx"; } diff --git a/platform/uwp/gl_context_egl.cpp b/platform/uwp/gl_context_egl.cpp index dafe5d5e25..2130af6d60 100644 --- a/platform/uwp/gl_context_egl.cpp +++ b/platform/uwp/gl_context_egl.cpp @@ -108,7 +108,8 @@ Error ContextEGL::initialize() { EGL_NONE,*/ // These are the default display attributes, used to request ANGLE's D3D11 renderer. // eglInitialize will only succeed with these attributes if the hardware supports D3D11 Feature Level 10_0+. - EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, + EGL_PLATFORM_ANGLE_TYPE_ANGLE, + EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, // EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER is an optimization that can have large performance benefits on mobile devices. // Its syntax is subject to change, though. Please update your Visual Studio templates if you experience compilation issues with it. @@ -117,7 +118,8 @@ Error ContextEGL::initialize() { // EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE is an option that enables ANGLE to automatically call // the IDXGIDevice3::Trim method on behalf of the application when it gets suspended. // Calling IDXGIDevice3::Trim when an application is suspended is a Windows Store application certification requirement. - EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, EGL_TRUE, + EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, + EGL_TRUE, EGL_NONE, }; @@ -190,10 +192,10 @@ void ContextEGL::cleanup() { } }; -ContextEGL::ContextEGL(CoreWindow ^ p_window) - : mEglDisplay(EGL_NO_DISPLAY), - mEglContext(EGL_NO_CONTEXT), - mEglSurface(EGL_NO_SURFACE) { +ContextEGL::ContextEGL(CoreWindow ^ p_window) : + mEglDisplay(EGL_NO_DISPLAY), + mEglContext(EGL_NO_CONTEXT), + mEglSurface(EGL_NO_SURFACE) { window = p_window; }; diff --git a/platform/uwp/joypad_uwp.cpp b/platform/uwp/joypad_uwp.cpp index 0f84bd55a3..088d232e04 100644 --- a/platform/uwp/joypad_uwp.cpp +++ b/platform/uwp/joypad_uwp.cpp @@ -54,7 +54,7 @@ void JoypadUWP::process_controllers() { case ControllerType::GAMEPAD_CONTROLLER: { - GamepadReading reading = ((Gamepad ^)joy.controller_reference)->GetCurrentReading(); + GamepadReading reading = ((Gamepad ^) joy.controller_reference)->GetCurrentReading(); int button_mask = (int)GamepadButtons::Menu; for (int j = 0; j < 14; j++) { @@ -161,7 +161,7 @@ void JoypadUWP::joypad_vibration_start(int p_device, float p_weak_magnitude, flo GamepadVibration vibration; vibration.LeftMotor = p_strong_magnitude; vibration.RightMotor = p_weak_magnitude; - ((Gamepad ^)joy.controller_reference)->Vibration = vibration; + ((Gamepad ^) joy.controller_reference)->Vibration = vibration; joy.ff_timestamp = p_timestamp; joy.ff_end_timestamp = p_duration == 0 ? 0 : p_timestamp + (uint64_t)(p_duration * 1000000.0); @@ -175,7 +175,7 @@ void JoypadUWP::joypad_vibration_stop(int p_device, uint64_t p_timestamp) { GamepadVibration vibration; vibration.LeftMotor = 0.0; vibration.RightMotor = 0.0; - ((Gamepad ^)joy.controller_reference)->Vibration = vibration; + ((Gamepad ^) joy.controller_reference)->Vibration = vibration; joy.ff_timestamp = p_timestamp; joy.vibrating = false; diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp index 1655caf04b..3018ac0bef 100644 --- a/platform/uwp/os_uwp.cpp +++ b/platform/uwp/os_uwp.cpp @@ -34,13 +34,13 @@ #include "drivers/windows/dir_access_windows.h" #include "drivers/windows/file_access_windows.h" #include "drivers/windows/mutex_windows.h" +#include "drivers/windows/packet_peer_udp_winsock.h" #include "drivers/windows/rw_lock_windows.h" #include "drivers/windows/semaphore_windows.h" +#include "drivers/windows/stream_peer_tcp_winsock.h" +#include "drivers/windows/tcp_server_winsock.h" #include "io/marshalls.h" #include "main/main.h" -#include "platform/windows/packet_peer_udp_winsock.h" -#include "platform/windows/stream_peer_winsock.h" -#include "platform/windows/tcp_server_winsock.h" #include "platform/windows/windows_terminal_logger.h" #include "project_settings.h" #include "servers/audio_server.h" @@ -163,7 +163,7 @@ void OSUWP::initialize_core() { DirAccess::make_default<DirAccessWindows>(DirAccess::ACCESS_FILESYSTEM); TCPServerWinsock::make_default(); - StreamPeerWinsock::make_default(); + StreamPeerTCPWinsock::make_default(); PacketPeerUDPWinsock::make_default(); // We need to know how often the clock is updated @@ -241,6 +241,7 @@ void OSUWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_aud RasterizerGLES3::register_config(); RasterizerGLES3::make_current(); + gl_context->set_use_vsync(vm.use_vsync); visual_server = memnew(VisualServerRaster); // FIXME: Reimplement threaded rendering? Or remove? diff --git a/platform/uwp/power_uwp.cpp b/platform/uwp/power_uwp.cpp index 81e97b1391..14fce8b133 100644 --- a/platform/uwp/power_uwp.cpp +++ b/platform/uwp/power_uwp.cpp @@ -30,8 +30,10 @@ #include "power_uwp.h" -PowerUWP::PowerUWP() - : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) { +PowerUWP::PowerUWP() : + nsecs_left(-1), + percent_left(-1), + power_state(OS::POWERSTATE_UNKNOWN) { } PowerUWP::~PowerUWP() { |