diff options
Diffstat (limited to 'platform/linuxbsd/godot_linuxbsd.cpp')
-rw-r--r-- | platform/linuxbsd/godot_linuxbsd.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/platform/linuxbsd/godot_linuxbsd.cpp b/platform/linuxbsd/godot_linuxbsd.cpp index 710ba3ca40..6f5c46b59c 100644 --- a/platform/linuxbsd/godot_linuxbsd.cpp +++ b/platform/linuxbsd/godot_linuxbsd.cpp @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -37,11 +37,13 @@ #include "os_linuxbsd.h" int main(int argc, char *argv[]) { - OS_LinuxBSD os; setlocale(LC_CTYPE, ""); + // We must override main when testing is enabled + TEST_MAIN_OVERRIDE + char *cwd = (char *)malloc(PATH_MAX); ERR_FAIL_COND_V(!cwd, ERR_OUT_OF_MEMORY); char *ret = getcwd(cwd, PATH_MAX); @@ -52,8 +54,9 @@ int main(int argc, char *argv[]) { return 255; } - if (Main::start()) + if (Main::start()) { os.run(); // it is actually the OS that decides how to run + } Main::cleanup(); if (ret) { // Previous getcwd was successful |