|
|
| [A5] Fullscreen Fails in Ubuntu |
|
Eric Johnson
Member #14,841
January 2013
|
Good evening (or perhaps one of the other times). I am porting a game I'm developing over to Ubuntu, but have ran into an issue. Here's my display code (quite simple): al_set_new_display_flags(ALLEGRO_FULLSCREEN); ALLEGRO_DISPLAY *display = al_create_display(screenW, screenH); Here's my error: "/home/ericii/Desktop/allegro/src/events.c:151: al_register_event_source: Assertion `source' failed." Should I set the display flags to ALLEGRO_WINDOWED, it works just fine. Any ideas, as I would like to have it run in fullscreen? Thanks!
|
|
SiegeLord
Member #7,827
October 2006
|
Firstly... you should explicitly check for the display being created or not, instead of having Allegro fail with some internal error. Secondly... how does screenW and screenH compare to the actual resolution of the monitor? Consider crosschecking those two numbers with the supported resolutions you can obtain with al_get_display_mode. Also consider using ALLEGRO_FULLSCREEN_WINDOW. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
|
Thomas Fjellstrom
Member #476
June 2000
|
Have you checked to see if display is NULL after you create it? If you have the debug version of allegro installed, can you link with that, and pastebin your allegro.log file? I have a feeling its related to nvidia or maybe unity. edit: Also what SiegeLord said. -- |
|
Eric Johnson
Member #14,841
January 2013
|
My display is NULL only when I have established the fullscreen display flags for it.
|
|
Thomas Fjellstrom
Member #476
June 2000
|
Sheegoth said: So then, why wouldn't it work in the other resolution? How could I achieve this resolution? Modes that small tend not to be supported on modern hardware these days. Newer versions of windows won't even let you set them, even if the hardware supports it last I heard. You're better off setting a mode that's a multiple of that, and then scaling your drawing to fit the larger mode. IF you only want to have a screen that size. -- |
|
Eric Johnson
Member #14,841
January 2013
|
Upon reviewing the supported resolutions on this machine, I see you are correct. That's a lot of work just to get images to scale to size.
|
|
Thomas Fjellstrom
Member #476
June 2000
|
Allegro 5 supports transformations, which are essentially free. Just tell allegro to scale all drawing up to the largest size that fits the current mode, and most people probably can't tell. -- |
|
Eric Johnson
Member #14,841
January 2013
|
Aah, is that so? Hmm... Perhaps it wouldn't be too difficult after all.
|
|
Arthur Kalliokoski
Second in Command
February 2005
|
Those old-skool game programmers that used 320 x 240 would have given their left arm to be able to use higher resolutions without making the frame rate go down to 3 fps. I remember reading an article about Quake I running on one of the first Pentium Pros at 640 x 480, and they were overjoyed how much better it looked. They all watch too much MSNBC... they get ideas. |
|
Eric Johnson
Member #14,841
January 2013
|
Ha ha. Is that so? How far we've come...
|
|
Luiji99
Member #12,254
September 2010
|
It's funny how excited people were to get all those pixels, and now some of the most popular Indie games reduced them! Programming should be fun. That's why I hate Java. |
|
torhu
Member #2,727
September 2002
|
Yeah, Minecraft looks like something from 1989. But it feels like something from 1960, so I guess pretty irrevelevant how it looks. |
|
Luiji99
Member #12,254
September 2010
|
Yeah, to me it feels like something I want to play right now, though. I've been wasting too much time on that. But I just started my potato farm, I have to complete it!!! AND WHERE ARE THE MELON SEEDS WHY WON'T YOU SPAWN?!?!?!?!! I guess I could run /give Luiji99 362, but I want to actually find it! Wait, what were we talking about? Programming should be fun. That's why I hate Java. |
|
torhu
Member #2,727
September 2002
|
Hey, I'm trying to be a troll here. By not taking the bait you are hurting the feelings I don't have |
|
Thomas Fjellstrom
Member #476
June 2000
|
torhu said: Hey, I'm trying to be a troll here. By not taking the bait you are hurting the feelings I don't have There's plenty of spots open on the server, you're more than welcome to join In fact, it doesn't get a lot of use by the Allegroites these days. Mostly a bunch of my friends and their friends and family. I have a vanila and FTB instance. -- |
|
torhu
Member #2,727
September 2002
|
But it's like Lego, only it's not even for real |
|
Luiji99
Member #12,254
September 2010
|
Wait, was I supposed to be offended about that 19?? comment? I have a vanilla server too, but I'm the only one who logs on to it. Programming should be fun. That's why I hate Java. |
|
Thomas Fjellstrom
Member #476
June 2000
|
torhu said: But it's like Lego, only it's not even for real WAHT HAO DREA YUO!!!111111noenoenoenoeneon -- |
|
Luiji99
Member #12,254
September 2010
|
It's like LEGOs, but they don't bring you into poverty!! =D Programming should be fun. That's why I hate Java. |
|
Emanresu
Member #12,510
January 2011
|
I couldn't get fullscreen to work on my Linux box until I made the resolution the same as the desktop. Really sucks for me since my resolution is 1600x1200 and the built-in card I have can barely handle that resolution for just the desktop. Currently Linux drivers for GFX cards aren't always up to date with their Windows counterparts. This will probably change soon. "* Entoutcas has quit IRC (Quit: And the Lord said unto John; Come forth and receive eternal life. But John came fifth and won a toaster...)" |
|
Thomas Fjellstrom
Member #476
June 2000
|
Sometimes not being able to change modes is due to an incomplete/broken X config. Or possibly due to your monitor having broken or incomplete EDID information. -- |
|
|