[AD] [ alleg-Bugs-2643591 ] Bug with al_resize_display()

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Bugs item #2643591, was opened at 2009-02-26 16:52
Message generated for change (Comment added) made by trentg
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=2643591&group_id=5665

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: Bruno Adami (brunoja)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bug with al_resize_display()

Initial Comment:
I'm trying the new allegro library (4.9.8) and when I resize my display from 320x240 to 800x600, my sprites that I draw on the screen get bigger too:

http://img120.imageshack.us/img120/5203/large.jpg (The sprite shown on the image should be 150x40.)

I posted it on allegro.cc forums and they said that perhaps is my video card or my OS: I'm using Windows Vista and NVidia GeForce.

I tried it with the code that is attached.


----------------------------------------------------------------------

>Comment By: Trent Gamblin (trentg)
Date: 2009-03-15 11:54

Message:
This is a code error in your test program. This is how it should be done:

#include <allegro5/allegro5.h>
#include <allegro5/a5_iio.h>

int main(void)
{
	ALLEGRO_DISPLAY *display;
	ALLEGRO_BITMAP *bitmap;
	ALLEGRO_EVENT_QUEUE *queue;
	ALLEGRO_EVENT event;

	al_init();
	al_iio_init();

	display = al_create_display(320, 240);
	bitmap = al_iio_load("allegro.pcx");

	queue = al_create_event_queue();
	al_register_event_source(queue, (ALLEGRO_EVENT_SOURCE *)display);

	al_clear(al_map_rgb(0, 0, 0));
	al_draw_bitmap(bitmap, 0, 0, 0);
	al_flip_display();
	al_rest(3);

	al_resize_display(800, 600);

	while (1) {
		al_wait_for_event(queue, &event);
		if (event.type == ALLEGRO_EVENT_DISPLAY_RESIZE) {
			al_acknowledge_resize(event.display.source);
			break;
		}
	}

	al_clear(al_map_rgb(0, 0, 0));
	al_draw_bitmap(bitmap, 0, 0, 0);
	al_flip_display();
	al_rest(3);

	return 0;
}
END_OF_MAIN()




----------------------------------------------------------------------

Comment By: Peter Wang (tjaden)
Date: 2009-03-12 16:07

Message:
Works okay on Linux, so probably Windows or D3D specific.

----------------------------------------------------------------------

Comment By: Bruno Adami (brunoja)
Date: 2009-02-26 16:57

Message:
Update: I uploaded the image too.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=2643591&group_id=5665




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/