diff options
-rw-r--r-- | core/variant_parser.cpp | 26 | ||||
-rw-r--r-- | platform/osx/os_osx.mm | 29 | ||||
-rw-r--r-- | platform/x11/os_x11.cpp | 3 |
3 files changed, 57 insertions, 1 deletions
diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp index 43938c7594..2d5b892583 100644 --- a/core/variant_parser.cpp +++ b/core/variant_parser.cpp @@ -120,6 +120,20 @@ Error VariantParser::get_token(Stream *p_stream, Token& r_token, int &line, Stri r_token.type=TK_COLON; return OK; }; + case ';': { + + while(true) { + CharType ch=p_stream->get_char(); + if (p_stream->is_eof()) { + r_token.type=TK_EOF; + return OK; + } + if (ch=='\n') + break; + } + + break; + }; case ',': { r_token.type=TK_COMMA; @@ -1591,6 +1605,18 @@ Error VariantParser::parse_tag_assign_eof(Stream *p_stream, int &line, String &r if (p_stream->is_eof()) return ERR_FILE_EOF; + if (c==';') { //comment + while(true) { + CharType ch=p_stream->get_char(); + if (p_stream->is_eof()) { + return ERR_FILE_EOF; + } + if (ch=='\n') + break; + } + continue; + } + if (c=='[' && what.length()==0) { //it's a tag! p_stream->saved='['; //go back one diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 5a06d4b0e7..85145db3a9 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -1056,6 +1056,33 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi void OS_OSX::finalize() { CFNotificationCenterRemoveObserver(CFNotificationCenterGetDistributedCenter(), NULL, kTISNotifySelectedKeyboardInputSourceChanged, NULL); + delete_main_loop(); + + spatial_sound_server->finish(); + memdelete(spatial_sound_server); + spatial_sound_2d_server->finish(); + memdelete(spatial_sound_2d_server); + + + memdelete(input); + + memdelete(sample_manager); + + audio_server->finish(); + memdelete(audio_server); + + visual_server->finish(); + memdelete(visual_server); + memdelete(rasterizer); + + physics_server->finish(); + memdelete(physics_server); + + physics_2d_server->finish(); + memdelete(physics_2d_server); + + screens.clear(); + } @@ -1068,6 +1095,8 @@ void OS_OSX::set_main_loop( MainLoop * p_main_loop ) { void OS_OSX::delete_main_loop() { + if (!main_loop) + return; memdelete(main_loop); main_loop=NULL; } diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 0afab6442b..2ce9b519d1 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -447,6 +447,8 @@ void OS_X11::finalize() { // memdelete(debugger_connection_console); //} + memdelete(input); + memdelete(sample_manager); audio_server->finish(); @@ -464,7 +466,6 @@ void OS_X11::finalize() { #ifdef JOYDEV_ENABLED memdelete(joystick); #endif - memdelete(input); XUnmapWindow( x11_display, x11_window ); XDestroyWindow( x11_display, x11_window ); |