diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/export/export.cpp | 6 | ||||
-rw-r--r-- | platform/android/java/src/com/android/vending/licensing/Obfuscator.java | 2 | ||||
-rw-r--r-- | platform/android/java/src/org/godotengine/godot/Godot.java | 2 | ||||
-rw-r--r-- | platform/android/java/src/org/godotengine/godot/GodotIO.java | 2 | ||||
-rw-r--r-- | platform/android/java_class_wrapper.h | 32 | ||||
-rw-r--r-- | platform/android/java_glue.cpp | 2 | ||||
-rw-r--r-- | platform/haiku/haiku_direct_window.cpp | 2 | ||||
-rwxr-xr-x | platform/iphone/gl_view.mm | 2 | ||||
-rw-r--r-- | platform/iphone/os_iphone.cpp | 6 | ||||
-rw-r--r-- | platform/iphone/rasterizer_iphone.cpp | 4 | ||||
-rw-r--r-- | platform/uwp/export/export.cpp | 2 | ||||
-rw-r--r-- | platform/windows/context_gl_win.cpp | 2 | ||||
-rw-r--r-- | platform/windows/detect.py | 2 | ||||
-rw-r--r-- | platform/windows/packet_peer_udp_winsock.cpp | 25 | ||||
-rw-r--r-- | platform/windows/packet_peer_udp_winsock.h | 4 | ||||
-rw-r--r-- | platform/x11/os_x11.cpp | 6 |
16 files changed, 52 insertions, 49 deletions
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index eeb8c886ca..2342829965 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -2725,7 +2725,7 @@ class EditorExportAndroid : public EditorExportPlatform { Vector<String> string_table; - String version_name = p_preset->get("version/name"); + String package_name = p_preset->get("package/name"); //printf("stirng block len: %i\n",string_block_len); //printf("stirng count: %i\n",string_count); @@ -2742,7 +2742,7 @@ class EditorExportAndroid : public EditorExportPlatform { if (str == "godot-project-name") { //project name - str = get_project_name(version_name); + str = get_project_name(package_name); } else { @@ -2751,7 +2751,7 @@ class EditorExportAndroid : public EditorExportPlatform { if (GlobalConfig::get_singleton()->has(prop)) { str = GlobalConfig::get_singleton()->get(prop); } else { - str = get_project_name(version_name); + str = get_project_name(package_name); } } } diff --git a/platform/android/java/src/com/android/vending/licensing/Obfuscator.java b/platform/android/java/src/com/android/vending/licensing/Obfuscator.java index b5d510d72d..88891728e6 100644 --- a/platform/android/java/src/com/android/vending/licensing/Obfuscator.java +++ b/platform/android/java/src/com/android/vending/licensing/Obfuscator.java @@ -20,7 +20,7 @@ package com.google.android.vending.licensing; * Interface used as part of a {@link Policy} to allow application authors to obfuscate * licensing data that will be stored into a SharedPreferences file. * <p> - * Any transformation scheme must be reversable. Implementing classes may optionally implement an + * Any transformation scheme must be reversible. Implementing classes may optionally implement an * integrity check to further prevent modification to preference data. Implementing classes * should use device-specific information as a key in the obfuscation algorithm to prevent * obfuscated preferences from being shared among devices. diff --git a/platform/android/java/src/org/godotengine/godot/Godot.java b/platform/android/java/src/org/godotengine/godot/Godot.java index f970cf1140..0cec0c5773 100644 --- a/platform/android/java/src/org/godotengine/godot/Godot.java +++ b/platform/android/java/src/org/godotengine/godot/Godot.java @@ -340,7 +340,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC r = is.read(len); if (r<4) { - Log.d("GODOT", "**ERROR** Wrong cmdline param lenght.\n"); + Log.d("GODOT", "**ERROR** Wrong cmdline param length.\n"); return new String[0]; } int strlen=((int)(len[3]&0xFF)<<24) | ((int)(len[2]&0xFF)<<16) | ((int)(len[1]&0xFF)<<8) | ((int)(len[0]&0xFF)); diff --git a/platform/android/java/src/org/godotengine/godot/GodotIO.java b/platform/android/java/src/org/godotengine/godot/GodotIO.java index 33c1c03ace..d6ceef8768 100644 --- a/platform/android/java/src/org/godotengine/godot/GodotIO.java +++ b/platform/android/java/src/org/godotengine/godot/GodotIO.java @@ -469,7 +469,7 @@ public class GodotIO { } ///////////////////////// - // MISCELANEOUS OS IO + // MISCELLANEOUS OS IO ///////////////////////// diff --git a/platform/android/java_class_wrapper.h b/platform/android/java_class_wrapper.h index dcc9973446..12ef92c45b 100644 --- a/platform/android/java_class_wrapper.h +++ b/platform/android/java_class_wrapper.h @@ -68,9 +68,9 @@ class JavaClass : public Reference { jmethodID method; }; - _FORCE_INLINE_ static void _convert_to_variant_type(int p_sig, Variant::Type &r_type, float &likelyhood) { + _FORCE_INLINE_ static void _convert_to_variant_type(int p_sig, Variant::Type &r_type, float &likelihood) { - likelyhood = 1.0; + likelihood = 1.0; r_type = Variant::NIL; switch (p_sig) { @@ -81,37 +81,37 @@ class JavaClass : public Reference { case ARG_TYPE_BYTE | ARG_NUMBER_CLASS_BIT: case ARG_TYPE_BYTE: r_type = Variant::INT; - likelyhood = 0.1; + likelihood = 0.1; break; case ARG_TYPE_CHAR | ARG_NUMBER_CLASS_BIT: case ARG_TYPE_CHAR: r_type = Variant::INT; - likelyhood = 0.2; + likelihood = 0.2; break; case ARG_TYPE_SHORT | ARG_NUMBER_CLASS_BIT: case ARG_TYPE_SHORT: r_type = Variant::INT; - likelyhood = 0.3; + likelihood = 0.3; break; case ARG_TYPE_INT | ARG_NUMBER_CLASS_BIT: case ARG_TYPE_INT: r_type = Variant::INT; - likelyhood = 1.0; + likelihood = 1.0; break; case ARG_TYPE_LONG | ARG_NUMBER_CLASS_BIT: case ARG_TYPE_LONG: r_type = Variant::INT; - likelyhood = 0.5; + likelihood = 0.5; break; case ARG_TYPE_FLOAT | ARG_NUMBER_CLASS_BIT: case ARG_TYPE_FLOAT: r_type = Variant::REAL; - likelyhood = 1.0; + likelihood = 1.0; break; case ARG_TYPE_DOUBLE | ARG_NUMBER_CLASS_BIT: case ARG_TYPE_DOUBLE: r_type = Variant::REAL; - likelyhood = 0.5; + likelihood = 0.5; break; case ARG_TYPE_STRING: r_type = Variant::STRING; break; case ARG_TYPE_CLASS: r_type = Variant::OBJECT; break; @@ -119,31 +119,31 @@ class JavaClass : public Reference { case ARG_ARRAY_BIT | ARG_TYPE_BOOLEAN: r_type = Variant::ARRAY; break; case ARG_ARRAY_BIT | ARG_TYPE_BYTE: r_type = Variant::POOL_BYTE_ARRAY; - likelyhood = 1.0; + likelihood = 1.0; break; case ARG_ARRAY_BIT | ARG_TYPE_CHAR: r_type = Variant::POOL_BYTE_ARRAY; - likelyhood = 0.5; + likelihood = 0.5; break; case ARG_ARRAY_BIT | ARG_TYPE_SHORT: r_type = Variant::POOL_INT_ARRAY; - likelyhood = 0.3; + likelihood = 0.3; break; case ARG_ARRAY_BIT | ARG_TYPE_INT: r_type = Variant::POOL_INT_ARRAY; - likelyhood = 1.0; + likelihood = 1.0; break; case ARG_ARRAY_BIT | ARG_TYPE_LONG: r_type = Variant::POOL_INT_ARRAY; - likelyhood = 0.5; + likelihood = 0.5; break; case ARG_ARRAY_BIT | ARG_TYPE_FLOAT: r_type = Variant::POOL_REAL_ARRAY; - likelyhood = 1.0; + likelihood = 1.0; break; case ARG_ARRAY_BIT | ARG_TYPE_DOUBLE: r_type = Variant::POOL_REAL_ARRAY; - likelyhood = 0.5; + likelihood = 0.5; break; case ARG_ARRAY_BIT | ARG_TYPE_STRING: r_type = Variant::POOL_STRING_ARRAY; break; case ARG_ARRAY_BIT | ARG_TYPE_CLASS: r_type = Variant::ARRAY; break; diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp index 7f5893dbdf..06ef581813 100644 --- a/platform/android/java_glue.cpp +++ b/platform/android/java_glue.cpp @@ -881,7 +881,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *en __android_log_print(ANDROID_LOG_INFO, "godot", "*****SETUP OK"); - //video driver is determined here, because once initialized, it cant be changed + //video driver is determined here, because once initialized, it can't be changed String vd = GlobalConfig::get_singleton()->get("display/driver"); env->CallVoidMethod(_godot_instance, _on_video_init, (jboolean) true); diff --git a/platform/haiku/haiku_direct_window.cpp b/platform/haiku/haiku_direct_window.cpp index bc2dbb9b8f..3ed7a84eb5 100644 --- a/platform/haiku/haiku_direct_window.cpp +++ b/platform/haiku/haiku_direct_window.cpp @@ -289,7 +289,7 @@ void HaikuDirectWindow::HandleKeyboardEvent(BMessage *message) { event.key.unicode = BUnicodeChar::FromUTF8(&bytes); } - //make it consistent accross platforms. + //make it consistent across platforms. if (event.key.scancode == KEY_BACKTAB) { event.key.scancode = KEY_TAB; event.key.mod.shift = true; diff --git a/platform/iphone/gl_view.mm b/platform/iphone/gl_view.mm index adc76a622e..6850b6be38 100755 --- a/platform/iphone/gl_view.mm +++ b/platform/iphone/gl_view.mm @@ -331,7 +331,7 @@ static void clear_touches() { glBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer); glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer); // This call associates the storage for the current render buffer with the EAGLDrawable (our CAEAGLLayer) - // allowing us to draw into a buffer that will later be rendered to screen whereever the layer is (which corresponds with our view). + // allowing us to draw into a buffer that will later be rendered to screen wherever the layer is (which corresponds with our view). [context renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable:(id<EAGLDrawable>)self.layer]; glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, viewRenderbuffer); diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp index 57862131f9..752690762e 100644 --- a/platform/iphone/os_iphone.cpp +++ b/platform/iphone/os_iphone.cpp @@ -325,7 +325,7 @@ void OSIPhone::update_accelerometer(float p_x, float p_y, float p_z) { InputEvent ev; ev.type = InputEvent::JOYPAD_MOTION; ev.device = 0; - ev.joy_motion.axis = JOY_ANALOG_0_X; + ev.joy_motion.axis = JOY_ANALOG_0; ev.joy_motion.axis_value = (p_x / (float)ACCEL_RANGE); ev.ID = ++last_event_id; last_accel.x = p_x; @@ -336,7 +336,7 @@ void OSIPhone::update_accelerometer(float p_x, float p_y, float p_z) { InputEvent ev; ev.type = InputEvent::JOYPAD_MOTION; ev.device = 0; - ev.joy_motion.axis = JOY_ANALOG_0_Y; + ev.joy_motion.axis = JOY_ANALOG_1; ev.joy_motion.axis_value = (p_y / (float)ACCEL_RANGE); ev.ID = ++last_event_id; last_accel.y = p_y; @@ -347,7 +347,7 @@ void OSIPhone::update_accelerometer(float p_x, float p_y, float p_z) { InputEvent ev; ev.type = InputEvent::JOYPAD_MOTION; ev.device = 0; - ev.joy_motion.axis = JOY_ANALOG_1_X; + ev.joy_motion.axis = JOY_ANALOG_2; ev.joy_motion.axis_value = ( (1.0 - p_z) / (float)ACCEL_RANGE); ev.ID = ++last_event_id; last_accel.z = p_z; diff --git a/platform/iphone/rasterizer_iphone.cpp b/platform/iphone/rasterizer_iphone.cpp index 1a619f4305..14288e4ba0 100644 --- a/platform/iphone/rasterizer_iphone.cpp +++ b/platform/iphone/rasterizer_iphone.cpp @@ -1867,7 +1867,7 @@ void RasterizerIPhone::_setup_light(LightInstance *p_instance, int p_idx) { switch (ld->type) { case VS::LIGHT_DIRECTIONAL: { - /* This doesnt have attenuation */ + /* This doesn't have attenuation */ glMatrixMode(GL_MODELVIEW); glPushMatrix(); @@ -2088,7 +2088,7 @@ void RasterizerIPhone::_render_list_forward(RenderList *p_render_list) { uint64_t prev_light_hash = 0; const Skeleton *prev_skeleton = NULL; const Geometry *prev_geometry = NULL; - const ParamOverrideMap *prev_overrides = NULL; // make it diferent than NULL + const ParamOverrideMap *prev_overrides = NULL; // make it different than NULL Geometry::Type prev_geometry_type = Geometry::GEOMETRY_INVALID; diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp index a9b26056fc..bef19d80ae 100644 --- a/platform/uwp/export/export.cpp +++ b/platform/uwp/export/export.cpp @@ -1032,7 +1032,7 @@ void AppxPackager::finish() { Error err = read_cert_file(certificate_path, certificate_pass, &cert_file); if (err != OK) { - EditorNode::add_io_error(TTR("Couldn't read the certficate file. Are the path and password both correct?")); + EditorNode::add_io_error(TTR("Couldn't read the certificate file. Are the path and password both correct?")); package->close(); memdelete(package); package = NULL; diff --git a/platform/windows/context_gl_win.cpp b/platform/windows/context_gl_win.cpp index d737502bf5..449ac264a6 100644 --- a/platform/windows/context_gl_win.cpp +++ b/platform/windows/context_gl_win.cpp @@ -169,7 +169,7 @@ Error ContextGL_Win::initialize() { if (wglCreateContextAttribsARB == NULL) //OpenGL 3.0 is not supported { - MessageBox(NULL, "Cannot get Proc Adress for CreateContextAttribs", "ERROR", MB_OK | MB_ICONEXCLAMATION); + MessageBox(NULL, "Cannot get Proc Address for CreateContextAttribs", "ERROR", MB_OK | MB_ICONEXCLAMATION); wglDeleteContext(hRC); return ERR_CANT_CREATE; } diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 382783d6bc..a3e410ec64 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -283,7 +283,7 @@ def configure(env): + " will be executed and inform you.") sys.exit() - # Forcing bits argument because MSVC does not have a flag to set this through SCons... it's different compilers (cl.exe's) called from the propper command prompt + # Forcing bits argument because MSVC does not have a flag to set this through SCons... it's different compilers (cl.exe's) called from the proper command prompt # that decide the architecture that is build for. Scons can only detect the os.getenviron (because vsvarsall.bat sets a lot of stuff for cl.exe to work with) env["bits"] = "32" env["x86_libtheora_opt_vc"] = True diff --git a/platform/windows/packet_peer_udp_winsock.cpp b/platform/windows/packet_peer_udp_winsock.cpp index 2df8addece..d98b64df7c 100644 --- a/platform/windows/packet_peer_udp_winsock.cpp +++ b/platform/windows/packet_peer_udp_winsock.cpp @@ -82,7 +82,7 @@ Error PacketPeerUDPWinsock::put_packet(const uint8_t *p_buffer, int p_buffer_siz struct sockaddr_storage addr; size_t addr_size = _set_sockaddr(&addr, peer_addr, peer_port, sock_type); - _set_blocking(true); + _set_sock_blocking(blocking); errno = 0; int err; @@ -90,7 +90,9 @@ Error PacketPeerUDPWinsock::put_packet(const uint8_t *p_buffer, int p_buffer_siz if (WSAGetLastError() != WSAEWOULDBLOCK) { return FAILED; - }; + } else if (!blocking) { + return ERR_UNAVAILABLE; + } } return OK; @@ -101,15 +103,13 @@ int PacketPeerUDPWinsock::get_max_packet_size() const { return 512; // uhm maybe not } -void PacketPeerUDPWinsock::_set_blocking(bool p_blocking) { - //am no windows expert - //hope this is the right thing +void PacketPeerUDPWinsock::_set_sock_blocking(bool p_blocking) { - if (blocking == p_blocking) + if (sock_blocking == p_blocking) return; - blocking = p_blocking; - unsigned long par = blocking ? 0 : 1; + sock_blocking = p_blocking; + unsigned long par = sock_blocking ? 0 : 1; if (ioctlsocket(sockfd, FIONBIO, &par)) { perror("setting non-block mode"); //close(); @@ -139,8 +139,6 @@ Error PacketPeerUDPWinsock::listen(int p_port, IP_Address p_bind_address, int p_ return ERR_UNAVAILABLE; } - blocking = true; - printf("UDP Connection listening on port %i\n", p_port); rb.resize(nearest_shift(p_recv_buffer_size)); return OK; @@ -166,7 +164,7 @@ Error PacketPeerUDPWinsock::_poll(bool p_wait) { return FAILED; } - _set_blocking(p_wait); + _set_sock_blocking(p_wait); struct sockaddr_storage from = { 0 }; int len = sizeof(struct sockaddr_storage); @@ -252,6 +250,9 @@ int PacketPeerUDPWinsock::_get_socket() { sockfd = _socket_create(sock_type, SOCK_DGRAM, IPPROTO_UDP); + if (sockfd != -1) + _set_sock_blocking(false); + return sockfd; } @@ -273,6 +274,8 @@ PacketPeerUDP *PacketPeerUDPWinsock::_create() { PacketPeerUDPWinsock::PacketPeerUDPWinsock() { + blocking = true; + sock_blocking = true; sockfd = -1; packet_port = 0; queue_count = 0; diff --git a/platform/windows/packet_peer_udp_winsock.h b/platform/windows/packet_peer_udp_winsock.h index 62107364af..6b37aefead 100644 --- a/platform/windows/packet_peer_udp_winsock.h +++ b/platform/windows/packet_peer_udp_winsock.h @@ -45,6 +45,7 @@ class PacketPeerUDPWinsock : public PacketPeerUDP { mutable int packet_port; mutable int queue_count; int sockfd; + bool sock_blocking; IP::Type sock_type; IP_Address peer_addr; @@ -54,8 +55,7 @@ class PacketPeerUDPWinsock : public PacketPeerUDP { static PacketPeerUDP *_create(); - bool blocking; - void _set_blocking(bool p_blocking); + void _set_sock_blocking(bool p_blocking); Error _poll(bool p_wait); diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index d7cb69f2b9..fe162370aa 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -1019,7 +1019,7 @@ void OS_X11::handle_key_event(XKeyEvent *p_event, bool p_echo) { // XKeycodeToKeysym to obtain internationalized // input.. WRONG!! // you must use XLookupString (???) which not only wastes - // cycles generating an unnecesary string, but also + // cycles generating an unnecessary string, but also // still works in half the cases. (won't handle deadkeys) // For more complex input methods (deadkeys and more advanced) // you have to use XmbLookupString (??). @@ -1075,7 +1075,7 @@ void OS_X11::handle_key_event(XKeyEvent *p_event, bool p_echo) { /* Phase 4, determine if event must be filtered */ // This seems to be a side-effect of using XIM. - // XEventFilter looks like a core X11 funciton, + // XEventFilter looks like a core X11 function, // but it's actually just used to see if we must // ignore a deadkey, or events XIM determines // must not reach the actual gui. @@ -1157,7 +1157,7 @@ void OS_X11::handle_key_event(XKeyEvent *p_event, bool p_echo) { event.key.echo = p_echo; if (event.key.scancode == KEY_BACKTAB) { - //make it consistent accross platforms. + //make it consistent across platforms. event.key.scancode = KEY_TAB; event.key.mod.shift = true; } |