From 101112d6fddee3d6dc4abd8b3f43de24a91cb0a7 Mon Sep 17 00:00:00 2001 From: sanikoyes Date: Tue, 11 Mar 2014 13:21:18 +0800 Subject: [PATCH 1/4] fix-multi-char-ime-input-chinese --- platform/windows/os_windows.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 090fe64b19e..801bb9332a6 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -608,6 +608,28 @@ void OS_Windows::process_key_events() { switch(ke.uMsg) { case WM_CHAR: { + if ((i==0 && ke.uMsg==WM_CHAR) || (i>0 && key_event_buffer[i-1].uMsg==WM_CHAR)) + { + InputEvent event; + event.type=InputEvent::KEY; + event.ID=++last_id; + InputEventKey &k=event.key; + + + k.mod=ke.mod_state; + k.pressed=true; + k.scancode=KeyMappingWindows::get_keysym(ke.wParam); + k.unicode=ke.wParam; + if (k.unicode && gr_mem) { + k.mod.alt=false; + k.mod.control=false; + } + + if (k.unicode<32) + k.unicode=0; + + input->parse_input_event(event); + } //do nothing } break; From cde48d0c9c16867edbb4fc4e3c186933564b6da0 Mon Sep 17 00:00:00 2001 From: sanikoyes Date: Tue, 11 Mar 2014 13:30:33 +0800 Subject: [PATCH 2/4] fix gdscript path parse error --- modules/gdscript/gd_parser.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp index fb4f56aa8fe..f962f8c5fbd 100644 --- a/modules/gdscript/gd_parser.cpp +++ b/modules/gdscript/gd_parser.cpp @@ -215,6 +215,7 @@ GDParser::Node* GDParser::_parse_expression(Node *p_parent,bool p_static,bool p_ String path = tokenizer->get_token_constant(); if (!path.is_abs_path() && base_path!="") path=base_path+"/"+path; + path = path.replace("///","//"); Ref res = ResourceLoader::load(path); if (!res.is_valid()) { From 87fd1532159c18efc06524f2715ed74b3e32ddee Mon Sep 17 00:00:00 2001 From: sanikoyes Date: Tue, 11 Mar 2014 13:38:30 +0800 Subject: [PATCH 3/4] fixed editor NodePath property --- tools/editor/editor_node.h | 2 ++ tools/editor/scene_tree_editor.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h index 87f17247c3d..e35467e788a 100644 --- a/tools/editor/editor_node.h +++ b/tools/editor/editor_node.h @@ -410,6 +410,8 @@ public: static void add_editor_plugin(EditorPlugin *p_editor); static void remove_editor_plugin(EditorPlugin *p_editor); + static EditorNode * get_singleton() { return singleton; } + void edit_node(Node *p_node); void edit_resource(const Ref& p_resource); diff --git a/tools/editor/scene_tree_editor.cpp b/tools/editor/scene_tree_editor.cpp index 89b7e54195c..1d2c864c993 100644 --- a/tools/editor/scene_tree_editor.cpp +++ b/tools/editor/scene_tree_editor.cpp @@ -706,7 +706,8 @@ void SceneTreeDialog::_cancel() { void SceneTreeDialog::_select() { if (tree->get_selected()) { - emit_signal("selected",tree->get_selected()->get_path()); + Node *scene = EditorNode::get_singleton()->get_edited_scene(); + emit_signal("selected","/root/" + scene->get_parent()->get_path_to(tree->get_selected())); hide(); } } From 4927acd7ad718cb7b3f720bb48742928393160e3 Mon Sep 17 00:00:00 2001 From: sanikoyes Date: Tue, 11 Mar 2014 13:57:59 +0800 Subject: [PATCH 4/4] export a unicode font may crash because chunks out of range... set MemoryPoolDynamicStatic::MAX_CHUNKS to 65536 --- core/os/memory_pool_dynamic_static.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/os/memory_pool_dynamic_static.h b/core/os/memory_pool_dynamic_static.h index ce038bc00ab..d10cdb3d0a7 100644 --- a/core/os/memory_pool_dynamic_static.h +++ b/core/os/memory_pool_dynamic_static.h @@ -38,7 +38,7 @@ class MemoryPoolDynamicStatic : public MemoryPoolDynamic { _THREAD_SAFE_CLASS_ enum { - MAX_CHUNKS=16384 + MAX_CHUNKS=65536 };