summaryrefslogtreecommitdiff
path: root/platform/x11
diff options
context:
space:
mode:
Diffstat (limited to 'platform/x11')
-rw-r--r--platform/x11/SCsub1
-rw-r--r--platform/x11/context_gl_x11.h21
-rw-r--r--platform/x11/detect.py8
-rw-r--r--platform/x11/os_x11.cpp9
4 files changed, 19 insertions, 20 deletions
diff --git a/platform/x11/SCsub b/platform/x11/SCsub
index e302f09c88..3d5aa15208 100644
--- a/platform/x11/SCsub
+++ b/platform/x11/SCsub
@@ -2,7 +2,6 @@
Import('env')
-import os
from platform_methods import run_in_subprocess
import platform_x11_builders
diff --git a/platform/x11/context_gl_x11.h b/platform/x11/context_gl_x11.h
index 02455ce005..46420df48b 100644
--- a/platform/x11/context_gl_x11.h
+++ b/platform/x11/context_gl_x11.h
@@ -39,13 +39,12 @@
#if defined(OPENGL_ENABLED)
#include "core/os/os.h"
-#include "drivers/gl_context/context_gl.h"
#include <X11/Xlib.h>
#include <X11/extensions/Xrender.h>
struct ContextGL_X11_Private;
-class ContextGL_X11 : public ContextGL {
+class ContextGL_X11 {
public:
enum ContextType {
@@ -67,19 +66,19 @@ private:
ContextType context_type;
public:
- virtual void release_current();
- virtual void make_current();
- virtual void swap_buffers();
- virtual int get_window_width();
- virtual int get_window_height();
+ void release_current();
+ void make_current();
+ void swap_buffers();
+ int get_window_width();
+ int get_window_height();
- virtual Error initialize();
+ Error initialize();
- virtual void set_use_vsync(bool p_use);
- virtual bool is_using_vsync() const;
+ void set_use_vsync(bool p_use);
+ bool is_using_vsync() const;
ContextGL_X11(::Display *p_x11_display, ::Window &p_x11_window, const OS::VideoMode &p_default_video_mode, ContextType p_context_type);
- virtual ~ContextGL_X11();
+ ~ContextGL_X11();
};
#endif
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index b5ad59e60a..5f7b825f5e 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -1,8 +1,8 @@
import os
import platform
import sys
-from compat import decode_utf8
-from methods import get_compiler_version, use_gcc
+from methods import get_compiler_version, using_gcc
+
def is_active():
return True
@@ -160,7 +160,7 @@ def configure(env):
env.Append(LINKFLAGS=['-pipe'])
# Check for gcc version >= 6 before adding -no-pie
- if use_gcc(env):
+ if using_gcc(env):
version = get_compiler_version(env)
if version != None and version[0] >= '6':
env.Append(CCFLAGS=['-fpie'])
@@ -197,7 +197,7 @@ def configure(env):
# We need at least version 2.88
import subprocess
bullet_version = subprocess.check_output(['pkg-config', 'bullet', '--modversion']).strip()
- if bullet_version < "2.88":
+ if str(bullet_version) < "2.88":
# Abort as system bullet was requested but too old
print("Bullet: System version {0} does not match minimal requirements ({1}). Aborting.".format(bullet_version, "2.88"))
sys.exit(255)
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 87b63c0982..0fe91f3d00 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -3048,11 +3048,12 @@ void OS_X11::set_context(int p_context) {
if (p_context == CONTEXT_ENGINE) {
classHint->res_name = (char *)"Godot_Engine";
- char *config_name_tmp = (char *)((String)GLOBAL_GET("application/config/name")).utf8().ptrw();
- if (config_name_tmp)
- config_name = strdup(config_name_tmp);
- else
+ String config_name_tmp = GLOBAL_GET("application/config/name");
+ if (config_name_tmp.length() > 0) {
+ config_name = strdup(config_name_tmp.utf8().get_data());
+ } else {
config_name = strdup("Godot Engine");
+ }
wm_class = config_name;
}