06-27-2009, 05:38 PM | #1 |
Count
Join Date: Mar 2007
Location: Germany
Posts: 1,164
|
Change gamma affects Xserver
Hi,
When I want to change the gamma of the game it changes the gamma of the whole xserver. This is quite uncomfortable and pretty useless Can I change gamma somehow for Regnum only?
__________________
French Warriors of Syrtis: Nessa Telrunya (Hunter) - Myxir (Warlock) - Estra (Conjurer)
In War it does not matter who is right, but who is left. |
06-27-2009, 06:58 PM | #2 |
Banned
Join Date: Jun 2007
Location: Germany
Posts: 288
|
|
06-27-2009, 07:07 PM | #3 |
Master
Join Date: Jul 2008
Location: South Central USA
Posts: 260
|
This is not a fix but a workaround.
You could start RO like this: ~/regnum/rolauncher.sh Code:
#!/bin/bash # Change this value to suit you RO_GAMMA=1.5 ## This stores the video mode of my current desktop so it may be recalled later ## since RO doesnt resize the screen for me on exit. OLD_VIDMODE="$(xrandr |grep "Screen 0" | awk '{print $8 $9 $10}' |sed '{s|,||}')" OLD_GAMMA=$(xgamma 2>&1 | awk '{print $3}' |sed '{s|,||}') ## Function to wait until RO was exited wait_game() { RO_EXIT="0" while [ $RO_EXIT = "0" ] do TMP1=$(ps -U $USER |grep game |grep -v grep |awk '{print $1}') if [ -z "$TMP1" ]; then RO_EXIT=1 fi sleep 0.5 done } # Set gamma xgamma --gamma "$RO_GAMMA" ./rolauncher sleep 1 # Wait till RO quits wait_game ## Clean up and revert to old vidmode ## ## Makes sure previous desktop mode is set xrandr -s "$OLD_VIDMOD" xgamma --gamma "$OLD_GAMMA" exit 0
__________________
RA/Syrtis Hunter LVL50: Elusis RA/Syrtis Barba LVL50: Artemisia RA/Syrtis Conju Lvl45: Nellas Miriel |
06-27-2009, 08:11 PM | #4 |
Banned
Join Date: Jul 2008
Posts: 433
|
same problem on windows with gamma
|
06-28-2009, 09:27 AM | #5 | |
Count
Join Date: Mar 2007
Location: Germany
Posts: 1,164
|
Quote:
But it's awesome that you gave us this script. It could help some users here.
__________________
French Warriors of Syrtis: Nessa Telrunya (Hunter) - Myxir (Warlock) - Estra (Conjurer)
In War it does not matter who is right, but who is left. |
|
07-05-2009, 03:23 AM | #6 |
Baron
Join Date: Nov 2007
Location: Not where it looks like, to either of us.
Posts: 706
|
This is actually a limitation in the way gamma setting works in X11. You'll notice that most FPS games will change the gamma of the entire display as well.
This is because when you set a gamma value of a given window in X11 is changes the gamma for the whole display while that window's focused (in the case of some display drivers *cough* nvidia *cough*, it will continue to have the same gamma even when the window loses focus). The change is made with a request to the display driver. Changing it for one window only would most likely be a (mostly) unaccelerated procedure. It might be possible to do this with a postpro shader instead for OpenGL apps. Seems like a bunch of extra work when you're talking about what's normally going to be the foreground application though. Cheers
__________________
If you can't detect sarcasm yourself, please pay attention when it's pointed out to you.
Arathael :: Wyrd Sceote :: Gwn M'ger — Soul Taker, Imperial Guard of Ignis |
|
|