Full Screen (Alt+Enter) Problem?

New to FreeBASIC? Post your questions here.
mccp1999
Posts: 24
Joined: Jul 03, 2006 23:59
Location: West Sussex

Full Screen (Alt+Enter) Problem?

Postby mccp1999 » Aug 14, 2012 22:05

I have compiled a qb45 source program, using fblite and qb -lang options and it runs fine (in windows mode)

However, if I press Alt+Enter for full screen mode, it only shows the top half of the screen (Screen 13 or 7) and the bottom half is just blank/black, but the progam still works

Any Ideas? Thanks in advance
counting_pine
Site Admin
Posts: 6225
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: Full Screen (Alt+Enter) Problem?

Postby counting_pine » Aug 15, 2012 12:31

I'm not sure why that might happen.. what version of FB and what operating system are you using?
Does it affect other screen modes? Try simple programs like this:

Code: Select all

screen 12: const W = 640, H = 480 '' adjust the stuff on this line

line (0, 0)-(W-1, H-1), , b
line (0, 0)-(W-1, H-1)
line (0, H-1)-(W-1, 0)

sleep
mccp1999
Posts: 24
Joined: Jul 03, 2006 23:59
Location: West Sussex

Re: Full Screen (Alt+Enter) Problem?

Postby mccp1999 » Aug 15, 2012 19:30

Thanks counting_pine

Im using Freebasic 0.23 on Windows XP

Your code worked fine in screen mode 12 but showed the same problems in 7 and 13

I've tried a different refresh rate on my display and another oddity appears at 75 hertz, the screen now only shows a quarter display, top right hand quarter, I tried this after I made sure my display drivers were upto date. My lcd monitor also shows the message "Input Not Supported", which is a monitor generated message, but is obviously showing this quarter screen.

Edit: Ive now tried modes 1, 14,15, 16 and they show they same original problem, half screen
counting_pine
Site Admin
Posts: 6225
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: Full Screen (Alt+Enter) Problem?

Postby counting_pine » Aug 15, 2012 20:17

What's your monitor's native resolution?

I can never remember what dimensions the screen numbers use... For general use I prefer Screenres ('__Screenres' in lang qb), which lets you choose the dimensions.

From http://freebasic.net/wiki/KeyPgScreenGraphics, I guess modes 14-17 are a little unconventional, and some of the lower ones are quite old-school. Perhaps FB needs to scale up anything less than 640x480 itself. But stuff like that is out of my area of expertise.
When you say halves and quarters, are they exact or just approximate?

I would suggest running in a window, or possibly trying the GDI driver. (I can't remember how to do that off the top of my head, hopefully someone else will step in here.)

Or a significantly more hardcore method would be to use a higher resolution and scale up the output image.

To be honest I dislike running in fullscreen anyway - I've found it can mess up my desktop.
fxm
Posts: 9948
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Full Screen (Alt+Enter) Problem?

Postby fxm » Aug 15, 2012 21:20

counting_pine wrote:I would suggest running in a window, or possibly trying the GDI driver. (I can't remember how to do that off the top of my head, hopefully someone else will step in here.)

setenviron("fbgfx=GDI") 'puts before screen definition
screen ....
mccp1999
Posts: 24
Joined: Jul 03, 2006 23:59
Location: West Sussex

Re: Full Screen (Alt+Enter) Problem?

Postby mccp1999 » Aug 15, 2012 22:45

Thanks

I've tried the GDI driver now with the same results

When I say half and quarter, its approximate, but always the same as the same graphics are drawn and the ones missing are always the same.

Just out of interest, is there an example of using _Screenres as Im not quite with the alias way of doing things.
Destructosoft
Posts: 88
Joined: Apr 03, 2011 3:44
Location: Inside the bomb
Contact:

Re: Full Screen (Alt+Enter) Problem?

Postby Destructosoft » Aug 16, 2012 4:09

Since one can never know what monitor resolutions the end user has, it is essential to learn ScreenList as well as ScreenRes so as to have something compatible ready.

Of course that doesn't mean one needs to support ALL resolutions; I usually have a set minimum requirement (based on what is needed to fit on the screen).
counting_pine
Site Admin
Posts: 6225
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: Full Screen (Alt+Enter) Problem?

Postby counting_pine » Aug 16, 2012 11:51

The reason I asked about exactness is that exactly "half the screen" might imply a different set of problems than "part of the screen", even if that part is near to a half. E.g. "part" might imply that the monitor scaling is way off, while "half" might imply a calculation error of some sort. I'm not an expert though.
I think that FB should perhaps have software scaling. It should know when a low/exotic is unreasonable and scale it to fit a resolution that is known (according to whatever method it uses with ScreenList) to work.

The FreeBASIC documentation shows every keyword and includes examples of how to use them. You can find it online at freebasic.net/wiki, or if you're using an IDE that might have come with a help file which basically contains the same information.

Anyway, the documentation (and an example) for ScreenRes can be found at http://freebasic.net/wiki/KeyPgScreenres. Note that as it is a non-QBASIC keyword, for lang QB it must be prefixed with two underscores when used (e.g. __ScreenRes ...). The underscores requirement is part of a measure to prevent clashes with variable names from old QB programs.
mccp1999
Posts: 24
Joined: Jul 03, 2006 23:59
Location: West Sussex

Re: Full Screen (Alt+Enter) Problem?

Postby mccp1999 » Aug 17, 2012 12:54

Thanks for the help Guys

Still not working, I tried Screenres and it shows the correct results etc. for 7 and 13 plus others

I've had a thought, think I'll look into whether its just my graphics card (shared memory Geforce 6100) that the problem, borrow a card from someone and see if it works then. Strange as it seems to work OK with everything else.
mccp1999
Posts: 24
Joined: Jul 03, 2006 23:59
Location: West Sussex

Re: Full Screen (Alt+Enter) Problem?

Postby mccp1999 » Aug 18, 2012 15:38

I have now tried another graphics card and it works.

On further investigation I find that my shared memory card is known to have problems with direct draw under certain circumstances and as Freebasic uses Directdraw under windows, this is probably the reason.

It may work using OpenGL but I do not know how to make Windows Freebasic default to using OpenGL instead of DirectDraw (as it does on the Linux distribution), so more investigation is necessary.

Thanks for the help

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 3 guests