|
|
|
Member 188 posts
Registered: Feb 2008
Ok, gl_contrast/gl_gamma now work like they should Only had to change #ifdef __linux__ to #if defined(__linux__) || defined(__OpenBSD__) for my OpenBSD box to make it work. I have a (small) set of patches for OpenBSD support, are you interested?
Administrator 1025 posts
Registered: Apr 2006
Ok, gl_contrast/gl_gamma now work like they should Only had to change #ifdef __linux__ to #if defined(__linux__) || defined(__OpenBSD__) for my OpenBSD box to make it work. I have a (small) set of patches for OpenBSD support, are you interested? Absolutely interested, let me know what needs to be done If you could think of writing down what dependencies/packages you needed to install to get ezQ3 to compile on OpenBSD that would be much appreciated and I'll add that to a "compiling on openbsd"-doc in the repo. Thanks
Member 245 posts
Registered: Jan 2006
Seems there's a new release of SDL2 (SDL2-2.0.4) I urge all Linux folks to update.
in_raw 1 gives same sensitivity as in_mouse 3 from ezquake 2.2. Starting ezquake on another screen with tvinview finally works
Member 188 posts
Registered: Feb 2008
Ok, gl_contrast/gl_gamma now work like they should Only had to change #ifdef __linux__ to #if defined(__linux__) || defined(__OpenBSD__) for my OpenBSD box to make it work. I have a (small) set of patches for OpenBSD support, are you interested? Absolutely interested, let me know what needs to be done If you could think of writing down what dependencies/packages you needed to install to get ezQ3 to compile on OpenBSD that would be much appreciated and I'll add that to a "compiling on openbsd"-doc in the repo. Thanks Oki, here you go: diff --git a/ioapi.c b/ioapi.c index 7f5c191..af7689a 100644 --- a/ioapi.c +++ ioapi.c @@ -14,7 +14,7 @@ #define _CRT_SECURE_NO_WARNINGS #endif -#if defined(__APPLE__) || defined(IOAPI_NO_64) +#if defined(__APPLE__) || defined(IOAPI_NO_64) || defined(__OpenBSD__) // In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions #define FOPEN_FUNC(filename, mode) fopen(filename, mode) #define FTELLO_FUNC(stream) ftello(stream)
diff --git a/vid_sdl2.c b/vid_sdl2.c index d4d5beb..afc64a8 100644 --- a/vid_sdl2.c +++ vid_sdl2.c @@ -26,7 +26,7 @@ #include <SDL.h> #include <SDL_syswm.h> -#ifdef __linux__ +#if defined(__linux__) || defined(__OpenBSD__) #include <X11/extensions/xf86vmode.h> #endif @@ -88,7 +88,7 @@ double vid_last_swap_time; static SDL_DisplayMode *modelist; static int modelist_count; -#ifdef __linux__ +#if defined(__linux__) || defined(__OpenBSD__) static unsigned short sysramps[768]; #endif @@ -329,7 +329,7 @@ static void VID_AbsolutePositionFromRelative(int* x, int* y, int* display) static void VID_SetDeviceGammaRampReal(unsigned short *ramps) { -#ifdef __linux__ +#if defined(__linux__) || defined(__OpenBSD__) SDL_SysWMinfo info; Display *display; int screen; @@ -367,7 +367,7 @@ static void VID_SetDeviceGammaRampReal(unsigned short *ramps) vid_hwgamma_enabled = true; } -#ifdef __linux__ +#if defined(__linux__) || defined(__OpenBSD__) static void VID_RestoreSystemGamma(void) { VID_SetDeviceGammaRampReal(sysramps); @@ -385,7 +385,7 @@ static void window_event(SDL_WindowEvent *event) case SDL_WINDOWEVENT_FOCUS_LOST: ActiveApp = false; -#ifdef __linux__ +#if defined(__linux__) || defined(__OpenBSD__) /* Restore system gamma while client is out of focus/minimized */ VID_RestoreSystemGamma(); #endif @@ -398,7 +398,7 @@ static void window_event(SDL_WindowEvent *event) Minimized = false; ActiveApp = true; scr_skipupdate = 0; -#ifdef __linux__ +#if defined(__linux__) || defined(__OpenBSD__) v_gamma.modified = true; #endif break; @@ -616,7 +616,7 @@ void VID_Shutdown(void) SDL_StopTextInput(); -#ifdef __linux__ +#if defined(__linux__) || defined(__OpenBSD__) VID_RestoreSystemGamma(); #endif
diff --git a/q_shared.h b/q_shared.h index a828a81..190f631 100644 --- a/q_shared.h +++ q_shared.h @@ -157,6 +157,20 @@ float FloatSwapPDP2Lit (float f); #endif +//======================= OpenBSD DEFINES ==================================== +#ifdef __OpenBSD__ + +#include <machine/endian.h> +#if BYTE_ORDER == BIG_ENDIAN +#define __BIG_ENDIAN__ +#elif BYTE_ORDER == LITTLE_ENDIAN +#define __LITTLE_ENDIAN__ +#elif BYTE_ORDER == PDP_ENDIAN +#define __PDP_ENDIAN__ +#endif + +#endif + //======================= BYTE SWAPS ========================================= #if defined __BIG_ENDIAN__ #define BigShort(x) (x)
diff --git a/Makefile b/Makefile index 325d6e7..ecd01e7 100644 --- a/Makefile +++ Makefile @@ -337,9 +337,12 @@ else LIBS_c += -lGL endif - ifneq ($(SYS),FreeBSD) + ifeq ($(SYS),Linux) LIBS_c += -ldl endif + ifeq ($(SYS),Darwin) + LIB_c += -ldl + endif endif ifdef CONFIG_OGG
The Makefile diff is questionable, I have no idea which platforms need -ldl
Member 188 posts
Registered: Feb 2008
About libraries, should be the same as on other platforms. I noticed a new dependency on xxd in the Makefile which comes with vim which is has to be installed on OpenBSD (I think it rolls with most linux distros nowadays). If that stays it would be worth mentioning in the Readme. gettext SDL2 pcre png jpeg curl jansson nghttp2 idn iconv
Those should do it.
News Writer 280 posts
Registered: May 2006
I noticed a new dependency on xxd in the Makefile which comes with vim which is has to be installed on OpenBSD (I think it rolls with most linux distros nowadays) Work for me at FreeBSD: $ cat xxd #!/bin/sh FILE=$2 NAME=`echo "${FILE}" | tr '.' '_'` echo "unsigned char ${NAME} [] = {" hexdump -v -e '"" 12/1 "0x%x, " "\n"' "${FILE}" | sed 's/ 0x,//g' echo '0x0 };' echo "unsigned int ${NAME}_len = `wc -c \"$FILE\" | awk '{print $1}'`;"
Member 188 posts
Registered: Feb 2008
I noticed a new dependency on xxd in the Makefile which comes with vim which is has to be installed on OpenBSD (I think it rolls with most linux distros nowadays) Work for me at FreeBSD: $ cat xxd #!/bin/sh FILE=$2 NAME=`echo "${FILE}" | tr '.' '_'` echo "unsigned char ${NAME} [] = {" hexdump -v -e '"" 12/1 "0x%x, " "\n"' "${FILE}" | sed 's/ 0x,//g' echo '0x0 };' echo "unsigned int ${NAME}_len = `wc -c \"$FILE\" | awk '{print $1}'`;" Thanks, the 0x0 is not needed I think? Using this atm., survived a make. #!/bin/sh -
name=$(echo $1 | tr '.' '_') len=$(cat $1 | wc -c) hexdump -v -e '" " 12/1 "0x%.2x, " "\n"' < $1 | sed -e 's/ 0x,//g' |\ awk 'BEGIN { print "unsigned char '"$name"'[] = { " } { print } END { print "};\nunsigned int '"$name"'_len = '"$len"';" }'
News Writer 280 posts
Registered: May 2006
> echo $1 $1 - it's "-i", file name is $2
> the 0x0 is not needed I think? You have to remove last "," or add 0x0 at end.
Member 188 posts
Registered: Feb 2008
> echo $1 $1 - it's "-i", file name is $2
Sorry, was not clear about that, I have: XXD ?= /home/leopold/bin/xxd.sh in my Makefile. > the 0x0 is not needed I think? You have to remove last "," or add 0x0 at end.
Trailing commas are allowed by the C Standard, see K&R A.8.7. Or does this cause trouble somewhere else? My ezq3 built with the above script works perfectly fine (at least it seems to .
Administrator 1025 posts
Registered: Apr 2006
> echo $1 $1 - it's "-i", file name is $2
Sorry, was not clear about that, I have: XXD ?= /home/leopold/bin/xxd.sh in my Makefile. > the 0x0 is not needed I think? You have to remove last "," or add 0x0 at end.
Trailing commas are allowed by the C Standard, see K&R A.8.7. Or does this cause trouble somewhere else? My ezq3 built with the above script works perfectly fine (at least it seems to . NULL terminating the array, while not necessary since we have the size/len, might still be a good idea.
Member 188 posts
Registered: Feb 2008
> echo $1 $1 - it's "-i", file name is $2
Sorry, was not clear about that, I have: XXD ?= /home/leopold/bin/xxd.sh in my Makefile. > the 0x0 is not needed I think? You have to remove last "," or add 0x0 at end.
Trailing commas are allowed by the C Standard, see K&R A.8.7. Or does this cause trouble somewhere else? My ezq3 built with the above script works perfectly fine (at least it seems to . NULL terminating the array, while not necessary since we have the size/len, might still be a good idea. Well, we tried to mimic xxd -i, which doesn't NULL-terminate the array, at least not on my machine. Anyway, doesn't really matter. Point is we can easily use a script if we don't want to install vim as an dependency on *BSD.
Administrator 1025 posts
Registered: Apr 2006
> echo $1 $1 - it's "-i", file name is $2
Sorry, was not clear about that, I have: XXD ?= /home/leopold/bin/xxd.sh in my Makefile. > the 0x0 is not needed I think? You have to remove last "," or add 0x0 at end.
Trailing commas are allowed by the C Standard, see K&R A.8.7. Or does this cause trouble somewhere else? My ezq3 built with the above script works perfectly fine (at least it seems to . NULL terminating the array, while not necessary since we have the size/len, might still be a good idea. Well, we tried to mimic xxd -i, which doesn't NULL-terminate the array, at least not on my machine. Anyway, doesn't really matter. Point is we can easily use a script if we don't want to install vim as an dependency on *BSD. Aah you're right! First implementation that was done read the array and expected to end on a NULL entry (which in turn was added with a sed fork), however since the library contains a function to specify size (json_loadb() compared to json_load()) we got rid of that. So you're right, the last entry isn't needed. Thanks for pointing it out
Member 245 posts
Registered: Jan 2006
commit d73098d9752654c1149470f7ab2da8dfe7d479cd works very nice! in_release_mouse_modes "10" works as expected. however there's an annoying message when starting Ezquake "Can't register variable in_release_mouse_modes, already defined"
Administrator 1025 posts
Registered: Apr 2006
commit d73098d9752654c1149470f7ab2da8dfe7d479cd works very nice! in_release_mouse_modes "10" works as expected. however there's an annoying message when starting Ezquake "Can't register variable in_release_mouse_modes, already defined" Fixed.
Member 245 posts
Registered: Jan 2006
Another one, /spectator_password "password" doesn't work. /spectator "password" works though.
Administrator 1025 posts
Registered: Apr 2006
Another one, /spectator_password "password" doesn't work. /spectator "password" works though. spectator_password is the server cvar, not the client one. ezQuake has a builtin server and several cvars belong to the server part and not the client, spectator_password is one of those.
Member 245 posts
Registered: Jan 2006
Would be nice with a command which made /gl_gamma and /gl_contrast not to change in windowed mode when window is not focused
Member 245 posts
Registered: Jan 2006
There's something horrible wrong with ezquake 3 when using ffmpeg to do streaming, mouse is really jerky and fpsdrops, works flawless with 2.2.. :/
wonder what causes it..
fmpeg -f x11grab -s 1920x1080 -r 60 -i :0.0 -f alsa -ac 2 -i hw:0 -f flv -ac 2 -ar 44100 -vcodec libx264 -g 120 -keyint_min 60 -b:v 3000k -minrate 3000k -maxrate 3000k -pix_fmt yuv420p -s 1920x1080 -preset ultrafast -tune film -acodec aac -threads 2 -strict normal -bufsize 3000k test.mkv
not reproducible, nvm
Member 245 posts
Registered: Jan 2006
Not really ezquake 3 related, but there's bug in linux.
in nvidia-settings i can set to maximum performance (always max speed)
settings is forgotten every time xorg is started.
manual writing nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1 fixes it. (putting it in ~/.xinitrc makes no sense, it's not set anyway)
is it possible ezquake 3 could check this option? it's really frustrating with fps drops from 1001 to 980 at some points, with the powermizermode=1 it's always 1001 no matter what
Administrator 1025 posts
Registered: Apr 2006
Would be nice with a command which made /gl_gamma and /gl_contrast not to change in windowed mode when window is not focused I already fixed this for you 9 months ago: vid_hwgammacontrol 3 ...
Member 100 posts
Registered: Feb 2006
does this guide really work? i used mingw32 and just got some problems with missing header files:
#include <sys/ipc.h> #include <sys/shm.h> #include <sys/stat.h> #include <sys/wait.h> #include <sys/mman.h> #include <sys/ioctl.h> #include <sys/poll.h>
is there a lib? but i guess its not supported by mingw.
sys_posix.c:30:21: fatal error: sys/ipc.h: No such file or directory
maybe some1 could help me, he will get a cookie!
i really hate this mingw/linux stuff, i wanna have my visual studio project *grml*
Member 344 posts
Registered: Nov 2006
Just tried it on macOS - worked fine. Even runs with wine.
What exactly is your setup and and what did you do?
Administrator 1025 posts
Registered: Apr 2006
does this guide really work? i used mingw32 and just got some problems with missing header files:
#include <sys/ipc.h> #include <sys/shm.h> #include <sys/stat.h> #include <sys/wait.h> #include <sys/mman.h> #include <sys/ioctl.h> #include <sys/poll.h>
is there a lib? but i guess its not supported by mingw.
sys_posix.c:30:21: fatal error: sys/ipc.h: No such file or directory
maybe some1 could help me, he will get a cookie!
i really hate this mingw/linux stuff, i wanna have my visual studio project *grml* Let me just first say that we don't officially support compiling ezQuake on Windows for Windows. In your case something is wrong, the CONFIG_WINDOWS flag isn't set otherwise sys_posix.c wouldn't try to compile. There's a .config_windows file in the repository with a lot of flags for Windows build. The easiest thing to do (until we sort out CMake or meag supports an official MS Visual Studio project) I guess is to fire up a virtual machine with Linux and then read the compilation info in the repository to get a Windows executable. It's not the prettiest solution however it simplifies things.
|
|
|
|