summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/android/export/export.cpp40
-rw-r--r--platform/javascript/audio_server_javascript.cpp2
-rw-r--r--platform/javascript/audio_server_javascript.h2
-rw-r--r--platform/osx/os_osx.h2
-rw-r--r--platform/osx/os_osx.mm16
-rw-r--r--platform/windows/godot.manifest24
-rw-r--r--platform/windows/godot_res.rc3
7 files changed, 49 insertions, 40 deletions
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index b8c44a4fc8..872f047c95 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -822,40 +822,6 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest,bool
}*/
}
- if (tname=="application" && /*nspace=="android" &&*/ attrname=="label") {
-
- print_line("FOUND application");
- if (attr_value==0xFFFFFFFF) {
- WARN_PRINT("Application name in a resource, should be plaintext (but you can ignore this).")
- } else {
-
- String aname = get_project_name();
- string_table[attr_value]=aname;
- }
- }
- if (tname=="activity" && /*nspace=="android" &&*/ attrname=="label") {
-
- print_line("FOUND activity name");
- if (attr_value==0xFFFFFFFF) {
- WARN_PRINT("Activity name in a resource, should be plaintext (but you can ignore this)")
- } else {
- String aname;
- if (this->name!="") {
- aname=this->name;
- } else {
- aname = Globals::get_singleton()->get("application/name");
-
- }
-
- if (aname=="") {
- aname=_MKSTR(VERSION_NAME);
- }
-
- print_line("APP NAME IS..."+aname);
- string_table[attr_value]=aname;
- }
- }
-
if (tname=="uses-permission" && /*nspace=="android" &&*/ attrname=="name") {
if (value.begins_with("godot.custom")) {
@@ -880,13 +846,11 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest,bool
if (tname=="supports-screens" ) {
- if (attr_value==0xFFFFFFFF) {
- WARN_PRINT("Screen res name in a resource, should be plaintext")
- } else if (attrname=="smallScreens") {
+ if (attrname=="smallScreens") {
encode_uint32(screen_support[SCREEN_SMALL]?0xFFFFFFFF:0,&p_manifest[iofs+16]);
- } else if (attrname=="mediumScreens") {
+ } else if (attrname=="normalScreens") {
encode_uint32(screen_support[SCREEN_NORMAL]?0xFFFFFFFF:0,&p_manifest[iofs+16]);
diff --git a/platform/javascript/audio_server_javascript.cpp b/platform/javascript/audio_server_javascript.cpp
index 9f82f084e5..71a7e77266 100644
--- a/platform/javascript/audio_server_javascript.cpp
+++ b/platform/javascript/audio_server_javascript.cpp
@@ -116,7 +116,7 @@ void AudioServerJavascript::sample_set_data(RID p_sample, const DVector<uint8_t>
}
-const DVector<uint8_t> AudioServerJavascript::sample_get_data(RID p_sample) const{
+DVector<uint8_t> AudioServerJavascript::sample_get_data(RID p_sample) const{
return DVector<uint8_t>();
diff --git a/platform/javascript/audio_server_javascript.h b/platform/javascript/audio_server_javascript.h
index bb9a91f78a..e27192cd93 100644
--- a/platform/javascript/audio_server_javascript.h
+++ b/platform/javascript/audio_server_javascript.h
@@ -132,7 +132,7 @@ public:
virtual void sample_set_data(RID p_sample, const DVector<uint8_t>& p_buffer);
- virtual const DVector<uint8_t> sample_get_data(RID p_sample) const;
+ virtual DVector<uint8_t> sample_get_data(RID p_sample) const;
virtual void sample_set_mix_rate(RID p_sample,int p_rate);
virtual int sample_get_mix_rate(RID p_sample) const;
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index 8d64686335..e1c33cb018 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -142,6 +142,8 @@ public:
virtual String get_name();
+ virtual void alert(const String& p_alert, const String& p_title="ALERT!");
+
virtual void set_cursor_shape(CursorShape p_shape);
virtual void set_mouse_show(bool p_show);
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index b5503fcd73..45c500ec39 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -1209,6 +1209,22 @@ String OS_OSX::get_name() {
return "OSX";
}
+void OS_OSX::alert(const String& p_alert, const String& p_title) {
+ // Set OS X-compliant variables
+ NSAlert *window = [[NSAlert alloc] init];
+ NSString *ns_title = [NSString stringWithUTF8String:p_title.utf8().get_data()];
+ NSString *ns_alert = [NSString stringWithUTF8String:p_alert.utf8().get_data()];
+
+ [window addButtonWithTitle:@"OK"];
+ [window setMessageText:ns_title];
+ [window setInformativeText:ns_alert];
+ [window setAlertStyle:NSWarningAlertStyle];
+
+ // Display it, then release
+ [window runModal];
+ [window release];
+}
+
void OS_OSX::set_cursor_shape(CursorShape p_shape) {
if (cursor_shape==p_shape)
diff --git a/platform/windows/godot.manifest b/platform/windows/godot.manifest
new file mode 100644
index 0000000000..c095f007b0
--- /dev/null
+++ b/platform/windows/godot.manifest
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+ <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+ <application>
+ <!-- Windows 10 -->
+ <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+ <!-- Windows 8.1 -->
+ <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+ <!-- Windows 8 -->
+ <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+ <!-- Windows 7 -->
+ <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+ <!-- Windows Vista -->
+ <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
+ </application>
+ </compatibility>
+</assembly>
diff --git a/platform/windows/godot_res.rc b/platform/windows/godot_res.rc
index 5f1e951e0f..d069ecdc79 100644
--- a/platform/windows/godot_res.rc
+++ b/platform/windows/godot_res.rc
@@ -1,3 +1,4 @@
+#include <winuser.h>
#include "core/version.h"
#ifndef _STR
#define _STR(m_x) #m_x
@@ -6,6 +7,8 @@
GODOT_ICON ICON platform/windows/godot.ico
+CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST platform/windows/godot.manifest
+
1 VERSIONINFO
FILEVERSION VERSION_MAJOR,VERSION_MINOR,0,0
PRODUCTVERSION VERSION_MAJOR,VERSION_MINOR,0,0