Display Resolution
FreeCastle

Hi,

I am a WinXP-User and have a question about the display resolution. Under Windows I use 1024x768, but for my Allegro applications I want to use something like 640x480 or 800x600. So I use the following line:

set_gfx_mode(GFX_AUTODETECT_FULLSCREEN, 800, 600, 0, 0)

The problem now is that this doesn't work 100% correctly. The Screen-Bitmap (where to draw) I get has a size of 800x600, but it doesn't cover the whole screen. There is always a black area on the left side of the screen. I hope you understand what I mean... so maybe anyone knows this problem or has an solution for it ?
Thanks...

Krzysztof Kluczek
Quote:

The problem now is that this doesn't work 100% correctly. The Screen-Bitmap (where to draw) I get has a size of 800x600, but it doesn't cover the whole screen. There is always a black area on the left side of the screen. I hope you understand what I mean... so maybe anyone knows this problem or has an solution for it ?

You are using CRT monitor, right? :) If yes, then probably you just have to play a bit with monitor image positioning settings. Monitors usually remember only limited number of recently used display modes (various refresh rates counts as display modes, too), so if you didn't use 800x600 recently positioning could have got reset to defaults. :)

FreeCastle

Yes I use a CRT monitor.
That means, I have to adjust the hardware settings of my monitor ? Sorry I am not a great English speaker, but I hope you understand. (If not: I mean the buttons on my monitor, which I can change with my hands)

But ist there no (Allegro)software solution for that problem ? I mean, if I e.g. start simple games coded with DirectDraw I don't have this problem...

Tobias Dammers

If a DirectDraw program has the problem and yours doesn't, and they both use the exact same video mode, then the problem must be in your code. Allegro uses DirectX in Windows.
Have you checked the same program in a windowed graphics mode?

Apart from that, you cannot set the crt settings from within allegro. Some video cards allow you to make some adjustments, but it mostly comes down to the monitor. Even windows can't access a crt monitor's adjustment data.

FreeCastle

Well, I have to admit, that I have no sample DDraw programm of myself. But take e.g. the game StarCraft. It runs in 640x480 (or 800x600, I don't know exactly) and it is written with DDraw. There I don't have this problem...

Evert
Quote:

it is written with DDraw

Allegro uses DirectDraw.

Anyway, long story, but your monitor may need to be adjusted (it's what these buttons on the front are for) if it's running in a different display mode or witha different refresh rate. It's not a software problem.

LordHolNapul

I've this problem too in my game... I use Windows ME and I've a 32 bit colour game:
My starting Windows resolution is 1024x768 and I've a 17'' monitor flat in front but CRT (is it right ? CRT means that the monitor have a back long)

1024x768 ok
800x600 ok
640x480 black area upper and right
320x240 ehy, this didn't work now... boh.

This is a problem I didn't consider too much. But Remember to test the return code of the Install functions, to prevent and notify errors during the setup of your games..

ciao

BAF

Did you adjust the settings? You probably just have to set the correct positioning, etc on your monitor. And yes, CRTs are the big ones.

FreeCastle

Till now I didn't change anything. But I tried to switch my windows resolution to 800x600 and then tried to start my Allegro app and it was the same result :(
I'll try it later with adjusting... BUT even if this solves that problem I don't think that this is a satisfying solution. I mean, every time I want to start an Allegro app I have to adjust the monitor settings on my monitor and then when I get back to windows I have to adjust the monitor settings again, so that I have a correct display on windows.....

Don Freeman

Bump so you can add something FreeCastle... :)

Edit:
I don't think it is a resolution problem as much as a frequency problem... There should be some sort of frequency control in your GFX driver. You should be able to manually set this to some locked freqency and you wont have to adjust your monitor after each use of 'such-and-such' program...

Richard Phipps

Do the allegro examples (especially the ones where you can choose different screen sizes and colour depths), have the same problem?

FreeCastle

Ahhh, okay now I got it ;)
Thanke you all very much for your help

Thread #587370. Printed from Allegro.cc