Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » FULL SCREEN Resolution problem

This thread is locked; no one can reply to it. rss feed Print
FULL SCREEN Resolution problem
devo_au
Member #15,282
August 2013

Hey, Just published a game on steam. Now getting a few bugs, par for the course I suppose. One user discovered a bug that cuts off the top and bottom of the screen in full screen mode. He posted me a screen shot 1440w x 480h.

The code i'm using to set up the display is as follows:

ALLEGRO_DISPLAY_MODE disp_data;
al_get_display_mode(al_get_num_display_modes() - 1, &disp_data);
al_set_new_display_flags(ALLEGRO_FULLSCREEN);
si.display = al_create_display(disp_data.width, disp_data.height);

I am building it with 5.0.10 using mingw codeblocks.
Any suggestions would be appreciated. Thanks

it wasn't me, it was other kids

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

devo_au said:

I am building it with 5.0.10 using mingw codeblocks.
Any suggestions would be appreciated. Thanks

That's ancient. I suggest you upgrade before you try to fix 'bugs' that are already gone. 5.2.4.1 is out, and that's miles ahead of 5.0.10.

devo_au
Member #15,282
August 2013

Edgar to the rescue again, your my favorite superhero now. So your suggesting I need to read the school newsletters too and not take my kids to school on pupil free days. Wheres the fun in that. 8-)

it wasn't me, it was other kids

Chris Katko
Member #1,881
January 2002
avatar

Definitely upgrade your version. That's ancient

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

devo_au said:

One user discovered a bug that cuts off the top and bottom of the screen in full screen mode. He posted me a screen shot 1440w x 480h.

If his screenshot was only 480 tall, where was the rest of his screen? That's not a standard resolution.

devo_au
Member #15,282
August 2013

Yeh it's definitely not a standard resolution. His actual screen res was 1900 x 1200.
So the 480 I guess was somewhere in the center of the screens y axis. As for ancient allegro 5.0.10, well its been doing the job so I haven't bothered to update it. Now i'm in the process of updating to 5.2.1.4 and having all sorts of dramas. Cheers.

it wasn't me, it was other kids

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Make sure your compiler is setup correctly (this is part of a PM discussion) :

{"name":"611739","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/5\/f528d68bdea2aa2a5106db7246485dbb.png","w":1150,"h":831,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/5\/f528d68bdea2aa2a5106db7246485dbb"}611739

Doctor Cop
Member #16,833
April 2018
avatar

Displays are also event sources, which emit events when they are resized. You'll need to set the ALLEGRO_RESIZABLE flag with al_set_new_display_flags before creating the display, then register the display with an event queue. When you get a resize event, call al_acknowledge_resize.

More information can be found at https://liballeg.org/a5docs/trunk/getting_started.html

and

https://liballeg.org/a5docs/trunk/display.html#al_acknowledge_resize

I hope it helps.

Go to: