Revision 380 Oolite-PC No Fullscreen

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

User avatar
TGHC
---- E L I T E ----
---- E L I T E ----
Posts: 2157
Joined: Mon Jan 31, 2005 4:16 pm
Location: Berkshire, UK

Revision 380 Oolite-PC No Fullscreen

Post by TGHC »

Cannot get fullscreen whichever way I try, it opens up in a window now, and using F12 or the F2 menu command gives me blocks instead of text when I change it to fullscreen, which is now irreversible, all you can do is shift Q and reopen in window mode again. On previous builds it opened up in full screen and if you tried changing to window mode you got the blocks, but with a bit of prodding and poking you could eventually get the fullscreen back with proper text.

I normally run fullscreen on TFT set at 1280 x 1024 so a window at this resolution is approx 21 x 16cm. My poor eyes can't take it so i'm going back to the previous build. (.....tomorrow, it's way past my beauty sleep time)
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
dajt
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 364
Joined: Tue Aug 17, 2004 7:05 am
Location: Orange, NSW, Australia

Post by dajt »

It is easy to sort this out.

Just open the file c:\program files\oolite\oolite.app\gnustep\defaults\.gnustepdefaults with a text editor and change the values for display_height display_width and fullscreen. Make sure you change them in the oolite.exe block, not the elite.exe block.

For you, they will be:

display_width = <*I1280>;
display_height = <*I1024>;
fullscreen = <*BY>;

This is something broken in my build process. I need to have a distribution version of this file that gets used in the installer rather than whatever my current one is!
Regards,
David Taylor.
User avatar
TGHC
---- E L I T E ----
---- E L I T E ----
Posts: 2157
Joined: Mon Jan 31, 2005 4:16 pm
Location: Berkshire, UK

Post by TGHC »

Hrumph.... did it in notepad and it's still in a window, and now selecting fullscreen has no effect whatsover. I'm trapped like "Honey I shrunk the Window" Help!!!!

Sorry for being so thick!
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
User avatar
Wolfwood
---- E L I T E ----
---- E L I T E ----
Posts: 735
Joined: Wed Mar 29, 2006 9:53 am
Location: Finland
Contact:

Post by Wolfwood »

Having the same problem. In fact, since I first changed to 1280x800 in windowed mode, I haven't been able to change to anything else ever after. Not even by changing the values to that file.

Contents of file:

Code: Select all

{
    NSGlobalDomain = {
    };
    elite.exe = {
	"Jameson-humbletrash" = <*I14264>;
	display_height = <*I1050>;
	display_refresh = <*I0>;
	display_width = <*I768>;
	fullscreen = <*BY>
;
	volume_control = <*R0.71>;
    };
    oolite.exe = {
	"-humbletrash" = <*I49688>;
	"Jameson-humbletrash" = <*I3144>;
	display_height = <*I1280>;
	display_refresh = <*I0>;
	display_width = <*I800>;
	fullscreen = <*BY>
;
	volume_control = <*R0.71>;
    };
}
User avatar
rbird
Above Average
Above Average
Posts: 22
Joined: Thu Jan 12, 2006 1:17 pm
Location: Georgia, USA

Post by rbird »

So try this...

After you change to full screen (and get the "blocks"), hit F2 and scroll down to the third to last choice in the menu. Selecting this enables "strict" Oolite, but also resets the graphics. You can then select the same option again to return to normal play (loading a new commander may also accomplish this, haven't tried it).

This has worked for me in previous versions. Let us know if it is still working.

Bob
dajt
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 364
Joined: Tue Aug 17, 2004 7:05 am
Location: Orange, NSW, Australia

Post by dajt »

I've done some testing here.

It seems in windowed mode the resolution never changes, even when you change the defaults file values. so there's a bug.

I didn't have any trouble with fullscreen mode though, aside from the blocks. When I changed resolution it was happening, and when I quit, and restarted in fullscreen I got the new resolution fine. Same if I changed the defaults file values.

I had no trouble swapping between fullscreen and windowed mode in the F2 options page.

F12 swapped between fullscreen and windowed mode, and this time it gave the correct window size for windowed mode. So there is some difference in the way that behaves than the F2 options page.

Looking at the code, F11 only changes resolution when you're in fullscreen mode, and that seems to work.

So yes, there are a couple of problems there, the major one being when the game starts in windowed mode it always uses the same resolution, regardless of what the defaults say.

I really need to sort out this textures problem too.
Regards,
David Taylor.
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post by winston »

Just for reference - there should be TWO sets of values in the defaults file - one set for the window size in windowed mode, and one set for full screen resolution. The reason being that the window can be any arbitrary size (and is resized by just dragging the corners of the window in the normal way you'd do with any program) and you don't necessarily want that to change the full screen resolution - so both values must be independent.

Can you not resize in windowed mode by just dragging the window corners (or hitting Maximize etc?)
dajt
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 364
Joined: Tue Aug 17, 2004 7:05 am
Location: Orange, NSW, Australia

Post by dajt »

I never even tried... I don't remember coding that feature so you must have done it - did you?
Regards,
David Taylor.
User avatar
TGHC
---- E L I T E ----
---- E L I T E ----
Posts: 2157
Joined: Mon Jan 31, 2005 4:16 pm
Location: Berkshire, UK

Post by TGHC »

winston wrote:
Can you not resize in windowed mode by just dragging the window corners (or hitting Maximize etc?)
No, it doesn't work, and I can't even get the blocks now. The window I have is too small for playing without severe eyestrain. I've tried reinstalling and allsorts, the only way round it as I can see is to completely uninstall and go back to a previous version, and hope that that works.
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
User avatar
Wolfwood
---- E L I T E ----
---- E L I T E ----
Posts: 735
Joined: Wed Mar 29, 2006 9:53 am
Location: Finland
Contact:

Post by Wolfwood »

rbird wrote:
This has worked for me in previous versions. Let us know if it is still working.
Bob
Worked perfectly!

But the darn program quits automatically when you Alt-Tab to visit some other programs... Can that be changed at all?
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post by winston »

TGHC wrote:
winston wrote:
Can you not resize in windowed mode by just dragging the window corners (or hitting Maximize etc?)
No, it doesn't work, and I can't even get the blocks now.
You mean the window doesn't actually resize at all (i.e. you click on maximise and it doesn't react, or you try and drag the corners of the window and it doesn't react?)
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post by winston »

dajt wrote:
I never even tried... I don't remember coding that feature so you must have done it - did you?
Yes, I put that feature in. See SDL/MyOpenGLView.m in the SDL handler - there is a resize handler which reacts to window resize events. It should work fine on any SDL platform.

Code: Select all

         case SDL_VIDEORESIZE:
         {
            SDL_ResizeEvent *rsevt=(SDL_ResizeEvent *)&event;
            NSSize newSize=NSMakeSize(rsevt->w, rsevt->h);
            [self initialiseGLWithSize: newSize];
            [self saveWindowSize: newSize];
            break;
         }
saveWindowSize just saves the file in the GNUstep defaults file 'window_width' and 'window_height' attributes. 'display_width' and 'display_height' are used for full screen resolution settings.

@ THGC: you can always try deleting the GNUstep defaults file altogether so it goes back to the freshly installed defaults.
dajt
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 364
Joined: Tue Aug 17, 2004 7:05 am
Location: Orange, NSW, Australia

Post by dajt »

Well, I just installed 380 on my second PC and I can drag the window to a new size, but I get the blocks, and I don't get window size settings in my defaults file.

Crazy stuff.
Regards,
David Taylor.
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post by winston »

dajt wrote:
Well, I just installed 380 on my second PC and I can drag the window to a new size, but I get the blocks, and I don't get window size settings in my defaults file.
Can you try putting in a call to synchronize in the saveWindowSize method and seeing if that makes a difference?

(just stick [defaults synchronize]; at the end of the function) - it should be unnecessary according to the documentation, but it'll force it to write out the new window sizes to the defaults file.
dajt
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 364
Joined: Tue Aug 17, 2004 7:05 am
Location: Orange, NSW, Australia

Post by dajt »

I'm feeling tired and lazy, sorry guys, stupid questions ahead.

It is a long time since I looked at the texture code... can someone tell me if the letters and numbers are held as OpenGL textures the whole time the game is running, or are they recreated as OpenGL textures each time they're used?

I am guessing the former because I also guess this is what causes the problem with switching resolutions.

If so, destroying all the OpenGL textures might solve the problem. Is that the glDeleteTextures function?

I tried reinitialising SDL each time, which was bad. I also cleared the TextureStore but that had no effect as that just cleared the dictionary of what I assume are SDL surfaces on Windows.
Regards,
David Taylor.
Post Reply