Display refresh rate

News and discussion of the PC port of Oolite.

Moderators: winston, another_commander

Post Reply
Chaky
Deadly
Deadly
Posts: 213
Joined: Sat Aug 15, 2009 6:15 am

Display refresh rate

Post 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>
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post 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?
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
Chaky
Deadly
Deadly
Posts: 213
Joined: Sat Aug 15, 2009 6:15 am

Post 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...
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post 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!
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post 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.
Chaky
Deadly
Deadly
Posts: 213
Joined: Sat Aug 15, 2009 6:15 am

Post 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.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post 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.
Chaky
Deadly
Deadly
Posts: 213
Joined: Sat Aug 15, 2009 6:15 am

Post by Chaky »

Well, that explains why other SDL-based games stick to 60 Hz in full screen modes.

Thanks for the insight.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post 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.
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post 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:
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
Post Reply