PlaneShift

Development => Development Deliberation => Topic started by: Miya on August 24, 2005, 06:10:25 pm

Title: How to disable (Paused) behavior in CS code
Post by: Miya on August 24, 2005, 06:10:25 pm
I\'m just wondering how to disable CS\'s need to pause every time I switch applications. I tried one code change but all that seemed to do was stop it from changing the window title. It still pauses. Any ideas?
Title:
Post by: Tanausu on August 25, 2005, 12:25:20 am
Quote
Originally posted by Miya
I\'m just wondering how to disable CS\'s need to pause every time I switch applications. I tried one code change but all that seemed to do was stop it from changing the window title. It still pauses. Any ideas?


No but it happend to my on 0.3.010. I\'m not able to run 0.3.011 yet. I thought it was a feature not a bug. :-(
Title:
Post by: Miya on August 25, 2005, 12:29:55 am
Hehe I know it\'s a feature not a bug. It\'s just a feature I want to disable, and there doesn\'t seem to be an easy way to do that short of changing the code, which I tried, but as I said only managed to stop it from changing the title when it\'s paused lol.
Title:
Post by: josephoenix on August 25, 2005, 06:27:22 pm
There is a variable you can set in the .cfg file that is called something like runwhileunfocused... dfryer told me once.. perhaps I\'ll have a poke through the CS docs.

aha.
Quote
Taken from the CrystalSpace documentation at http://www.crystalspace3d.org/docs/online/manual/cs_2.5.5.4.php
On the MacOS/X, Crystal Space will pause execution when the window is de-activated, and resume execution when the window is re-activated. Paused state is indicated by the text \"[Paused]\" in the title of the window. If you wish to disable this behavior, and allow programs to run even when the window is not active, apply this setting to your defaults database:

  defaults write CrystalSpace.Global System.RunWhenNotFocused yes
 

You can also use the command-line option `--alwaysruns\'.


jose
Title:
Post by: Miya on September 08, 2005, 12:52:13 am
The -alwaysrun option works. The defaults option doesn\'t. Thanks jose!
Title:
Post by: Liquid_Obsidian on September 11, 2005, 12:42:45 am
Quote
Originally posted by Miya
The -alwaysrun option works. The defaults option doesn\'t. Thanks jose!


found a way to make it work:

put :

System.RunWhenNotFocused = true

in psclient.cfg in the line right after

System.ApplicationID = psclient

didn\'t tryed to put it after plugin declaration... and i won\'t...
Title:
Post by: wain on September 24, 2005, 04:40:59 am
Quote
Originally posted by Liquid_Obsidian
Quote
Originally posted by Miya
The -alwaysrun option works. The defaults option doesn\'t. Thanks jose!


found a way to make it work:

put :

System.RunWhenNotFocused = true

in psclient.cfg in the line right after

System.ApplicationID = psclient

didn\'t tryed to put it after plugin declaration... and i won\'t...


I\'ve added this line to psclient.cfg and the client still pauses whenever I background it. Even tried moving it to different places in the file. So it looks like it\'s ignoring this setting completely. Could it be a problem introduced to the client since Liquid_Obsidian posted?
Title:
Post by: AryHann on September 28, 2005, 07:35:04 am
Most probably. If before it was working and now it doesn\'t, I suggest you to contact Jorrit somehow - through IRC would be the best.
Title:
Post by: wain on September 30, 2005, 12:22:52 am
Thanks, I will. :)

But before I do, can I check that other people are experiencing the same bug now? And if you can still disable the pausing by editing a file, in the 0.3.11 release, what method do you use?

Thanks!
Title:
Post by: AryHann on September 30, 2005, 06:30:02 am
Of course you can check if other people is experiences problem.

I would suggest anyway to ask Jorrit which is the best method to pause the behaviour, if the suggested one doesn\'t work.
I personally don\'t know others
Title:
Post by: wain on September 30, 2005, 06:33:19 am
Would the CEL mailing list be appropriate for such a question? Is PS based on CEL, or directly on CrystalSpace?
Title:
Post by: AryHann on September 30, 2005, 06:38:31 am
PS uses certain parts of CEL, being the top layer of CS.

I think that the pause is handled by CS so I would recommend:
- #crystalspace on irc.freenode.net
- CSMain, the ML of CS

Anyway, if you post wrong they will not kill you :-)
Title:
Post by: wain on October 03, 2005, 03:02:50 am
Thanks :) I posted on CSMain and Eric Sunshine replied. I\'ve pasted his reply below. Are the changes he mentions something that are likely to come through automatically via the updater, or are they the kind of thing that\'ll require an entire new build?

Anyway, his reply is:


This code has not changed in a very long time, however, it was not especially robust, and would probably have failed on that input. I just rewrote the code in CVS to be more robust and forgiving of various user inputs. It should now work correctly. Try at the command-line:

defaults write CrystalSpace.Global System.RunWhenNotFocused yes

Or, if you want to limit it to PlaneShift, use the following  (assuming that the PlaneShift application ID is \"PlaneShift\", if it\'s not, replace it with the correct one):

defaults write PlaneShift System.RunWhenNotFocused yes

You can also use the command-line argument --alwaysrun when invoking CS applications on MacOS/X.

-- ES
Title:
Post by: AryHann on October 03, 2005, 07:36:59 am
Theoretically, we should get that code once that PS will update his \"CS\" date, since it is depending from CS and at the moment PS is sticking to a specific date (5th of Sep) for development.

Hope that I was a bit clear!
Title:
Post by: wain on October 03, 2005, 08:54:53 am
In other words, probably not for a while then :)