diff options
Diffstat (limited to 'platform/x11')
| -rw-r--r-- | platform/x11/detect.py | 9 | ||||
| -rw-r--r-- | platform/x11/export/export.cpp | 2 | ||||
| -rw-r--r-- | platform/x11/os_x11.cpp | 14 | ||||
| -rw-r--r-- | platform/x11/os_x11.h | 2 | ||||
| -rw-r--r-- | platform/x11/power_x11.cpp | 25 |
5 files changed, 43 insertions, 9 deletions
diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 34306c8d0f..0ba0f68393 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -141,6 +141,15 @@ def configure(env): env.ParseConfig('pkg-config xrandr --cflags --libs') if (env['builtin_openssl'] == 'no'): + # Currently not compatible with OpenSSL 1.1.0+ + # https://github.com/godotengine/godot/issues/8624 + import subprocess + openssl_version = subprocess.check_output(['pkg-config', 'openssl', '--modversion']).strip('\n') + if (openssl_version >= "1.1.0"): + print("Error: Found system-installed OpenSSL %s, currently only supporting version 1.0.x." % openssl_version) + print("Aborting.. You can compile with 'builtin_openssl=yes' to use the bundled version.\n") + sys.exit(255) + env.ParseConfig('pkg-config openssl --cflags --libs') if (env['builtin_libwebp'] == 'no'): diff --git a/platform/x11/export/export.cpp b/platform/x11/export/export.cpp index b9ded188bf..d6bad95e5b 100644 --- a/platform/x11/export/export.cpp +++ b/platform/x11/export/export.cpp @@ -37,7 +37,7 @@ void register_x11_exporter() { Ref<EditorExportPlatformPC> platform; platform.instance(); - Image img(_x11_logo); + Ref<Image> img = memnew(Image(_x11_logo)); Ref<ImageTexture> logo; logo.instance(); logo->create_from_image(img); diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 2e2fe3ba8a..59ac1fed96 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -1857,15 +1857,15 @@ void OS_X11::alert(const String &p_alert, const String &p_title) { execute("/usr/bin/xmessage", args, true); } -void OS_X11::set_icon(const Image &p_icon) { +void OS_X11::set_icon(const Ref<Image> &p_icon) { Atom net_wm_icon = XInternAtom(x11_display, "_NET_WM_ICON", False); - if (!p_icon.empty()) { - Image img = p_icon; - img.convert(Image::FORMAT_RGBA8); + if (p_icon.is_valid()) { + Ref<Image> img = p_icon->duplicate(); + img->convert(Image::FORMAT_RGBA8); - int w = img.get_width(); - int h = img.get_height(); + int w = img->get_width(); + int h = img->get_height(); // We're using long to have wordsize (32Bit build -> 32 Bits, 64 Bit build -> 64 Bits Vector<long> pd; @@ -1875,7 +1875,7 @@ void OS_X11::set_icon(const Image &p_icon) { pd[0] = w; pd[1] = h; - PoolVector<uint8_t>::Read r = img.get_data().read(); + PoolVector<uint8_t>::Read r = img->get_data().read(); long *wr = &pd[2]; uint8_t const *pr = r.ptr(); diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h index 44994e40ec..7f01f9c617 100644 --- a/platform/x11/os_x11.h +++ b/platform/x11/os_x11.h @@ -206,7 +206,7 @@ public: virtual int get_mouse_button_state() const; virtual void set_window_title(const String &p_title); - virtual void set_icon(const Image &p_icon); + virtual void set_icon(const Ref<Image> &p_icon); virtual MainLoop *get_main_loop() const; diff --git a/platform/x11/power_x11.cpp b/platform/x11/power_x11.cpp index 3454a6313e..093d24f406 100644 --- a/platform/x11/power_x11.cpp +++ b/platform/x11/power_x11.cpp @@ -28,6 +28,31 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ +/* +Adapted from corresponding SDL 2.0 code. +*/ + +/* + Simple DirectMedia Layer + Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org> + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + #include "power_x11.h" #include <stdio.h> |