Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Bug Reports / [6.2b] set display mode problem

Author
Message
Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 6th Apr 2008 22:31
I know I'm on an old version, but BatVink has repoduced on 6.7!

If you set the exe to run in a window from the ide then the client size is set correctly to the resolution you select.

If you run the following commands in you program but have set a different resolution from within the ide then the whole window size including title bar is set to your chosen resolution.



i.e. When the ide is set to 1024x768 and windowed fullscreen and i run the above code the complete window size is 800x600, whereas if the ide is set to 800x600 as well of the ide is set to just windowed, the window size is 808x634 ands the client size is 800x600 as it should be.

See attached project.

If you change the display mode in the ide to windowed and 1024x768 the window appears ok.

The same problem occurs if you set the display mode in the ide to windowed and 1024x768 and use set window off in your program.

Hope this makes sense

The problem for me is that I'm trying to write some samples for my D3Dfunc dll and the output graphics look poor as everything is being resampled to an incorrect size.

Attachments

Login to view attachments
spooky
21
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 7th Apr 2008 00:15
Yes, it's a bit annoying isn't it. You get the same sort of problems with javascript with different commands using either inside or outside of a window with respect to dimensions.

A long while ago I knocked up this code in preperation for a game menu where user could swap between window and fullscreen mode in any resolution. Like you I found that setting window size within code does not set window size as expected, so you actually need to add width and height of window borders and caption bar, otherwise window will be squashed and text will look blurry.

So a few calls to windows dlls to get the various window border sizes and height of title bar, and bobs your uncle.

I also found that changing to fullscreen mode had other effects that is what the 'changed' variable does.

This code assumes you have set ide to compile in 640 * 480 windowed mode as startup.



Boo!
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Mar 2010 12:41 Edited at: 8th Mar 2010 12:50
Could this be causing d3d_line to stop working after using "set display mode" Cloggy as I'm having this problem at the moment?

I simple example would be:


EDIT: Nevermind, I just found "D3D_Init" in the forums (call it after setting display mode resolves the issue... sorry!

Login to post a reply

Server time is: 2024-04-20 00:18:12
Your offset time is: 2024-04-20 00:18:12