summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/android/AndroidManifest.xml.template3
-rw-r--r--platform/android/export/export.cpp10
-rw-r--r--platform/javascript/detect.py5
-rw-r--r--platform/javascript/engine.js4
-rw-r--r--platform/osx/os_osx.h2
-rw-r--r--platform/osx/os_osx.mm2
-rw-r--r--platform/uwp/detect.py3
-rw-r--r--platform/windows/detect.py7
8 files changed, 24 insertions, 12 deletions
diff --git a/platform/android/AndroidManifest.xml.template b/platform/android/AndroidManifest.xml.template
index a42ceb3c21..3e42b7a3cd 100644
--- a/platform/android/AndroidManifest.xml.template
+++ b/platform/android/AndroidManifest.xml.template
@@ -16,7 +16,8 @@
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:launchMode="singleTask"
android:screenOrientation="landscape"
- android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize">
+ android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize"
+ android:resizeableActivity="false">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index 6b4d0ff8c4..6d9f0a7e9a 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -301,8 +301,7 @@ class EditorExportAndroid : public EditorExportPlatform {
args.push_back("-s");
args.push_back(d.id);
args.push_back("shell");
- args.push_back("cat");
- args.push_back("/system/build.prop");
+ args.push_back("getprop");
int ec;
String dp;
@@ -315,7 +314,14 @@ class EditorExportAndroid : public EditorExportPlatform {
d.api_level = 0;
for (int j = 0; j < props.size(); j++) {
+ // got information by `shell cat /system/build.prop` before and its format is "property=value"
+ // it's now changed to use `shell getporp` because of permission issue with Android 8.0 and above
+ // its format is "[property]: [value]" so changed it as like build.prop
String p = props[j];
+ p = p.replace("]: ", "=");
+ p = p.replace("[", "");
+ p = p.replace("]", "");
+
if (p.begins_with("ro.product.model=")) {
device = p.get_slice("=", 1).strip_edges();
} else if (p.begins_with("ro.product.brand=")) {
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py
index 7e6a1518ed..ad6b710382 100644
--- a/platform/javascript/detect.py
+++ b/platform/javascript/detect.py
@@ -65,13 +65,14 @@ def configure(env):
elif (env["target"] == "release_debug"):
env.Append(CCFLAGS=['-O2', '-DDEBUG_ENABLED'])
- env.Append(LINKFLAGS=['-O2', '-s', 'ASSERTIONS=1'])
+ env.Append(LINKFLAGS=['-O2'])
# retain function names at the cost of file size, for backtraces and profiling
env.Append(LINKFLAGS=['--profiling-funcs'])
elif (env["target"] == "debug"):
env.Append(CCFLAGS=['-O1', '-D_DEBUG', '-g', '-DDEBUG_ENABLED'])
env.Append(LINKFLAGS=['-O1', '-g'])
+ env.Append(LINKFLAGS=['-s', 'ASSERTIONS=1'])
## Compiler configuration
@@ -102,7 +103,7 @@ def configure(env):
## Compile flags
env.Append(CPPPATH=['#platform/javascript'])
- env.Append(CPPFLAGS=['-DJAVASCRIPT_ENABLED', '-DUNIX_ENABLED', '-DPTHREAD_NO_RENAME', '-DTYPED_METHOD_BIND', '-DNO_THREADS'])
+ env.Append(CPPFLAGS=['-DJAVASCRIPT_ENABLED', '-DUNIX_ENABLED', '-DTYPED_METHOD_BIND', '-DNO_THREADS'])
env.Append(CPPFLAGS=['-DGLES3_ENABLED'])
# These flags help keep the file size down
diff --git a/platform/javascript/engine.js b/platform/javascript/engine.js
index 8f22e41660..e6fb48d0d2 100644
--- a/platform/javascript/engine.js
+++ b/platform/javascript/engine.js
@@ -267,9 +267,9 @@
try {
var testCanvas = document.createElement('canvas');
if (majorVersion === 1) {
- testContext = testCanvas.getContext('webgl') || testCanvas.getContet('experimental-webgl');
+ testContext = testCanvas.getContext('webgl') || testCanvas.getContext('experimental-webgl');
} else if (majorVersion === 2) {
- testContext = testCanvas.getContext('webgl2') || testCanvas.getContet('experimental-webgl2');
+ testContext = testCanvas.getContext('webgl2') || testCanvas.getContext('experimental-webgl2');
}
} catch (e) {}
return !!testContext;
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index 486d7af1c1..fee25e98cb 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -100,7 +100,7 @@ public:
id context;
CursorShape cursor_shape;
- NSCursor *cursors[CURSOR_MAX] = { NULL };
+ NSCursor *cursors[CURSOR_MAX];
MouseMode mouse_mode;
String title;
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index a811ff585d..ef23d61141 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -263,6 +263,7 @@ static Vector2 get_mouse_pos(NSEvent *event) {
NSWindow *window = (NSWindow *)[notification object];
CGFloat newBackingScaleFactor = [window backingScaleFactor];
CGFloat oldBackingScaleFactor = [[[notification userInfo] objectForKey:@"NSBackingPropertyOldScaleFactorKey"] doubleValue];
+ [OS_OSX::singleton->window_view setWantsBestResolutionOpenGLSurface:YES];
if (newBackingScaleFactor != oldBackingScaleFactor) {
//Set new display scale and window size
@@ -2320,6 +2321,7 @@ OS_OSX *OS_OSX::singleton = NULL;
OS_OSX::OS_OSX() {
+ memset(cursors, 0, sizeof(cursors));
key_event_pos = 0;
mouse_mode = OS::MOUSE_MODE_VISIBLE;
main_loop = NULL;
diff --git a/platform/uwp/detect.py b/platform/uwp/detect.py
index d850ab9436..3ee195e4f9 100644
--- a/platform/uwp/detect.py
+++ b/platform/uwp/detect.py
@@ -25,10 +25,11 @@ def can_build():
def get_opts():
+ from SCons.Variables import BoolVariable
return [
('msvc_version', 'MSVC version to use. Ignored if VCINSTALLDIR is set in shell env.', None),
- (BoolVariable('use_mingw', 'Use the Mingw compiler, even if MSVC is installed. Only used on Windows.', False)),
+ BoolVariable('use_mingw', 'Use the Mingw compiler, even if MSVC is installed. Only used on Windows.', False),
]
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 1cb8cb0fc8..2ce55d98be 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -65,7 +65,7 @@ def get_opts():
EnumVariable('debug_symbols', 'Add debug symbols to release version', 'yes', ('yes', 'no', 'full')),
BoolVariable('separate_debug_symbols', 'Create a separate file with the debug symbols', False),
('msvc_version', 'MSVC version to use. Ignored if VCINSTALLDIR is set in shell env.', None),
- (BoolVariable('use_mingw', 'Use the Mingw compiler, even if MSVC is installed. Only used on Windows.', False)),
+ BoolVariable('use_mingw', 'Use the Mingw compiler, even if MSVC is installed. Only used on Windows.', False),
]
@@ -320,8 +320,9 @@ def configure(env):
print("Configuring for Windows: target=%s, bits=%s" % (env['target'], env['bits']))
- env['ENV'] = os.environ # this makes build less repeatable, but simplifies some things
- env['ENV']['TMP'] = os.environ['TMP']
+ if (os.name == "nt"):
+ env['ENV'] = os.environ # this makes build less repeatable, but simplifies some things
+ env['ENV']['TMP'] = os.environ['TMP']
# First figure out which compiler, version, and target arch we're using
if os.getenv("VCINSTALLDIR"):