diff options
Diffstat (limited to 'platform/x11')
-rw-r--r-- | platform/x11/export/export.cpp | 23 | ||||
-rw-r--r-- | platform/x11/godot_x11.cpp | 9 | ||||
-rw-r--r-- | platform/x11/os_x11.cpp | 7 |
3 files changed, 34 insertions, 5 deletions
diff --git a/platform/x11/export/export.cpp b/platform/x11/export/export.cpp index 5a4751b387..5c7f98c1f3 100644 --- a/platform/x11/export/export.cpp +++ b/platform/x11/export/export.cpp @@ -28,11 +28,27 @@ /*************************************************************************/ #include "export.h" #include "platform/x11/logo.h" -#include "tools/editor/editor_import_export.h" +#include "tools/editor/editor_export.h" #include "scene/resources/texture.h" -#if 0 + + + void register_x11_exporter() { + Ref<EditorExportPlatformPC> platform; + platform.instance(); + + Image img(_x11_logo); + Ref<ImageTexture> logo; + logo.instance(); + logo->create_from_image(img); + platform->set_logo(logo); + platform->set_name("Linux/X11"); + platform->set_extension(""); + + EditorExport::get_singleton()->add_export_platform(platform); + + #if 0 Image img(_x11_logo); Ref<ImageTexture> logo = memnew( ImageTexture ); logo->create_from_image(img); @@ -49,5 +65,6 @@ void register_x11_exporter() { EditorImportExport::get_singleton()->add_export_platform(exporter); } + #endif } -#endif + diff --git a/platform/x11/godot_x11.cpp b/platform/x11/godot_x11.cpp index f85ba17020..b727ecbd17 100644 --- a/platform/x11/godot_x11.cpp +++ b/platform/x11/godot_x11.cpp @@ -26,6 +26,9 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ +#include <unistd.h> +#include <limits.h> + #include "main/main.h" #include "os_x11.h" @@ -33,6 +36,9 @@ int main(int argc, char* argv[]) { OS_X11 os; + char *cwd = (char*)malloc(PATH_MAX); + getcwd(cwd, PATH_MAX); + Error err = Main::setup(argv[0],argc-1,&argv[1]); if (err!=OK) return 255; @@ -41,5 +47,8 @@ int main(int argc, char* argv[]) { os.run(); // it is actually the OS that decides how to run Main::cleanup(); + chdir(cwd); + free(cwd); + return os.get_exit_code(); } diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index e792d0465e..a4ed08f330 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -464,6 +464,9 @@ void OS_X11::finalize() { memdelete(main_loop); main_loop=NULL; + for (int i = 0; i < get_audio_driver_count(); i++) { + AudioDriverManager::get_driver(i)->finish(); + } /* if (debugger_connection_console) { @@ -476,7 +479,6 @@ void OS_X11::finalize() { #endif memdelete(input); - visual_server->finish(); memdelete(visual_server); //memdelete(rasterizer); @@ -512,6 +514,7 @@ void OS_X11::finalize() { args.clear(); + } @@ -1238,7 +1241,7 @@ static Property read_property(Display* p_display, Window p_window, Atom p_proper }while(bytes_after != 0); - Property p = {ret, actual_format, nitems, actual_type}; + Property p = {ret, actual_format, (int)nitems, actual_type}; return p; } |