Active Topics

 


Reply
Thread Tools
smoku's Avatar
Posts: 1,716 | Thanked: 3,007 times | Joined on Dec 2009 @ Warsaw, Poland
#11
Does SDL notifies my app anyhow that the fullscreen window was recreated?
__________________
smoku @xiaoka.com (SMTP/XMPP) ...:.:....:... pebbled . Poky Fish : sixaxis . psx4m . uae4all
Jolla Phone post-mortem . . . . . . . . . . -> 1+1 VGN-UX390N
 
smoku's Avatar
Posts: 1,716 | Thanked: 3,007 times | Joined on Dec 2009 @ Warsaw, Poland
#12
http://talk.maemo.org/showpost.php?p...&postcount=131
So, what you're saying, I should drop my SDL_haa code, and stick to the software pixel doubling? Maybe just optimizing it with assembly.
__________________
smoku @xiaoka.com (SMTP/XMPP) ...:.:....:... pebbled . Poky Fish : sixaxis . psx4m . uae4all
Jolla Phone post-mortem . . . . . . . . . . -> 1+1 VGN-UX390N
 

The Following User Says Thank You to smoku For This Useful Post:
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#13
Originally Posted by smoku View Post
http://talk.maemo.org/showpost.php?p...&postcount=131
So, what you're saying, I should drop my SDL_haa code, and stick to the software pixel doubling? Maybe just optimizing it with assembly.
Yes, I should have remarked this more clearly... sorry (I did say that software is the better choice for simpler scalings in this thread, though).

An optimized assembly 2x scaler is way faster than the SGX. The issue here is that the SGX takes a _constant_ time, whatever the surface area or scaling factor is (due to the way the rasterizer works). The 2x assembly scaler is really fast (at least the DrNokSnes one), but when you start enlarging the scaling factor, gets progressively slower (and when you use a non power of 2 scaling factor, gets much, much slower). So there's a point where the SGX one will be faster than a assembly one (or a slow enough CPU frequency!).

And of course doing any kind of antialiasing means that the assembly one will be much slower. Note that I don't remember right now if HAA does nearest or linear, but I do remember it's hardcoded in hildon-desktop.

Originally Posted by smoku View Post
Does SDL notifies my app anyhow that the fullscreen window was recreated?
I'll fix this, I'm just trying to understand the entire process. It seems it defullscreens "silently" after a focus out, and fullscreen 1500 milliseconds after a focus in. Next version will imitate this logic and take care of putting the actors in the appropriate window.

Last edited by javispedro; 2010-03-31 at 15:07.
 
smoku's Avatar
Posts: 1,716 | Thanked: 3,007 times | Joined on Dec 2009 @ Warsaw, Poland
#14
Originally Posted by javispedro View Post
I'll fix this, I'm just trying to understand the entire process. It seems it defullscreens "silently" after a focus out, and fullscreen 1500 milliseconds after a focus in. Next version will imitate this logic and take care of putting the actors in the appropriate window.
This is how it looks to me.

Do you know why do one need to create separate fullscreen window? Is changing the current one to fullscreen impossible?
__________________
smoku @xiaoka.com (SMTP/XMPP) ...:.:....:... pebbled . Poky Fish : sixaxis . psx4m . uae4all
Jolla Phone post-mortem . . . . . . . . . . -> 1+1 VGN-UX390N
 
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#15
Originally Posted by smoku View Post
This is how it looks to me.

Do you know why do one need to create separate fullscreen window? Is changing the current one to fullscreen impossible?
Non-Maemo SDL uses an approach where the fullscreen window is unredirected; it skips the window manager and goes straight to the display device. Let's say that due to the way this works it's best if this kind of windows do not "morph" into normal windows.

This of course works OK for desktop SDL: when the fullscreen window is shown, it occupies the entire screen, and goes directly to the screen thus hides everything behind.

On Maemo, in order to disable compositing for fullscreen windows, they couldn't make the fullscreen window skip the window manager, cause then the window manager wouldn't know there's a fullscreen window visible, wouldn't disable compositing, and chaos would ensue!
Thus they patched the Maemo-SDL to make the fullscreen window just like normal windows, only bigger. But of course, this means that now the window manager CAN see the fullscreen window! This causes its own set of problems: for example, when the fullscreen window is closed, the window manager reacts as usual: it shows you the task switcher. Bad!, since we wanted to force it to switch to the other window, which would have happened if the window manager didn't know about the fullscreen window!

To answer your question, the reason they don't change the window to fullscreen instead of creating one is because the original SDL did it this way because it was the only way, and changing the behavior now that it's no longer the only way (you could just resize it) would require a large amount of patches.

Hope it helps
 

The Following User Says Thank You to javispedro For This Useful Post:
smoku's Avatar
Posts: 1,716 | Thanked: 3,007 times | Joined on Dec 2009 @ Warsaw, Poland
#16
This was extensive!
Thanks.
__________________
smoku @xiaoka.com (SMTP/XMPP) ...:.:....:... pebbled . Poky Fish : sixaxis . psx4m . uae4all
Jolla Phone post-mortem . . . . . . . . . . -> 1+1 VGN-UX390N
 
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#17
I uploaded a new SDL_haa, should fix the issue you were having.
 

The Following 2 Users Say Thank You to javispedro For This Useful Post:
Posts: 270 | Thanked: 239 times | Joined on Dec 2009 @ Czech Republic
#18
Hi, I have problem with sdl_haa. I get SIGSEGV:
Code:
at /usr/include/SDL/SDL_haa.h:146
146           actor->pending   |= HAA_PENDING_POSITION;
Code:
Code:
	  HAA_Init(0);
	  actor = HAA_CreateActor(SDL_SWSURFACE, 480, 320, 16);
	  HAA_SetPosition(actor, 0, 0); BAD
	  HAA_SetScale(actor, 2, 2);
	  HAA_Show(actor);
What is wrong? Thx for reply.
to javispedro: I donīt know if you did get pm from me. I had laggy conection, so maybe I sent more messages to you. I am sorry for it.
 
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#19
Originally Posted by Figa View Post
Hi, I have problem with sdl_haa. I get SIGSEGV:
Code:
at /usr/include/SDL/SDL_haa.h:146
146           actor->pending   |= HAA_PENDING_POSITION;
You cannot get a SIGSEV there unless gdb failed or actor is NULL. Is "actor" NULL? If it is, use SDL_GetError to check out what happened.
 

The Following User Says Thank You to javispedro For This Useful Post:
Posts: 270 | Thanked: 239 times | Joined on Dec 2009 @ Czech Republic
#20
Thanks. I had to add SDL_surface *surface = SDL_SetVideoMode(0,0,16,SDL_SURFACE); I render everything to actor->surface but after HAA_flip(actor) screen is blank. When I blit actor->surface to another surface and do flip there it works. Of course without scaling.

Last edited by Figa; 2010-09-13 at 20:31.
 
Reply


 
Forum Jump


All times are GMT. The time now is 23:53.