]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sys_shared.c
shader_glsl: Don't apply the fringe effect if it's disabled, it fixes scr_screenshot_...
[xonotic/darkplaces.git] / sys_shared.c
index c3b4bab73914425ff91137d422d9beb7504cbad4..2149dff6c71e8c0a3f1f81e1b307f3861c0d6bc4 100644 (file)
@@ -116,6 +116,21 @@ static qbool Sys_LoadLibraryFunctions(dllhandle_t dllhandle, const dllfunction_t
        return false;
 }
 
+qbool Sys_LoadSelf(dllhandle_t *handle)
+{
+       dllhandle_t dllhandle = 0;
+
+       if (handle == NULL)
+               return false;
+#ifdef WIN32
+       dllhandle = LoadLibrary (NULL);
+#else
+       dllhandle = dlopen (NULL, RTLD_NOW | RTLD_GLOBAL);
+#endif
+       *handle = dllhandle;
+       return true;
+}
+
 qbool Sys_LoadLibrary (const char** dllnames, dllhandle_t* handle, const dllfunction_t *fcts)
 {
 #ifdef SUPPORTDLL
@@ -553,7 +568,7 @@ void Sys_ProvideSelfFD(void)
 static int CPUID_Features(void)
 {
        int features = 0;
-# if defined((__GNUC__) || (__clang__) || (__TINYC__)) && defined(__i386__)
+# if (defined(__GNUC__) || defined(__clang__) || defined(__TINYC__)) && defined(__i386__)
         __asm__ (
 "        movl    %%ebx,%%edi\n"
 "        xorl    %%eax,%%eax                                           \n"