Page 1 of 1

Display refresh rate

Posted: Sun Aug 23, 2009 4:36 pm
by Chaky
Is there a way to set certain display refresh rate for oolite? (apart from using tools like Powerstrip)

I've tried editing .GNUstepDefaults. Here's a copy-paste of it:

Code: Select all

{
    NSGlobalDomain = {
    };
    oolite = {
	"Chaky-humbletrash" = <*I63064>;
	"Chaky2-humbletrash" = <*I16440>;
	"Chaky3-humbletrash" = <*I13544>;
	"Chaky4-humbletrash" = <*I59256>;
	JoystickAxes = {
	    0 = {
		isAxis = <*BY>;
		stickAxBt = <*I0>;
		stickNum = <*I0>;
	    };
	    1 = {
		isAxis = <*BY>;
		stickAxBt = <*I1>;
		stickNum = <*I0>;
	    };
	    4 = {
		isAxis = <*BY>;
		stickAxBt = <*I2>;
		stickNum = <*I0>;
	    };
	};
	JoystickButs = {
	    10 = {
		isAxis = <*BN>;
		stickAxBt = <*I7>;
		stickNum = <*I0>;
	    };
	    13 = {
		isAxis = <*BN>;
		stickAxBt = <*I0>;
		stickNum = <*I0>;
	    };
	    14 = {
		isAxis = <*BN>;
		stickAxBt = <*I5>;
		stickNum = <*I0>;
	    };
	    15 = {
		isAxis = <*BN>;
		stickAxBt = <*I1>;
		stickNum = <*I0>;
	    };
	    16 = {
		isAxis = <*BN>;
		stickAxBt = <*I9>;
		stickNum = <*I0>;
	    };
	    17 = {
		isAxis = <*BN>;
		stickAxBt = <*I6>;
		stickNum = <*I0>;
	    };
	    18 = {
		isAxis = <*BN>;
		stickAxBt = <*I10>;
		stickNum = <*I0>;
	    };
	    20 = {
		isAxis = <*BN>;
		stickAxBt = <*I4>;
		stickNum = <*I0>;
	    };
	    21 = {
		isAxis = <*BN>;
		stickAxBt = <*I3>;
		stickNum = <*I0>;
	    };
	    24 = {
		isAxis = <*BN>;
		stickAxBt = <*I8>;
		stickNum = <*I0>;
	    };
	    9 = {
		isAxis = <*BN>;
		stickAxBt = <*I2>;
		stickNum = <*I0>;
	    };
	};
	display_height = <*I1024>;
	display_refresh = <*I75>;
	display_width = <*I1280>;
	fullscreen = YES;
	"procedurally-textured-planets" = YES;
	"save-directory" = "C:\\Oolite-Trunk/oolite.app/oolite-saves";
	"shader-effects-level" = <*I3>;
    };
}
I've manually added this part:

Code: Select all

display_height = <*I1024>;
display_refresh = <*I75>;
display_width = <*I1280>;
.. but my refresh rate in-game is still 60 Hz.

P.S. nVidia video drivers don't have the option to override refreshrates.


Edit: Oh yes.. it's 1.73.<something>

Posted: Sun Aug 23, 2009 5:26 pm
by DaddyHoggy
Well as you've posted this in Oolite-PC I'm going to presume you're a Windows user - and therefore I'm confused as to why you can't set a refresh rate in the nvidia drivers - what nvidia control panel/driver/card are you using?

I've always been able to pick my refresh rate, in the nvidia control panel - and even created game specific profiles...

However, is vsync on? is your monitor running at 60Hz too?

Finally, I thought A_C wrote sometime ago that the default refresh rate was going to be locked to 60fps or did I imagine that?

Posted: Sun Aug 23, 2009 5:37 pm
by Chaky
ahh.. yes windows user.. XP pro 32 bit.

nVidia dropped the refresh rate override since 9x.xx drivers. I'm using latest (169.something, if I'm not mistaken).

And, yes, I can set refresh rate, but that doesn't affect the full-screen mode in oolite, and game profiles don't include refresh rate settings.

Only way I managed to get 75 Hz in full screen is by switching to nVidia control panel after I start the game and change it to 75. It sticks for the session.

Edit: I've contacted nVidia when they dropped the override option, and they responded by advertising Powerstrip...

Posted: Sun Aug 23, 2009 6:03 pm
by DaddyHoggy
Ah, that explains it - I've got such an old card (FX5900) that I haven't bothered with any of the new drivers - they're just bloatware for a card of my generation!

Posted: Sun Aug 23, 2009 6:47 pm
by another_commander
DaddyHoggy wrote:
Finally, I thought A_C wrote sometime ago that the default refresh rate was going to be locked to 60fps or did I imagine that?
Actually, what I had written is that the default frame rate is locked to the current monitor's refresh rate. So it can be different to 60fps.

About Chaky's problem, I am not really sure why it happens. I have seen in the past such behaviour with GeForce cards, but not with ATI, so my educated guess is that it is driver related. It's difficult to test, as I do not have an nVidia card myself.

Posted: Sun Aug 23, 2009 6:58 pm
by Chaky
This is to expect with displays with no profiles, a.k.a. "default displays", but mine is well documented and recognized by display driver (exact model with all hw specs).



I guess that's refresh rate override nvidia style.. to eye-mutilating 60 Hz.

Posted: Sun Aug 23, 2009 7:23 pm
by another_commander
OK, just had a look at the code. It is not driver related, it is Oolite (or to be more precise SDL) related.

What happens is that the SDL internal representation for video modes is an array of pointers to SDL_rect, which is two dimensional. As a result, the refresh rate is not considered and even if set through .GNUstepdefaults it comes up always as zero.

I am not sure we can do too much about it without hacking further the SDL.dll or refactoring completely the way we scan for video modes in the game. Presumably this will be looked at after 1.73.

Posted: Sun Aug 23, 2009 7:36 pm
by Chaky
Well, that explains why other SDL-based games stick to 60 Hz in full screen modes.

Thanks for the insight.

Posted: Sun Aug 23, 2009 7:36 pm
by JensAyton
One of my many uncompleted projects is a rewrite of the display management code. While looking at that, I concluded that SDL’s approach to display management is amazingly, astoundingly, flabbergastingly, jaw-droppingly bad. And that is, if anything, putting it mildly.

Posted: Sun Aug 23, 2009 7:42 pm
by DaddyHoggy
Ahruman wrote:
One of my many uncompleted projects is a rewrite of the display management code. While looking at that, I concluded that SDL’s approach to display management is amazingly, astoundingly, flabbergastingly, jaw-droppingly bad. And that is, if anything, putting it mildly.
:( This is why I no longer look at code unless I must, otherwise it depresses me... :roll: