summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/script_debugger_remote.cpp9
-rw-r--r--scene/resources/sample.cpp6
2 files changed, 11 insertions, 4 deletions
diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp
index 299572fbff..b56ff4c0e1 100644
--- a/core/script_debugger_remote.cpp
+++ b/core/script_debugger_remote.cpp
@@ -30,7 +30,7 @@
#include "os/os.h"
#include "io/ip.h"
#include "globals.h"
-
+#include "os/input.h"
void ScriptDebuggerRemote::_send_video_memory() {
List<ResourceUsage> usage;
@@ -135,6 +135,10 @@ void ScriptDebuggerRemote::debug(ScriptLanguage *p_script,bool p_can_continue) {
packet_peer_stream->put_var(p_can_continue);
packet_peer_stream->put_var(p_script->debug_get_error());
+ Input::MouseMode mouse_mode=Input::get_singleton()->get_mouse_mode();
+ if (mouse_mode!=Input::MOUSE_MODE_VISIBLE)
+ Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
+
while(true) {
@@ -296,6 +300,9 @@ void ScriptDebuggerRemote::debug(ScriptLanguage *p_script,bool p_can_continue) {
packet_peer_stream->put_var("debug_exit");
packet_peer_stream->put_var(0);
+ if (mouse_mode!=Input::MOUSE_MODE_VISIBLE)
+ Input::get_singleton()->set_mouse_mode(mouse_mode);
+
}
diff --git a/scene/resources/sample.cpp b/scene/resources/sample.cpp
index 0354cbc3b2..4b25a2c490 100644
--- a/scene/resources/sample.cpp
+++ b/scene/resources/sample.cpp
@@ -210,11 +210,11 @@ void Sample::_bind_methods(){
ADD_PROPERTY( PropertyInfo( Variant::DICTIONARY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), _SCS("_set_data"), _SCS("_get_data") );
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "stereo"), _SCS(""), _SCS("is_stereo") );
- ADD_PROPERTY( PropertyInfo( Variant::INT, "length"), _SCS(""), _SCS("get_length") );
+ ADD_PROPERTY( PropertyInfo( Variant::INT, "length",PROPERTY_HINT_RANGE,"0,999999999"), _SCS(""), _SCS("get_length") );
ADD_PROPERTY( PropertyInfo( Variant::INT, "mix_rate", PROPERTY_HINT_RANGE,"1,192000,1" ), _SCS("set_mix_rate"), _SCS("get_mix_rate") );
ADD_PROPERTY( PropertyInfo( Variant::INT, "loop_format", PROPERTY_HINT_ENUM,"None,Forward,PingPong" ), _SCS("set_loop_format"), _SCS("get_loop_format") );
- ADD_PROPERTY( PropertyInfo( Variant::INT, "loop_begin", PROPERTY_HINT_RANGE,"0,"+itos(99999999)+",1"), _SCS("set_loop_begin"), _SCS("get_loop_begin") );
- ADD_PROPERTY( PropertyInfo( Variant::INT, "loop_end", PROPERTY_HINT_RANGE,"0,"+itos(99999999)+",1"), _SCS("set_loop_end"), _SCS("get_loop_end") );
+ ADD_PROPERTY( PropertyInfo( Variant::INT, "loop_begin", PROPERTY_HINT_RANGE,"0,"+itos(999999999)+",1"), _SCS("set_loop_begin"), _SCS("get_loop_begin") );
+ ADD_PROPERTY( PropertyInfo( Variant::INT, "loop_end", PROPERTY_HINT_RANGE,"0,"+itos(999999999)+",1"), _SCS("set_loop_end"), _SCS("get_loop_end") );
BIND_CONSTANT( FORMAT_PCM8 );
BIND_CONSTANT( FORMAT_PCM16 );