You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Rename remaining WinRT references to UWP
This commit is contained in:
@@ -23878,7 +23878,7 @@
|
|||||||
<return type="String">
|
<return type="String">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
Return the name of the host OS. Possible values are: "Android", "BlackBerry 10", "Flash", "Haiku", "iOS", "HTML5", "OSX", "Server", "Windows", "WinRT", "X11"
|
Return the name of the host OS. Possible values are: "Android", "BlackBerry 10", "Flash", "Haiku", "iOS", "HTML5", "OSX", "Server", "Windows", "UWP", "X11"
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_process_ID" qualifiers="const">
|
<method name="get_process_ID" qualifiers="const">
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ void FileAccessWindows::close() {
|
|||||||
bool rename_error;
|
bool rename_error;
|
||||||
|
|
||||||
#ifdef UWP_ENABLED
|
#ifdef UWP_ENABLED
|
||||||
// WinRT has no PathFileExists, so we check attributes instead
|
// UWP has no PathFileExists, so we check attributes instead
|
||||||
DWORD fileAttr;
|
DWORD fileAttr;
|
||||||
|
|
||||||
fileAttr = GetFileAttributesW(save_path.c_str());
|
fileAttr = GetFileAttributesW(save_path.c_str());
|
||||||
|
|||||||
@@ -740,7 +740,7 @@ static const char *s_ControllerMappings [] =
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef UWP_ENABLED
|
#ifdef UWP_ENABLED
|
||||||
"__WINRT_GAMEPAD__,Xbox Controller,a:b2,b:b3,x:b4,y:b5,start:b0,back:b1,leftstick:b12,rightstick:b13,leftshoulder:b10,rightshoulder:b11,dpup:b6,dpdown:b7,dpleft:b8,dpright:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,",
|
"__UWP_GAMEPAD__,Xbox Controller,a:b2,b:b3,x:b4,y:b5,start:b0,back:b1,leftstick:b12,rightstick:b13,leftshoulder:b10,rightshoulder:b11,dpup:b6,dpdown:b7,dpleft:b8,dpright:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,",
|
||||||
#endif
|
#endif
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ if (env['builtin_freetype'] != 'no'):
|
|||||||
]
|
]
|
||||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||||
|
|
||||||
# Include header for WinRT to fix build issues
|
# Include header for UWP to fix build issues
|
||||||
if "platform" in env and env["platform"] == "uwp":
|
if "platform" in env and env["platform"] == "uwp":
|
||||||
env.Append(CCFLAGS=['/FI', '"modules/freetype/uwpdef.h"'])
|
env.Append(CCFLAGS=['/FI', '"modules/freetype/uwpdef.h"'])
|
||||||
|
|
||||||
|
|||||||
@@ -679,7 +679,7 @@ if (env['builtin_openssl'] != 'no'):
|
|||||||
env_openssl.add_source_files(env.modules_sources, "*.cpp")
|
env_openssl.add_source_files(env.modules_sources, "*.cpp")
|
||||||
env_openssl.add_source_files(env.modules_sources, "*.c")
|
env_openssl.add_source_files(env.modules_sources, "*.c")
|
||||||
|
|
||||||
# platform/winrt need to know openssl is available, pass to main env
|
# platform/uwp need to know openssl is available, pass to main env
|
||||||
if "platform" in env and env["platform"] == "uwp":
|
if "platform" in env and env["platform"] == "uwp":
|
||||||
env.Append(CPPPATH=[thirdparty_dir])
|
env.Append(CPPPATH=[thirdparty_dir])
|
||||||
env.Append(CPPFLAGS=['-DOPENSSL_ENABLED'])
|
env.Append(CPPFLAGS=['-DOPENSSL_ENABLED'])
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ using namespace Windows::System;
|
|||||||
using namespace Windows::System::Threading::Core;
|
using namespace Windows::System::Threading::Core;
|
||||||
using namespace Microsoft::WRL;
|
using namespace Microsoft::WRL;
|
||||||
|
|
||||||
using namespace GodotWinRT;
|
using namespace GodotUWP;
|
||||||
|
|
||||||
// Helper to convert a length in device-independent pixels (DIPs) to a length in physical pixels.
|
// Helper to convert a length in device-independent pixels (DIPs) to a length in physical pixels.
|
||||||
inline float ConvertDipsToPixels(float dips, float dpi)
|
inline float ConvertDipsToPixels(float dips, float dpi)
|
||||||
@@ -63,7 +63,7 @@ inline float ConvertDipsToPixels(float dips, float dpi)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Implementation of the IFrameworkViewSource interface, necessary to run our app.
|
// Implementation of the IFrameworkViewSource interface, necessary to run our app.
|
||||||
ref class GodotWinrtViewSource sealed : Windows::ApplicationModel::Core::IFrameworkViewSource
|
ref class GodotUWPViewSource sealed : Windows::ApplicationModel::Core::IFrameworkViewSource
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual Windows::ApplicationModel::Core::IFrameworkView^ CreateView()
|
virtual Windows::ApplicationModel::Core::IFrameworkView^ CreateView()
|
||||||
@@ -76,7 +76,7 @@ public:
|
|||||||
[Platform::MTAThread]
|
[Platform::MTAThread]
|
||||||
int main(Platform::Array<Platform::String^>^)
|
int main(Platform::Array<Platform::String^>^)
|
||||||
{
|
{
|
||||||
auto godotApplicationSource = ref new GodotWinrtViewSource();
|
auto godotApplicationSource = ref new GodotUWPViewSource();
|
||||||
CoreApplication::Run(godotApplicationSource);
|
CoreApplication::Run(godotApplicationSource);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -105,7 +105,7 @@ void App::Initialize(CoreApplicationView^ applicationView)
|
|||||||
// Information about the Suspending and Resuming event handlers can be found here:
|
// Information about the Suspending and Resuming event handlers can be found here:
|
||||||
// http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh994930.aspx
|
// http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh994930.aspx
|
||||||
|
|
||||||
os = new OSWinrt;
|
os = new OSUWP;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ void App::SetWindow(CoreWindow^ p_window)
|
|||||||
unsigned int argc;
|
unsigned int argc;
|
||||||
char** argv = get_command_line(&argc);
|
char** argv = get_command_line(&argc);
|
||||||
|
|
||||||
Main::setup("winrt", argc, argv, false);
|
Main::setup("uwp", argc, argv, false);
|
||||||
|
|
||||||
// The CoreWindow has been created, so EGL can be initialized.
|
// The CoreWindow has been created, so EGL can be initialized.
|
||||||
ContextEGL* context = memnew(ContextEGL(window));
|
ContextEGL* context = memnew(ContextEGL(window));
|
||||||
@@ -431,7 +431,7 @@ void App::OnMouseMoved(MouseDevice ^ mouse_device, MouseEventArgs ^ args) {
|
|||||||
void App::key_event(Windows::UI::Core::CoreWindow^ sender, bool p_pressed, Windows::UI::Core::KeyEventArgs^ key_args, Windows::UI::Core::CharacterReceivedEventArgs^ char_args)
|
void App::key_event(Windows::UI::Core::CoreWindow^ sender, bool p_pressed, Windows::UI::Core::KeyEventArgs^ key_args, Windows::UI::Core::CharacterReceivedEventArgs^ char_args)
|
||||||
{
|
{
|
||||||
|
|
||||||
OSWinrt::KeyEvent ke;
|
OSUWP::KeyEvent ke;
|
||||||
|
|
||||||
InputModifierState mod;
|
InputModifierState mod;
|
||||||
mod.meta = false;
|
mod.meta = false;
|
||||||
@@ -445,14 +445,14 @@ void App::key_event(Windows::UI::Core::CoreWindow^ sender, bool p_pressed, Windo
|
|||||||
|
|
||||||
if (key_args != nullptr) {
|
if (key_args != nullptr) {
|
||||||
|
|
||||||
ke.type = OSWinrt::KeyEvent::MessageType::KEY_EVENT_MESSAGE;
|
ke.type = OSUWP::KeyEvent::MessageType::KEY_EVENT_MESSAGE;
|
||||||
ke.unicode = 0;
|
ke.unicode = 0;
|
||||||
ke.scancode = KeyMappingWindows::get_keysym((unsigned int)key_args->VirtualKey);
|
ke.scancode = KeyMappingWindows::get_keysym((unsigned int)key_args->VirtualKey);
|
||||||
ke.echo = (!p_pressed && !key_args->KeyStatus.IsKeyReleased) || (p_pressed && key_args->KeyStatus.WasKeyDown);
|
ke.echo = (!p_pressed && !key_args->KeyStatus.IsKeyReleased) || (p_pressed && key_args->KeyStatus.WasKeyDown);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
ke.type = OSWinrt::KeyEvent::MessageType::CHAR_EVENT_MESSAGE;
|
ke.type = OSUWP::KeyEvent::MessageType::CHAR_EVENT_MESSAGE;
|
||||||
ke.unicode = char_args->KeyCode;
|
ke.unicode = char_args->KeyCode;
|
||||||
ke.scancode = 0;
|
ke.scancode = 0;
|
||||||
ke.echo = (!p_pressed && !char_args->KeyStatus.IsKeyReleased) || (p_pressed && char_args->KeyStatus.WasKeyDown);
|
ke.echo = (!p_pressed && !char_args->KeyStatus.IsKeyReleased) || (p_pressed && char_args->KeyStatus.WasKeyDown);
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
#include "os_uwp.h"
|
#include "os_uwp.h"
|
||||||
#include "GLES2/gl2.h"
|
#include "GLES2/gl2.h"
|
||||||
|
|
||||||
namespace GodotWinRT
|
namespace GodotUWP
|
||||||
{
|
{
|
||||||
ref class App sealed : public Windows::ApplicationModel::Core::IFrameworkView
|
ref class App sealed : public Windows::ApplicationModel::Core::IFrameworkView
|
||||||
{
|
{
|
||||||
@@ -97,7 +97,7 @@ namespace GodotWinRT
|
|||||||
EGLSurface mEglSurface;
|
EGLSurface mEglSurface;
|
||||||
|
|
||||||
CoreWindow^ window;
|
CoreWindow^ window;
|
||||||
OSWinrt* os;
|
OSUWP* os;
|
||||||
|
|
||||||
int last_touch_x[32]; // 20 fingers, index 31 reserved for the mouse
|
int last_touch_x[32]; // 20 fingers, index 31 reserved for the mouse
|
||||||
int last_touch_y[32];
|
int last_touch_y[32];
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ def is_active():
|
|||||||
|
|
||||||
|
|
||||||
def get_name():
|
def get_name():
|
||||||
return "WinRT"
|
return "UWP"
|
||||||
|
|
||||||
|
|
||||||
def can_build():
|
def can_build():
|
||||||
|
|||||||
@@ -432,9 +432,9 @@ public:
|
|||||||
~AppxPackager();
|
~AppxPackager();
|
||||||
};
|
};
|
||||||
|
|
||||||
class EditorExportPlatformWinrt : public EditorExportPlatform {
|
class EditorExportPlatformUWP : public EditorExportPlatform {
|
||||||
|
|
||||||
OBJ_TYPE(EditorExportPlatformWinrt, EditorExportPlatform);
|
OBJ_TYPE(EditorExportPlatformUWP, EditorExportPlatform);
|
||||||
|
|
||||||
Ref<ImageTexture> logo;
|
Ref<ImageTexture> logo;
|
||||||
|
|
||||||
@@ -528,8 +528,8 @@ public:
|
|||||||
|
|
||||||
virtual Error export_project(const String& p_path, bool p_debug, int p_flags = 0);
|
virtual Error export_project(const String& p_path, bool p_debug, int p_flags = 0);
|
||||||
|
|
||||||
EditorExportPlatformWinrt();
|
EditorExportPlatformUWP();
|
||||||
~EditorExportPlatformWinrt();
|
~EditorExportPlatformUWP();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -1452,7 +1452,7 @@ Error AppxPackager::sign(const CertFile & p_cert, const AppxDigests & digests, P
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
bool EditorExportPlatformWinrt::_valid_resource_name(const String &p_name) const {
|
bool EditorExportPlatformUWP::_valid_resource_name(const String &p_name) const {
|
||||||
|
|
||||||
if (p_name.empty()) return false;
|
if (p_name.empty()) return false;
|
||||||
if (p_name.ends_with(".")) return false;
|
if (p_name.ends_with(".")) return false;
|
||||||
@@ -1472,7 +1472,7 @@ bool EditorExportPlatformWinrt::_valid_resource_name(const String &p_name) const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EditorExportPlatformWinrt::_valid_guid(const String & p_guid) const {
|
bool EditorExportPlatformUWP::_valid_guid(const String & p_guid) const {
|
||||||
|
|
||||||
Vector<String> parts = p_guid.split("-");
|
Vector<String> parts = p_guid.split("-");
|
||||||
|
|
||||||
@@ -1485,7 +1485,7 @@ bool EditorExportPlatformWinrt::_valid_guid(const String & p_guid) const {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EditorExportPlatformWinrt::_valid_bgcolor(const String & p_color) const {
|
bool EditorExportPlatformUWP::_valid_bgcolor(const String & p_color) const {
|
||||||
|
|
||||||
if (p_color.empty()) return true;
|
if (p_color.empty()) return true;
|
||||||
if (p_color.begins_with("#") && p_color.is_valid_html_color()) return true;
|
if (p_color.begins_with("#") && p_color.is_valid_html_color()) return true;
|
||||||
@@ -1529,7 +1529,7 @@ bool EditorExportPlatformWinrt::_valid_bgcolor(const String & p_color) const {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EditorExportPlatformWinrt::_valid_image(const Ref<ImageTexture> p_image, int p_width, int p_height) const {
|
bool EditorExportPlatformUWP::_valid_image(const Ref<ImageTexture> p_image, int p_width, int p_height) const {
|
||||||
|
|
||||||
if (!p_image.is_valid()) return false;
|
if (!p_image.is_valid()) return false;
|
||||||
|
|
||||||
@@ -1553,7 +1553,7 @@ bool EditorExportPlatformWinrt::_valid_image(const Ref<ImageTexture> p_image, in
|
|||||||
return valid_w && valid_h;
|
return valid_w && valid_h;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector<uint8_t> EditorExportPlatformWinrt::_fix_manifest(const Vector<uint8_t> &p_template, bool p_give_internet) const {
|
Vector<uint8_t> EditorExportPlatformUWP::_fix_manifest(const Vector<uint8_t> &p_template, bool p_give_internet) const {
|
||||||
|
|
||||||
String result = String::utf8((const char*)p_template.ptr(), p_template.size());
|
String result = String::utf8((const char*)p_template.ptr(), p_template.size());
|
||||||
|
|
||||||
@@ -1659,7 +1659,7 @@ Vector<uint8_t> EditorExportPlatformWinrt::_fix_manifest(const Vector<uint8_t> &
|
|||||||
return r_ret;
|
return r_ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector<uint8_t> EditorExportPlatformWinrt::_get_image_data(const String & p_path) {
|
Vector<uint8_t> EditorExportPlatformUWP::_get_image_data(const String & p_path) {
|
||||||
|
|
||||||
Vector<uint8_t> data;
|
Vector<uint8_t> data;
|
||||||
Ref<ImageTexture> ref;
|
Ref<ImageTexture> ref;
|
||||||
@@ -1741,7 +1741,7 @@ Vector<uint8_t> EditorExportPlatformWinrt::_get_image_data(const String & p_path
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
Error EditorExportPlatformWinrt::save_appx_file(void * p_userdata, const String & p_path, const Vector<uint8_t>& p_data, int p_file, int p_total) {
|
Error EditorExportPlatformUWP::save_appx_file(void * p_userdata, const String & p_path, const Vector<uint8_t>& p_data, int p_file, int p_total) {
|
||||||
|
|
||||||
AppxPackager *packager = (AppxPackager*)p_userdata;
|
AppxPackager *packager = (AppxPackager*)p_userdata;
|
||||||
String dst_path = p_path.replace_first("res://", "game/");
|
String dst_path = p_path.replace_first("res://", "game/");
|
||||||
@@ -1751,7 +1751,7 @@ Error EditorExportPlatformWinrt::save_appx_file(void * p_userdata, const String
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EditorExportPlatformWinrt::_should_compress_asset(const String & p_path, const Vector<uint8_t>& p_data) {
|
bool EditorExportPlatformUWP::_should_compress_asset(const String & p_path, const Vector<uint8_t>& p_data) {
|
||||||
|
|
||||||
/* TODO: This was copied verbatim from Android export. It should be
|
/* 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.
|
||||||
@@ -1800,7 +1800,7 @@ bool EditorExportPlatformWinrt::_should_compress_asset(const String & p_path, co
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EditorExportPlatformWinrt::_set(const StringName& p_name, const Variant& p_value) {
|
bool EditorExportPlatformUWP::_set(const StringName& p_name, const Variant& p_value) {
|
||||||
|
|
||||||
String n = p_name;
|
String n = p_name;
|
||||||
|
|
||||||
@@ -1906,7 +1906,7 @@ bool EditorExportPlatformWinrt::_set(const StringName& p_name, const Variant& p_
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EditorExportPlatformWinrt::_get(const StringName& p_name, Variant &r_ret) const {
|
bool EditorExportPlatformUWP::_get(const StringName& p_name, Variant &r_ret) const {
|
||||||
|
|
||||||
String n = p_name;
|
String n = p_name;
|
||||||
|
|
||||||
@@ -2002,7 +2002,7 @@ bool EditorExportPlatformWinrt::_get(const StringName& p_name, Variant &r_ret) c
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorExportPlatformWinrt::_get_property_list(List<PropertyInfo>* p_list) const {
|
void EditorExportPlatformUWP::_get_property_list(List<PropertyInfo>* p_list) const {
|
||||||
|
|
||||||
p_list->push_back(PropertyInfo(Variant::STRING, "custom_package/debug", PROPERTY_HINT_GLOBAL_FILE, "appx"));
|
p_list->push_back(PropertyInfo(Variant::STRING, "custom_package/debug", PROPERTY_HINT_GLOBAL_FILE, "appx"));
|
||||||
p_list->push_back(PropertyInfo(Variant::STRING, "custom_package/release", PROPERTY_HINT_GLOBAL_FILE, "appx"));
|
p_list->push_back(PropertyInfo(Variant::STRING, "custom_package/release", PROPERTY_HINT_GLOBAL_FILE, "appx"));
|
||||||
@@ -2071,14 +2071,14 @@ void EditorExportPlatformWinrt::_get_property_list(List<PropertyInfo>* p_list) c
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EditorExportPlatformWinrt::can_export(String * r_error) const {
|
bool EditorExportPlatformUWP::can_export(String * r_error) const {
|
||||||
|
|
||||||
String err;
|
String err;
|
||||||
bool valid = true;
|
bool valid = true;
|
||||||
|
|
||||||
if (!exists_export_template("winrt_x86_debug.zip") || !exists_export_template("winrt_x86_release.zip")
|
if (!exists_export_template("uwp_x86_debug.zip") || !exists_export_template("uwp_x86_release.zip")
|
||||||
|| !exists_export_template("winrt_arm_debug.zip") || !exists_export_template("winrt_arm_release.zip")
|
|| !exists_export_template("uwp_arm_debug.zip") || !exists_export_template("uwp_arm_release.zip")
|
||||||
|| !exists_export_template("winrt_x64_debug.zip") || !exists_export_template("winrt_x64_release.zip")) {
|
|| !exists_export_template("uwp_x64_debug.zip") || !exists_export_template("uwp_x64_release.zip")) {
|
||||||
valid = false;
|
valid = false;
|
||||||
err += TTR("No export templates found.\nDownload and install export templates.") + "\n";
|
err += TTR("No export templates found.\nDownload and install export templates.") + "\n";
|
||||||
}
|
}
|
||||||
@@ -2154,7 +2154,7 @@ bool EditorExportPlatformWinrt::can_export(String * r_error) const {
|
|||||||
return valid;
|
return valid;
|
||||||
}
|
}
|
||||||
|
|
||||||
Error EditorExportPlatformWinrt::export_project(const String & p_path, bool p_debug, int p_flags) {
|
Error EditorExportPlatformUWP::export_project(const String & p_path, bool p_debug, int p_flags) {
|
||||||
|
|
||||||
String src_appx;
|
String src_appx;
|
||||||
|
|
||||||
@@ -2170,30 +2170,30 @@ Error EditorExportPlatformWinrt::export_project(const String & p_path, bool p_de
|
|||||||
if (p_debug) {
|
if (p_debug) {
|
||||||
switch (arch) {
|
switch (arch) {
|
||||||
case X86: {
|
case X86: {
|
||||||
src_appx = find_export_template("winrt_x86_debug.zip", &err);
|
src_appx = find_export_template("uwp_x86_debug.zip", &err);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case X64: {
|
case X64: {
|
||||||
src_appx = find_export_template("winrt_x64_debug.zip", &err);
|
src_appx = find_export_template("uwp_x64_debug.zip", &err);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ARM: {
|
case ARM: {
|
||||||
src_appx = find_export_template("winrt_arm_debug.zip", &err);
|
src_appx = find_export_template("uwp_arm_debug.zip", &err);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch (arch) {
|
switch (arch) {
|
||||||
case X86: {
|
case X86: {
|
||||||
src_appx = find_export_template("winrt_x86_release.zip", &err);
|
src_appx = find_export_template("uwp_x86_release.zip", &err);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case X64: {
|
case X64: {
|
||||||
src_appx = find_export_template("winrt_x64_release.zip", &err);
|
src_appx = find_export_template("uwp_x64_release.zip", &err);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ARM: {
|
case ARM: {
|
||||||
src_appx = find_export_template("winrt_arm_release.zip", &err);
|
src_appx = find_export_template("uwp_arm_release.zip", &err);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2337,7 +2337,7 @@ Error EditorExportPlatformWinrt::export_project(const String & p_path, bool p_de
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
EditorExportPlatformWinrt::EditorExportPlatformWinrt() {
|
EditorExportPlatformUWP::EditorExportPlatformUWP() {
|
||||||
|
|
||||||
Image img(_uwp_logo);
|
Image img(_uwp_logo);
|
||||||
logo = Ref<ImageTexture>(memnew(ImageTexture));
|
logo = Ref<ImageTexture>(memnew(ImageTexture));
|
||||||
@@ -2381,11 +2381,11 @@ EditorExportPlatformWinrt::EditorExportPlatformWinrt() {
|
|||||||
certificate_pass = "";
|
certificate_pass = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
EditorExportPlatformWinrt::~EditorExportPlatformWinrt() {}
|
EditorExportPlatformUWP::~EditorExportPlatformUWP() {}
|
||||||
|
|
||||||
|
|
||||||
void register_uwp_exporter() {
|
void register_uwp_exporter() {
|
||||||
|
|
||||||
Ref<EditorExportPlatformWinrt> exporter = Ref<EditorExportPlatformWinrt>(memnew(EditorExportPlatformWinrt));
|
Ref<EditorExportPlatformUWP> exporter = Ref<EditorExportPlatformUWP>(memnew(EditorExportPlatformUWP));
|
||||||
EditorImportExport::get_singleton()->add_export_platform(exporter);
|
EditorImportExport::get_singleton()->add_export_platform(exporter);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,15 +32,15 @@
|
|||||||
using namespace Windows::Gaming::Input;
|
using namespace Windows::Gaming::Input;
|
||||||
using namespace Windows::Foundation;
|
using namespace Windows::Foundation;
|
||||||
|
|
||||||
void JoystickWinrt::register_events() {
|
void JoystickUWP::register_events() {
|
||||||
|
|
||||||
Gamepad::GamepadAdded +=
|
Gamepad::GamepadAdded +=
|
||||||
ref new EventHandler<Gamepad^>(this, &JoystickWinrt::OnGamepadAdded);
|
ref new EventHandler<Gamepad^>(this, &JoystickUWP::OnGamepadAdded);
|
||||||
Gamepad::GamepadRemoved +=
|
Gamepad::GamepadRemoved +=
|
||||||
ref new EventHandler<Gamepad^>(this, &JoystickWinrt::OnGamepadRemoved);
|
ref new EventHandler<Gamepad^>(this, &JoystickUWP::OnGamepadRemoved);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t JoystickWinrt::process_controllers(uint32_t p_last_id) {
|
uint32_t JoystickUWP::process_controllers(uint32_t p_last_id) {
|
||||||
|
|
||||||
for (int i = 0; i < MAX_CONTROLLERS; i++) {
|
for (int i = 0; i < MAX_CONTROLLERS; i++) {
|
||||||
|
|
||||||
@@ -74,20 +74,20 @@ uint32_t JoystickWinrt::process_controllers(uint32_t p_last_id) {
|
|||||||
return p_last_id;
|
return p_last_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
JoystickWinrt::JoystickWinrt() {
|
JoystickUWP::JoystickUWP() {
|
||||||
|
|
||||||
for (int i = 0; i < MAX_CONTROLLERS; i++)
|
for (int i = 0; i < MAX_CONTROLLERS; i++)
|
||||||
controllers[i].id = i;
|
controllers[i].id = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
JoystickWinrt::JoystickWinrt(InputDefault * p_input) {
|
JoystickUWP::JoystickUWP(InputDefault * p_input) {
|
||||||
|
|
||||||
input = p_input;
|
input = p_input;
|
||||||
|
|
||||||
JoystickWinrt();
|
JoystickUWP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void JoystickWinrt::OnGamepadAdded(Platform::Object ^ sender, Windows::Gaming::Input::Gamepad ^ value) {
|
void JoystickUWP::OnGamepadAdded(Platform::Object ^ sender, Windows::Gaming::Input::Gamepad ^ value) {
|
||||||
|
|
||||||
short idx = -1;
|
short idx = -1;
|
||||||
|
|
||||||
@@ -106,10 +106,10 @@ void JoystickWinrt::OnGamepadAdded(Platform::Object ^ sender, Windows::Gaming::I
|
|||||||
controllers[idx].id = idx;
|
controllers[idx].id = idx;
|
||||||
controllers[idx].type = ControllerType::GAMEPAD_CONTROLLER;
|
controllers[idx].type = ControllerType::GAMEPAD_CONTROLLER;
|
||||||
|
|
||||||
input->joy_connection_changed(controllers[idx].id, true, "Xbox Controller", "__WINRT_GAMEPAD__");
|
input->joy_connection_changed(controllers[idx].id, true, "Xbox Controller", "__UWP_GAMEPAD__");
|
||||||
}
|
}
|
||||||
|
|
||||||
void JoystickWinrt::OnGamepadRemoved(Platform::Object ^ sender, Windows::Gaming::Input::Gamepad ^ value) {
|
void JoystickUWP::OnGamepadRemoved(Platform::Object ^ sender, Windows::Gaming::Input::Gamepad ^ value) {
|
||||||
|
|
||||||
short idx = -1;
|
short idx = -1;
|
||||||
|
|
||||||
@@ -136,7 +136,7 @@ void JoystickWinrt::OnGamepadRemoved(Platform::Object ^ sender, Windows::Gaming:
|
|||||||
input->joy_connection_changed(idx, false, "Xbox Controller");
|
input->joy_connection_changed(idx, false, "Xbox Controller");
|
||||||
}
|
}
|
||||||
|
|
||||||
InputDefault::JoyAxis JoystickWinrt::axis_correct(double p_val, bool p_negate, bool p_trigger) const {
|
InputDefault::JoyAxis JoystickUWP::axis_correct(double p_val, bool p_negate, bool p_trigger) const {
|
||||||
|
|
||||||
InputDefault::JoyAxis jx;
|
InputDefault::JoyAxis jx;
|
||||||
|
|
||||||
|
|||||||
@@ -26,20 +26,20 @@
|
|||||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
#ifndef JOYSTICK_WINRT_H
|
#ifndef JOYSTICK_UWP_H
|
||||||
#define JOYSTICK_WINRT_H
|
#define JOYSTICK_UWP_H
|
||||||
|
|
||||||
#include "main/input_default.h"
|
#include "main/input_default.h"
|
||||||
|
|
||||||
ref class JoystickWinrt sealed {
|
ref class JoystickUWP sealed {
|
||||||
|
|
||||||
internal:
|
internal:
|
||||||
|
|
||||||
void register_events();
|
void register_events();
|
||||||
uint32_t process_controllers(uint32_t p_last_id);
|
uint32_t process_controllers(uint32_t p_last_id);
|
||||||
|
|
||||||
JoystickWinrt();
|
JoystickUWP();
|
||||||
JoystickWinrt(InputDefault* p_input);
|
JoystickUWP(InputDefault* p_input);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|||||||
@@ -69,28 +69,28 @@ using namespace Windows::ApplicationModel::DataTransfer;
|
|||||||
using namespace concurrency;
|
using namespace concurrency;
|
||||||
|
|
||||||
|
|
||||||
int OSWinrt::get_video_driver_count() const {
|
int OSUWP::get_video_driver_count() const {
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
const char * OSWinrt::get_video_driver_name(int p_driver) const {
|
const char * OSUWP::get_video_driver_name(int p_driver) const {
|
||||||
|
|
||||||
return "GLES2";
|
return "GLES2";
|
||||||
}
|
}
|
||||||
|
|
||||||
OS::VideoMode OSWinrt::get_default_video_mode() const {
|
OS::VideoMode OSUWP::get_default_video_mode() const {
|
||||||
|
|
||||||
return video_mode;
|
return video_mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
Size2 OSWinrt::get_window_size() const {
|
Size2 OSUWP::get_window_size() const {
|
||||||
Size2 size;
|
Size2 size;
|
||||||
size.width = video_mode.width;
|
size.width = video_mode.width;
|
||||||
size.height = video_mode.height;
|
size.height = video_mode.height;
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::set_window_size(const Size2 p_size) {
|
void OSUWP::set_window_size(const Size2 p_size) {
|
||||||
|
|
||||||
Windows::Foundation::Size new_size;
|
Windows::Foundation::Size new_size;
|
||||||
new_size.Width = p_size.width;
|
new_size.Width = p_size.width;
|
||||||
@@ -105,7 +105,7 @@ void OSWinrt::set_window_size(const Size2 p_size) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::set_window_fullscreen(bool p_enabled) {
|
void OSUWP::set_window_fullscreen(bool p_enabled) {
|
||||||
|
|
||||||
ApplicationView^ view = ApplicationView::GetForCurrentView();
|
ApplicationView^ view = ApplicationView::GetForCurrentView();
|
||||||
|
|
||||||
@@ -126,12 +126,12 @@ void OSWinrt::set_window_fullscreen(bool p_enabled) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OSWinrt::is_window_fullscreen() const {
|
bool OSUWP::is_window_fullscreen() const {
|
||||||
|
|
||||||
return ApplicationView::GetForCurrentView()->IsFullScreenMode;
|
return ApplicationView::GetForCurrentView()->IsFullScreenMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::set_keep_screen_on(bool p_enabled) {
|
void OSUWP::set_keep_screen_on(bool p_enabled) {
|
||||||
|
|
||||||
if (is_keep_screen_on() == p_enabled) return;
|
if (is_keep_screen_on() == p_enabled) return;
|
||||||
|
|
||||||
@@ -143,11 +143,11 @@ void OSWinrt::set_keep_screen_on(bool p_enabled) {
|
|||||||
OS::set_keep_screen_on(p_enabled);
|
OS::set_keep_screen_on(p_enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
int OSWinrt::get_audio_driver_count() const {
|
int OSUWP::get_audio_driver_count() const {
|
||||||
|
|
||||||
return AudioDriverManagerSW::get_driver_count();
|
return AudioDriverManagerSW::get_driver_count();
|
||||||
}
|
}
|
||||||
const char * OSWinrt::get_audio_driver_name(int p_driver) const {
|
const char * OSUWP::get_audio_driver_name(int p_driver) const {
|
||||||
|
|
||||||
AudioDriverSW* driver = AudioDriverManagerSW::get_driver(p_driver);
|
AudioDriverSW* driver = AudioDriverManagerSW::get_driver(p_driver);
|
||||||
ERR_FAIL_COND_V( !driver, "" );
|
ERR_FAIL_COND_V( !driver, "" );
|
||||||
@@ -157,14 +157,14 @@ const char * OSWinrt::get_audio_driver_name(int p_driver) const {
|
|||||||
static MemoryPoolStatic *mempool_static=NULL;
|
static MemoryPoolStatic *mempool_static=NULL;
|
||||||
static MemoryPoolDynamic *mempool_dynamic=NULL;
|
static MemoryPoolDynamic *mempool_dynamic=NULL;
|
||||||
|
|
||||||
void OSWinrt::initialize_core() {
|
void OSUWP::initialize_core() {
|
||||||
|
|
||||||
|
|
||||||
last_button_state=0;
|
last_button_state=0;
|
||||||
|
|
||||||
//RedirectIOToConsole();
|
//RedirectIOToConsole();
|
||||||
|
|
||||||
ThreadWinrt::make_default();
|
ThreadUWP::make_default();
|
||||||
SemaphoreWindows::make_default();
|
SemaphoreWindows::make_default();
|
||||||
MutexWindows::make_default();
|
MutexWindows::make_default();
|
||||||
|
|
||||||
@@ -206,23 +206,23 @@ void OSWinrt::initialize_core() {
|
|||||||
cursor_shape=CURSOR_ARROW;
|
cursor_shape=CURSOR_ARROW;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OSWinrt::can_draw() const {
|
bool OSUWP::can_draw() const {
|
||||||
|
|
||||||
return !minimized;
|
return !minimized;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void OSWinrt::set_gl_context(ContextEGL* p_context) {
|
void OSUWP::set_gl_context(ContextEGL* p_context) {
|
||||||
|
|
||||||
gl_context = p_context;
|
gl_context = p_context;
|
||||||
};
|
};
|
||||||
|
|
||||||
void OSWinrt::screen_size_changed() {
|
void OSUWP::screen_size_changed() {
|
||||||
|
|
||||||
gl_context->reset();
|
gl_context->reset();
|
||||||
};
|
};
|
||||||
|
|
||||||
void OSWinrt::initialize(const VideoMode& p_desired,int p_video_driver,int p_audio_driver) {
|
void OSUWP::initialize(const VideoMode& p_desired,int p_video_driver,int p_audio_driver) {
|
||||||
|
|
||||||
main_loop=NULL;
|
main_loop=NULL;
|
||||||
outside=true;
|
outside=true;
|
||||||
@@ -285,7 +285,7 @@ void OSWinrt::initialize(const VideoMode& p_desired,int p_video_driver,int p_aud
|
|||||||
|
|
||||||
input = memnew( InputDefault );
|
input = memnew( InputDefault );
|
||||||
|
|
||||||
joystick = ref new JoystickWinrt(input);
|
joystick = ref new JoystickUWP(input);
|
||||||
joystick->register_events();
|
joystick->register_events();
|
||||||
|
|
||||||
AudioDriverManagerSW::get_driver(p_audio_driver)->set_singleton();
|
AudioDriverManagerSW::get_driver(p_audio_driver)->set_singleton();
|
||||||
@@ -345,7 +345,7 @@ void OSWinrt::initialize(const VideoMode& p_desired,int p_video_driver,int p_aud
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::set_clipboard(const String& p_text) {
|
void OSUWP::set_clipboard(const String& p_text) {
|
||||||
|
|
||||||
DataPackage^ clip = ref new DataPackage();
|
DataPackage^ clip = ref new DataPackage();
|
||||||
clip->RequestedOperation = DataPackageOperation::Copy;
|
clip->RequestedOperation = DataPackageOperation::Copy;
|
||||||
@@ -354,7 +354,7 @@ void OSWinrt::set_clipboard(const String& p_text) {
|
|||||||
Clipboard::SetContent(clip);
|
Clipboard::SetContent(clip);
|
||||||
};
|
};
|
||||||
|
|
||||||
String OSWinrt::get_clipboard() const {
|
String OSUWP::get_clipboard() const {
|
||||||
|
|
||||||
if (managed_object->clipboard != nullptr)
|
if (managed_object->clipboard != nullptr)
|
||||||
return managed_object->clipboard->Data();
|
return managed_object->clipboard->Data();
|
||||||
@@ -363,7 +363,7 @@ String OSWinrt::get_clipboard() const {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void OSWinrt::input_event(InputEvent &p_event) {
|
void OSUWP::input_event(InputEvent &p_event) {
|
||||||
|
|
||||||
p_event.ID = ++last_id;
|
p_event.ID = ++last_id;
|
||||||
|
|
||||||
@@ -378,20 +378,20 @@ void OSWinrt::input_event(InputEvent &p_event) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void OSWinrt::delete_main_loop() {
|
void OSUWP::delete_main_loop() {
|
||||||
|
|
||||||
if (main_loop)
|
if (main_loop)
|
||||||
memdelete(main_loop);
|
memdelete(main_loop);
|
||||||
main_loop=NULL;
|
main_loop=NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::set_main_loop( MainLoop * p_main_loop ) {
|
void OSUWP::set_main_loop( MainLoop * p_main_loop ) {
|
||||||
|
|
||||||
input->set_main_loop(p_main_loop);
|
input->set_main_loop(p_main_loop);
|
||||||
main_loop=p_main_loop;
|
main_loop=p_main_loop;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::finalize() {
|
void OSUWP::finalize() {
|
||||||
|
|
||||||
if(main_loop)
|
if(main_loop)
|
||||||
memdelete(main_loop);
|
memdelete(main_loop);
|
||||||
@@ -432,7 +432,7 @@ void OSWinrt::finalize() {
|
|||||||
joystick = nullptr;
|
joystick = nullptr;
|
||||||
|
|
||||||
}
|
}
|
||||||
void OSWinrt::finalize_core() {
|
void OSUWP::finalize_core() {
|
||||||
|
|
||||||
if (mempool_dynamic)
|
if (mempool_dynamic)
|
||||||
memdelete( mempool_dynamic );
|
memdelete( mempool_dynamic );
|
||||||
@@ -440,7 +440,7 @@ void OSWinrt::finalize_core() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::vprint(const char* p_format, va_list p_list, bool p_stderr) {
|
void OSUWP::vprint(const char* p_format, va_list p_list, bool p_stderr) {
|
||||||
|
|
||||||
char buf[16384+1];
|
char buf[16384+1];
|
||||||
int len = vsnprintf(buf,16384,p_format,p_list);
|
int len = vsnprintf(buf,16384,p_format,p_list);
|
||||||
@@ -467,14 +467,14 @@ void OSWinrt::vprint(const char* p_format, va_list p_list, bool p_stderr) {
|
|||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
};
|
};
|
||||||
|
|
||||||
void OSWinrt::alert(const String& p_alert,const String& p_title) {
|
void OSUWP::alert(const String& p_alert,const String& p_title) {
|
||||||
|
|
||||||
Platform::String^ alert = ref new Platform::String(p_alert.c_str());
|
Platform::String^ alert = ref new Platform::String(p_alert.c_str());
|
||||||
Platform::String^ title = ref new Platform::String(p_title.c_str());
|
Platform::String^ title = ref new Platform::String(p_title.c_str());
|
||||||
|
|
||||||
MessageDialog^ msg = ref new MessageDialog(alert, title);
|
MessageDialog^ msg = ref new MessageDialog(alert, title);
|
||||||
|
|
||||||
UICommand^ close = ref new UICommand("Close", ref new UICommandInvokedHandler(managed_object, &OSWinrt::ManagedType::alert_close));
|
UICommand^ close = ref new UICommand("Close", ref new UICommandInvokedHandler(managed_object, &OSUWP::ManagedType::alert_close));
|
||||||
msg->Commands->Append(close);
|
msg->Commands->Append(close);
|
||||||
msg->DefaultCommandIndex = 0;
|
msg->DefaultCommandIndex = 0;
|
||||||
|
|
||||||
@@ -483,17 +483,17 @@ void OSWinrt::alert(const String& p_alert,const String& p_title) {
|
|||||||
msg->ShowAsync();
|
msg->ShowAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::ManagedType::alert_close(IUICommand^ command) {
|
void OSUWP::ManagedType::alert_close(IUICommand^ command) {
|
||||||
|
|
||||||
alert_close_handle = false;
|
alert_close_handle = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::ManagedType::on_clipboard_changed(Platform::Object ^ sender, Platform::Object ^ ev) {
|
void OSUWP::ManagedType::on_clipboard_changed(Platform::Object ^ sender, Platform::Object ^ ev) {
|
||||||
|
|
||||||
update_clipboard();
|
update_clipboard();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::ManagedType::update_clipboard() {
|
void OSUWP::ManagedType::update_clipboard() {
|
||||||
|
|
||||||
DataPackageView^ data = Clipboard::GetContent();
|
DataPackageView^ data = Clipboard::GetContent();
|
||||||
|
|
||||||
@@ -507,7 +507,7 @@ void OSWinrt::ManagedType::update_clipboard() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::ManagedType::on_accelerometer_reading_changed(Accelerometer ^ sender, AccelerometerReadingChangedEventArgs ^ args) {
|
void OSUWP::ManagedType::on_accelerometer_reading_changed(Accelerometer ^ sender, AccelerometerReadingChangedEventArgs ^ args) {
|
||||||
|
|
||||||
AccelerometerReading^ reading = args->Reading;
|
AccelerometerReading^ reading = args->Reading;
|
||||||
|
|
||||||
@@ -518,7 +518,7 @@ void OSWinrt::ManagedType::on_accelerometer_reading_changed(Accelerometer ^ send
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::ManagedType::on_magnetometer_reading_changed(Magnetometer ^ sender, MagnetometerReadingChangedEventArgs ^ args) {
|
void OSUWP::ManagedType::on_magnetometer_reading_changed(Magnetometer ^ sender, MagnetometerReadingChangedEventArgs ^ args) {
|
||||||
|
|
||||||
MagnetometerReading^ reading = args->Reading;
|
MagnetometerReading^ reading = args->Reading;
|
||||||
|
|
||||||
@@ -529,7 +529,7 @@ void OSWinrt::ManagedType::on_magnetometer_reading_changed(Magnetometer ^ sender
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::ManagedType::on_gyroscope_reading_changed(Gyrometer ^ sender, GyrometerReadingChangedEventArgs ^ args) {
|
void OSUWP::ManagedType::on_gyroscope_reading_changed(Gyrometer ^ sender, GyrometerReadingChangedEventArgs ^ args) {
|
||||||
|
|
||||||
GyrometerReading^ reading = args->Reading;
|
GyrometerReading^ reading = args->Reading;
|
||||||
|
|
||||||
@@ -540,7 +540,7 @@ void OSWinrt::ManagedType::on_gyroscope_reading_changed(Gyrometer ^ sender, Gyro
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::set_mouse_mode(MouseMode p_mode) {
|
void OSUWP::set_mouse_mode(MouseMode p_mode) {
|
||||||
|
|
||||||
if (p_mode == MouseMode::MOUSE_MODE_CAPTURED) {
|
if (p_mode == MouseMode::MOUSE_MODE_CAPTURED) {
|
||||||
|
|
||||||
@@ -566,41 +566,41 @@ void OSWinrt::set_mouse_mode(MouseMode p_mode) {
|
|||||||
SetEvent(mouse_mode_changed);
|
SetEvent(mouse_mode_changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
OSWinrt::MouseMode OSWinrt::get_mouse_mode() const{
|
OSUWP::MouseMode OSUWP::get_mouse_mode() const{
|
||||||
|
|
||||||
return mouse_mode;
|
return mouse_mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Point2 OSWinrt::get_mouse_pos() const {
|
Point2 OSUWP::get_mouse_pos() const {
|
||||||
|
|
||||||
return Point2(old_x, old_y);
|
return Point2(old_x, old_y);
|
||||||
}
|
}
|
||||||
|
|
||||||
int OSWinrt::get_mouse_button_state() const {
|
int OSUWP::get_mouse_button_state() const {
|
||||||
|
|
||||||
return last_button_state;
|
return last_button_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::set_window_title(const String& p_title) {
|
void OSUWP::set_window_title(const String& p_title) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::set_video_mode(const VideoMode& p_video_mode,int p_screen) {
|
void OSUWP::set_video_mode(const VideoMode& p_video_mode,int p_screen) {
|
||||||
|
|
||||||
video_mode = p_video_mode;
|
video_mode = p_video_mode;
|
||||||
}
|
}
|
||||||
OS::VideoMode OSWinrt::get_video_mode(int p_screen) const {
|
OS::VideoMode OSUWP::get_video_mode(int p_screen) const {
|
||||||
|
|
||||||
return video_mode;
|
return video_mode;
|
||||||
}
|
}
|
||||||
void OSWinrt::get_fullscreen_mode_list(List<VideoMode> *p_list,int p_screen) const {
|
void OSUWP::get_fullscreen_mode_list(List<VideoMode> *p_list,int p_screen) const {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::print_error(const char* p_function, const char* p_file, int p_line, const char* p_code, const char* p_rationale, ErrorType p_type) {
|
void OSUWP::print_error(const char* p_function, const char* p_file, int p_line, const char* p_code, const char* p_rationale, ErrorType p_type) {
|
||||||
|
|
||||||
const char* err_details;
|
const char* err_details;
|
||||||
if (p_rationale && p_rationale[0])
|
if (p_rationale && p_rationale[0])
|
||||||
@@ -625,12 +625,12 @@ void OSWinrt::print_error(const char* p_function, const char* p_file, int p_line
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String OSWinrt::get_name() {
|
String OSUWP::get_name() {
|
||||||
|
|
||||||
return "WinRT";
|
return "UWP";
|
||||||
}
|
}
|
||||||
|
|
||||||
OS::Date OSWinrt::get_date(bool utc) const {
|
OS::Date OSUWP::get_date(bool utc) const {
|
||||||
|
|
||||||
SYSTEMTIME systemtime;
|
SYSTEMTIME systemtime;
|
||||||
if (utc)
|
if (utc)
|
||||||
@@ -646,7 +646,7 @@ OS::Date OSWinrt::get_date(bool utc) const {
|
|||||||
date.dst=false;
|
date.dst=false;
|
||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
OS::Time OSWinrt::get_time(bool utc) const {
|
OS::Time OSUWP::get_time(bool utc) const {
|
||||||
|
|
||||||
SYSTEMTIME systemtime;
|
SYSTEMTIME systemtime;
|
||||||
if (utc)
|
if (utc)
|
||||||
@@ -661,7 +661,7 @@ OS::Time OSWinrt::get_time(bool utc) const {
|
|||||||
return time;
|
return time;
|
||||||
}
|
}
|
||||||
|
|
||||||
OS::TimeZoneInfo OSWinrt::get_time_zone_info() const {
|
OS::TimeZoneInfo OSUWP::get_time_zone_info() const {
|
||||||
TIME_ZONE_INFORMATION info;
|
TIME_ZONE_INFORMATION info;
|
||||||
bool daylight = false;
|
bool daylight = false;
|
||||||
if (GetTimeZoneInformation(&info) == TIME_ZONE_ID_DAYLIGHT)
|
if (GetTimeZoneInformation(&info) == TIME_ZONE_ID_DAYLIGHT)
|
||||||
@@ -678,7 +678,7 @@ OS::TimeZoneInfo OSWinrt::get_time_zone_info() const {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t OSWinrt::get_unix_time() const {
|
uint64_t OSUWP::get_unix_time() const {
|
||||||
|
|
||||||
FILETIME ft;
|
FILETIME ft;
|
||||||
SYSTEMTIME st;
|
SYSTEMTIME st;
|
||||||
@@ -700,7 +700,7 @@ uint64_t OSWinrt::get_unix_time() const {
|
|||||||
return (*(uint64_t*)&ft - *(uint64_t*)&fep) / 10000000;
|
return (*(uint64_t*)&ft - *(uint64_t*)&fep) / 10000000;
|
||||||
};
|
};
|
||||||
|
|
||||||
void OSWinrt::delay_usec(uint32_t p_usec) const {
|
void OSUWP::delay_usec(uint32_t p_usec) const {
|
||||||
|
|
||||||
int msec = p_usec < 1000 ? 1 : p_usec / 1000;
|
int msec = p_usec < 1000 ? 1 : p_usec / 1000;
|
||||||
|
|
||||||
@@ -708,7 +708,7 @@ void OSWinrt::delay_usec(uint32_t p_usec) const {
|
|||||||
WaitForSingleObjectEx(GetCurrentThread(), msec, false);
|
WaitForSingleObjectEx(GetCurrentThread(), msec, false);
|
||||||
|
|
||||||
}
|
}
|
||||||
uint64_t OSWinrt::get_ticks_usec() const {
|
uint64_t OSUWP::get_ticks_usec() const {
|
||||||
|
|
||||||
uint64_t ticks;
|
uint64_t ticks;
|
||||||
uint64_t time;
|
uint64_t time;
|
||||||
@@ -723,13 +723,13 @@ uint64_t OSWinrt::get_ticks_usec() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void OSWinrt::process_events() {
|
void OSUWP::process_events() {
|
||||||
|
|
||||||
last_id = joystick->process_controllers(last_id);
|
last_id = joystick->process_controllers(last_id);
|
||||||
process_key_events();
|
process_key_events();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::process_key_events()
|
void OSUWP::process_key_events()
|
||||||
{
|
{
|
||||||
|
|
||||||
for (int i = 0; i < key_event_pos; i++) {
|
for (int i = 0; i < key_event_pos; i++) {
|
||||||
@@ -750,7 +750,7 @@ void OSWinrt::process_key_events()
|
|||||||
key_event_pos = 0;
|
key_event_pos = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::queue_key_event(KeyEvent & p_event)
|
void OSUWP::queue_key_event(KeyEvent & p_event)
|
||||||
{
|
{
|
||||||
// This merges Char events with the previous Key event, so
|
// This merges Char events with the previous Key event, so
|
||||||
// the unicode can be retrieved without sending duplicate events.
|
// the unicode can be retrieved without sending duplicate events.
|
||||||
@@ -768,7 +768,7 @@ void OSWinrt::queue_key_event(KeyEvent & p_event)
|
|||||||
key_event_buffer[key_event_pos++] = p_event;
|
key_event_buffer[key_event_pos++] = p_event;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::set_cursor_shape(CursorShape p_shape) {
|
void OSUWP::set_cursor_shape(CursorShape p_shape) {
|
||||||
|
|
||||||
ERR_FAIL_INDEX(p_shape, CURSOR_MAX);
|
ERR_FAIL_INDEX(p_shape, CURSOR_MAX);
|
||||||
|
|
||||||
@@ -800,58 +800,58 @@ void OSWinrt::set_cursor_shape(CursorShape p_shape) {
|
|||||||
cursor_shape = p_shape;
|
cursor_shape = p_shape;
|
||||||
}
|
}
|
||||||
|
|
||||||
Error OSWinrt::execute(const String& p_path, const List<String>& p_arguments,bool p_blocking,ProcessID *r_child_id,String* r_pipe,int *r_exitcode) {
|
Error OSUWP::execute(const String& p_path, const List<String>& p_arguments,bool p_blocking,ProcessID *r_child_id,String* r_pipe,int *r_exitcode) {
|
||||||
|
|
||||||
return FAILED;
|
return FAILED;
|
||||||
};
|
};
|
||||||
|
|
||||||
Error OSWinrt::kill(const ProcessID& p_pid) {
|
Error OSUWP::kill(const ProcessID& p_pid) {
|
||||||
|
|
||||||
return FAILED;
|
return FAILED;
|
||||||
};
|
};
|
||||||
|
|
||||||
Error OSWinrt::set_cwd(const String& p_cwd) {
|
Error OSUWP::set_cwd(const String& p_cwd) {
|
||||||
|
|
||||||
return FAILED;
|
return FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
String OSWinrt::get_executable_path() const {
|
String OSUWP::get_executable_path() const {
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::set_icon(const Image& p_icon) {
|
void OSUWP::set_icon(const Image& p_icon) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool OSWinrt::has_environment(const String& p_var) const {
|
bool OSUWP::has_environment(const String& p_var) const {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
String OSWinrt::get_environment(const String& p_var) const {
|
String OSUWP::get_environment(const String& p_var) const {
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
};
|
};
|
||||||
|
|
||||||
String OSWinrt::get_stdin_string(bool p_block) {
|
String OSUWP::get_stdin_string(bool p_block) {
|
||||||
|
|
||||||
return String();
|
return String();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void OSWinrt::move_window_to_foreground() {
|
void OSUWP::move_window_to_foreground() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Error OSWinrt::shell_open(String p_uri) {
|
Error OSUWP::shell_open(String p_uri) {
|
||||||
|
|
||||||
return FAILED;
|
return FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String OSWinrt::get_locale() const {
|
String OSUWP::get_locale() const {
|
||||||
|
|
||||||
#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP // this should work on phone 8.1, but it doesn't
|
#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP // this should work on phone 8.1, but it doesn't
|
||||||
return "en";
|
return "en";
|
||||||
@@ -861,46 +861,46 @@ String OSWinrt::get_locale() const {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::release_rendering_thread() {
|
void OSUWP::release_rendering_thread() {
|
||||||
|
|
||||||
gl_context->release_current();
|
gl_context->release_current();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::make_rendering_thread() {
|
void OSUWP::make_rendering_thread() {
|
||||||
|
|
||||||
gl_context->make_current();
|
gl_context->make_current();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::swap_buffers() {
|
void OSUWP::swap_buffers() {
|
||||||
|
|
||||||
gl_context->swap_buffers();
|
gl_context->swap_buffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OSWinrt::has_touchscreen_ui_hint() const {
|
bool OSUWP::has_touchscreen_ui_hint() const {
|
||||||
|
|
||||||
TouchCapabilities^ tc = ref new TouchCapabilities();
|
TouchCapabilities^ tc = ref new TouchCapabilities();
|
||||||
return tc->TouchPresent != 0 || UIViewSettings::GetForCurrentView()->UserInteractionMode == UserInteractionMode::Touch;
|
return tc->TouchPresent != 0 || UIViewSettings::GetForCurrentView()->UserInteractionMode == UserInteractionMode::Touch;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OSWinrt::has_virtual_keyboard() const {
|
bool OSUWP::has_virtual_keyboard() const {
|
||||||
|
|
||||||
return UIViewSettings::GetForCurrentView()->UserInteractionMode == UserInteractionMode::Touch;
|
return UIViewSettings::GetForCurrentView()->UserInteractionMode == UserInteractionMode::Touch;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::show_virtual_keyboard(const String & p_existing_text, const Rect2 & p_screen_rect) {
|
void OSUWP::show_virtual_keyboard(const String & p_existing_text, const Rect2 & p_screen_rect) {
|
||||||
|
|
||||||
InputPane^ pane = InputPane::GetForCurrentView();
|
InputPane^ pane = InputPane::GetForCurrentView();
|
||||||
pane->TryShow();
|
pane->TryShow();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSWinrt::hide_virtual_keyboard() {
|
void OSUWP::hide_virtual_keyboard() {
|
||||||
|
|
||||||
InputPane^ pane = InputPane::GetForCurrentView();
|
InputPane^ pane = InputPane::GetForCurrentView();
|
||||||
pane->TryHide();
|
pane->TryHide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void OSWinrt::run() {
|
void OSUWP::run() {
|
||||||
|
|
||||||
if (!main_loop)
|
if (!main_loop)
|
||||||
return;
|
return;
|
||||||
@@ -927,13 +927,13 @@ void OSWinrt::run() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
MainLoop *OSWinrt::get_main_loop() const {
|
MainLoop *OSUWP::get_main_loop() const {
|
||||||
|
|
||||||
return main_loop;
|
return main_loop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String OSWinrt::get_data_dir() const {
|
String OSUWP::get_data_dir() const {
|
||||||
|
|
||||||
Windows::Storage::StorageFolder ^data_folder = Windows::Storage::ApplicationData::Current->LocalFolder;
|
Windows::Storage::StorageFolder ^data_folder = Windows::Storage::ApplicationData::Current->LocalFolder;
|
||||||
|
|
||||||
@@ -941,7 +941,7 @@ String OSWinrt::get_data_dir() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
OSWinrt::OSWinrt() {
|
OSUWP::OSUWP() {
|
||||||
|
|
||||||
key_event_pos=0;
|
key_event_pos=0;
|
||||||
force_quit=false;
|
force_quit=false;
|
||||||
@@ -973,7 +973,7 @@ OSWinrt::OSWinrt() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
OSWinrt::~OSWinrt()
|
OSUWP::~OSUWP()
|
||||||
{
|
{
|
||||||
#ifdef STDOUT_FILE
|
#ifdef STDOUT_FILE
|
||||||
fclose(stdo);
|
fclose(stdo);
|
||||||
|
|||||||
@@ -26,8 +26,8 @@
|
|||||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
#ifndef OSWinrt_H
|
#ifndef OSUWP_H
|
||||||
#define OSWinrt_H
|
#define OSUWP_H
|
||||||
|
|
||||||
#include "os/input.h"
|
#include "os/input.h"
|
||||||
#include "os/os.h"
|
#include "os/os.h"
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
/**
|
/**
|
||||||
@author Juan Linietsky <reduzio@gmail.com>
|
@author Juan Linietsky <reduzio@gmail.com>
|
||||||
*/
|
*/
|
||||||
class OSWinrt : public OS {
|
class OSUWP : public OS {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ private:
|
|||||||
|
|
||||||
InputDefault *input;
|
InputDefault *input;
|
||||||
|
|
||||||
JoystickWinrt^ joystick;
|
JoystickUWP^ joystick;
|
||||||
|
|
||||||
Windows::System::Display::DisplayRequest^ display_request;
|
Windows::System::Display::DisplayRequest^ display_request;
|
||||||
|
|
||||||
@@ -159,7 +159,7 @@ private:
|
|||||||
|
|
||||||
internal:
|
internal:
|
||||||
ManagedType() { alert_close_handle = false; }
|
ManagedType() { alert_close_handle = false; }
|
||||||
property OSWinrt* os;
|
property OSUWP* os;
|
||||||
};
|
};
|
||||||
ManagedType^ managed_object;
|
ManagedType^ managed_object;
|
||||||
Windows::Devices::Sensors::Accelerometer^ accelerometer;
|
Windows::Devices::Sensors::Accelerometer^ accelerometer;
|
||||||
@@ -273,8 +273,8 @@ public:
|
|||||||
|
|
||||||
void queue_key_event(KeyEvent &p_event);
|
void queue_key_event(KeyEvent &p_event);
|
||||||
|
|
||||||
OSWinrt();
|
OSUWP();
|
||||||
~OSWinrt();
|
~OSUWP();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -30,9 +30,9 @@
|
|||||||
|
|
||||||
#include "os/memory.h"
|
#include "os/memory.h"
|
||||||
|
|
||||||
Thread* ThreadWinrt::create_func_winrt(ThreadCreateCallback p_callback,void *p_user,const Settings&) {
|
Thread* ThreadUWP::create_func_uwp(ThreadCreateCallback p_callback,void *p_user,const Settings&) {
|
||||||
|
|
||||||
ThreadWinrt* thread = memnew(ThreadWinrt);
|
ThreadUWP* thread = memnew(ThreadUWP);
|
||||||
|
|
||||||
|
|
||||||
std::thread new_thread(p_callback, p_user);
|
std::thread new_thread(p_callback, p_user);
|
||||||
@@ -41,34 +41,34 @@ Thread* ThreadWinrt::create_func_winrt(ThreadCreateCallback p_callback,void *p_u
|
|||||||
return thread;
|
return thread;
|
||||||
};
|
};
|
||||||
|
|
||||||
Thread::ID ThreadWinrt::get_thread_ID_func_winrt() {
|
Thread::ID ThreadUWP::get_thread_ID_func_uwp() {
|
||||||
|
|
||||||
return std::hash<std::thread::id>()(std::this_thread::get_id());
|
return std::hash<std::thread::id>()(std::this_thread::get_id());
|
||||||
};
|
};
|
||||||
|
|
||||||
void ThreadWinrt::wait_to_finish_func_winrt(Thread* p_thread) {
|
void ThreadUWP::wait_to_finish_func_uwp(Thread* p_thread) {
|
||||||
|
|
||||||
ThreadWinrt *tp=static_cast<ThreadWinrt*>(p_thread);
|
ThreadUWP *tp=static_cast<ThreadUWP*>(p_thread);
|
||||||
tp->thread.join();
|
tp->thread.join();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Thread::ID ThreadWinrt::get_ID() const {
|
Thread::ID ThreadUWP::get_ID() const {
|
||||||
|
|
||||||
return std::hash<std::thread::id>()(thread.get_id());
|
return std::hash<std::thread::id>()(thread.get_id());
|
||||||
};
|
};
|
||||||
|
|
||||||
void ThreadWinrt::make_default() {
|
void ThreadUWP::make_default() {
|
||||||
create_func = create_func_winrt;
|
create_func = create_func_uwp;
|
||||||
get_thread_ID_func = get_thread_ID_func_winrt;
|
get_thread_ID_func = get_thread_ID_func_uwp;
|
||||||
wait_to_finish_func = wait_to_finish_func_winrt;
|
wait_to_finish_func = wait_to_finish_func_uwp;
|
||||||
};
|
};
|
||||||
|
|
||||||
ThreadWinrt::ThreadWinrt() {
|
ThreadUWP::ThreadUWP() {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ThreadWinrt::~ThreadWinrt() {
|
ThreadUWP::~ThreadUWP() {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -26,8 +26,8 @@
|
|||||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
#ifndef THREAD_WINRT_H
|
#ifndef THREAD_UWP_H
|
||||||
#define THREAD_WINRT_H
|
#define THREAD_UWP_H
|
||||||
|
|
||||||
#ifdef UWP_ENABLED
|
#ifdef UWP_ENABLED
|
||||||
|
|
||||||
@@ -35,15 +35,15 @@
|
|||||||
|
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
class ThreadWinrt : public Thread {
|
class ThreadUWP : public Thread {
|
||||||
|
|
||||||
std::thread thread;
|
std::thread thread;
|
||||||
|
|
||||||
static Thread* create_func_winrt(ThreadCreateCallback p_callback,void *,const Settings&);
|
static Thread* create_func_uwp(ThreadCreateCallback p_callback,void *,const Settings&);
|
||||||
static ID get_thread_ID_func_winrt();
|
static ID get_thread_ID_func_uwp();
|
||||||
static void wait_to_finish_func_winrt(Thread* p_thread);
|
static void wait_to_finish_func_uwp(Thread* p_thread);
|
||||||
|
|
||||||
ThreadWinrt();
|
ThreadUWP();
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ public:
|
|||||||
static void make_default();
|
static void make_default();
|
||||||
|
|
||||||
|
|
||||||
~ThreadWinrt();
|
~ThreadUWP();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
2
thirdparty/README.md
vendored
2
thirdparty/README.md
vendored
@@ -14,7 +14,7 @@ Files extracted from upstream source:
|
|||||||
- LICENSE file
|
- LICENSE file
|
||||||
|
|
||||||
Important: Some files have been modified by Godot developers so that they work
|
Important: Some files have been modified by Godot developers so that they work
|
||||||
for all platforms (especially WinRT). Check the diff with the 1.3.13 tarball
|
for all platforms (especially UWP). Check the diff with the 1.3.13 tarball
|
||||||
before the next update.
|
before the next update.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
4
thirdparty/openssl/uwp.cpp
vendored
4
thirdparty/openssl/uwp.cpp
vendored
@@ -1,7 +1,7 @@
|
|||||||
/* Snippets extracted from https://github.com/Microsoft/openssl/blob/ec7e430e06e4e3ac87c183dee33cb216814cf980/ms/winrt.cpp
|
/* Snippets extracted from https://github.com/Microsoft/openssl/blob/ec7e430e06e4e3ac87c183dee33cb216814cf980/ms/winrt.cpp
|
||||||
* Adapted for Godot definitions
|
* Adapted for Godot definitions
|
||||||
*/
|
*/
|
||||||
/* winrt.cpp
|
/* uwp.cpp
|
||||||
* Copyright 2014 Microsoft Corporation
|
* Copyright 2014 Microsoft Corporation
|
||||||
* C++/CX Entropy/shims for Windows Phone/Windows Store platform
|
* C++/CX Entropy/shims for Windows Phone/Windows Store platform
|
||||||
* written by Alejandro Jimenez Martinez
|
* written by Alejandro Jimenez Martinez
|
||||||
@@ -144,7 +144,7 @@ extern "C"
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int winrt_GetTickCount(void)
|
int uwp_GetTickCount(void)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER t;
|
LARGE_INTEGER t;
|
||||||
return(int) (QueryPerformanceCounter(&t) ? t.QuadPart : 0);
|
return(int) (QueryPerformanceCounter(&t) ? t.QuadPart : 0);
|
||||||
|
|||||||
2
tools/dist/uwp_template/AppxManifest.xml
vendored
2
tools/dist/uwp_template/AppxManifest.xml
vendored
@@ -15,7 +15,7 @@
|
|||||||
<Resource Language="EN-US" />
|
<Resource Language="EN-US" />
|
||||||
</Resources>
|
</Resources>
|
||||||
<Applications>
|
<Applications>
|
||||||
<Application Id="App" Executable="godot.winrt.exe" EntryPoint="GodotWinRT.App">
|
<Application Id="App" Executable="godot.uwp.exe" EntryPoint="GodotUWP.App">
|
||||||
<uap:VisualElements DisplayName="$display_name$" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="$app_description$" BackgroundColor="$bg_color$">
|
<uap:VisualElements DisplayName="$display_name$" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="$app_description$" BackgroundColor="$bg_color$">
|
||||||
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" Square310x310Logo="Assets\Square310x310Logo.png" Square71x71Logo="Assets\Square71x71Logo.png" ShortName="$short_name$">
|
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" Square310x310Logo="Assets\Square310x310Logo.png" Square71x71Logo="Assets\Square71x71Logo.png" ShortName="$short_name$">
|
||||||
$name_on_tiles$
|
$name_on_tiles$
|
||||||
|
|||||||
Reference in New Issue
Block a user