User panel stuff on forum
  203 posts on 7 pages  First page1234567Last page
Client Talk
2016-01-07, 14:05
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?
2016-01-07, 17:33
Administrator
1025 posts

Registered:
Apr 2006
leopold wrote:
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
2016-01-07, 22:09
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
2016-01-08, 14:14
Member
188 posts

Registered:
Feb 2008
dimman wrote:
leopold wrote:
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
2016-01-08, 14:29
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.
2016-01-13, 21:05
News Writer
280 posts

Registered:
May 2006
leopold wrote:
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}'`;"
2016-01-13, 22:40
Member
188 posts

Registered:
Feb 2008
VVD wrote:
leopold wrote:
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"';" }'

2016-01-14, 07:36
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.
2016-01-14, 09:10
Member
188 posts

Registered:
Feb 2008
VVD wrote:
> 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.

VVD wrote:

> 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 .
2016-01-14, 09:11
Administrator
1025 posts

Registered:
Apr 2006
leopold wrote:
VVD wrote:
> 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.

VVD wrote:

> 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.
2016-01-14, 11:34
Member
188 posts

Registered:
Feb 2008
dimman wrote:
leopold wrote:
VVD wrote:
> 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.

VVD wrote:

> 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.
2016-01-14, 11:48
Administrator
1025 posts

Registered:
Apr 2006
leopold wrote:
dimman wrote:
leopold wrote:
VVD wrote:
> 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.

VVD wrote:

> 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
2016-01-17, 18:12
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"
2016-01-17, 21:45
Administrator
1025 posts

Registered:
Apr 2006
raket wrote:
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.
2016-01-17, 22:12
Member
245 posts

Registered:
Jan 2006
Another one, /spectator_password "password" doesn't work. /spectator "password" works though.
2016-01-17, 22:49
Administrator
1025 posts

Registered:
Apr 2006
raket wrote:
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.
2016-01-21, 22:09
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
2016-03-06, 01:45
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
2016-09-12, 14:25
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
2016-09-12, 19:07
Administrator
1025 posts

Registered:
Apr 2006
raket wrote:
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 ...
2017-05-16, 22:41
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*
2017-05-20, 08:06
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?
2017-05-22, 12:43
Administrator
1025 posts

Registered:
Apr 2006
knast wrote:
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.
  203 posts on 7 pages  First page1234567Last page