Can't get 1280x960 screen mode working

General FreeBASIC programming questions.
Post Reply
lassar
Posts: 306
Joined: Jan 17, 2006 1:35

Can't get 1280x960 screen mode working

Post by lassar »

Have been using a 640x480 fullscreen resolution in a program.

Trying to get double the fullscreen resolution, for better looking fonts.

Have a windows 10 intel computer with intel graphics.

My monitor's resolution is 1920 by 1080.

Did a ScreenList(32) and it shows 1280x960 as a valid resolution.

Loaded a bmp (1280x960 32 bit), and the graphics picture is cropped at the top and bottom.

About 80% to 90% of the picture is showing.

Been messing with intel graphics properties, still not working.

Here is my code.

Code: Select all

#lang "fblite"

#include once "fbgfx.bi"

SCREENRES 1280,960,32
BLoad "Radtutor.bmp"
SLEEP 
END 

So why can't I get this working?
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: Can't get 1280x960 screen mode working

Post by MrSwiss »

Not certain, that this works on: -lang "fblite" (otherwise, use "fb"):

Code: Select all

ScreenRes(1280, 960, 32,, 1)  ' full screen mode
On Windows you'll never get "full height" (except in: full screen mode) because
of the Taskbar, usually at the bottom (using some pixels) and, the Titlebar at
the top of the Window itself ... (again, unless using: NoFrame setting).

For more info: read what's in "fbgfx.bi"
dodicat
Posts: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Can't get 1280x960 screen mode working

Post by dodicat »

It works OK here.
It takes about five seconds.
I see the white box all the way round.

Code: Select all

#include "file.bi"

ScreenRes  1280, 960, 32,, 1  ' full screen mode
dim as any ptr i=imagecreate(1280,960,rgb(0,200,0))
line i,(0,0)-(1279,959),,b
draw string i,(600,500),"Win 10 , freebsic 1.05"
bsave("temp.bmp",i)
bload ("temp.bmp")

'sleep
imagedestroy (i)
kill "temp.bmp"
locate 20,20
print iif(fileexists("temp.bmp"),"Please delete temp.bmp manually","The bitmap has been deleted")
sleep
  
My computer settings;

Code: Select all

 Resolutions supported at 32 bits per pixel:
320x200
512x384
640x400
640x480
800x600
848x480
1024x768
1152x864
1280x960
1280x1024

My desktop resolution
 1280          1024
  
sancho3
Posts: 358
Joined: Sep 30, 2017 3:22

Re: Can't get 1280x960 screen mode working

Post by sancho3 »

It might not be cropped. It might be the monitor fighting you.
One of my monitors can't handle fullscreen modes properly.
Check on your monitor controls if it lets you manually adjust the screen centering and adjust the edge that is cropped.
Or maybe take an alt-print screen screen shot and see if it is all there.
Note that "auto-centering" doesn't work to fix this on my wonky monitor. In fact nothing works to fix it, and I just live with it.
lassar
Posts: 306
Joined: Jan 17, 2006 1:35

Re: Can't get 1280x960 screen mode working

Post by lassar »

I found the bug.

It's microsoft's bug!

In display setting, had the scale and layout at 150%

Did not change the dpi settings.

This did not mess with 640x480, but messed up 1280x960.

I hate bugs, especially microsoft bugs.
Last edited by lassar on Jul 12, 2018 0:19, edited 1 time in total.
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: Can't get 1280x960 screen mode working

Post by MrSwiss »

lassar wrote:It's microsoft's bug!
No, it's not a bug, it's your fault, not to check for such things.
Search for: high DPI settings ...
St_W
Posts: 1626
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: Can't get 1280x960 screen mode working

Post by St_W »

In case you need examples on how an according application configuration that supports HiDPI displays could look like see my following two examples:
http://users.freebasic-portal.de/stw/fi ... e-demo.zip
http://users.freebasic-portal.de/stw/fi ... orInfo.zip

Supporting HiDPI monitors can get tricky, especially if you want your application to work properly on older Windows versions (older than Windows 10) too. But I agree with MrSwiss that the behaviour is most likely not a bug in Windows but rather in your application.
lassar
Posts: 306
Joined: Jan 17, 2006 1:35

Re: Can't get 1280x960 screen mode working

Post by lassar »

I expect that making chances in scale and layout would affect
the desktop and GDI programs, but not in full screen mode.

Did not change the dpi settings.

This is definitely a microsoft bug.
Post Reply