Fullscreen Splash Revisited
#1
this post is mostly for JMarshall. sorry to keep bringing this one up, it's just i don't like leaving things unresolved.
here's a newly modified Splash.cpp:
http://appliedcuriosity.cc/xbox/Splash.cpp
here's the relevant code:
Code:
void CSplash::Process()
{
  D3DGAMMARAMP newRamp;
  D3DGAMMARAMP oldRamp;

  g_graphicsContext.Lock();
  g_graphicsContext.Get3DDevice()->Clear(0, NULL, D3DCLEAR_TARGET, 0, 0, 0);
  int sw = g_graphicsContext.GetWidth();
  CGUIImage* image = new CGUIImage(0, 0, 0, 0, 0, 0, m_ImageName);
  image->AllocResources();
  image->SetAspectRatio(CGUIImage::ASPECT_RATIO_KEEP);
  image->SetTextureWidth(sw);
  image->SetPosition(0,0);
  // Store the old gamma ramp
as you can see, this version resizes to the screen's horizontal dimension and uses the aspect ratio property to handle the vertical dimension as you instructed. i believe if i understand everything correctly this means that the image will display with the correct aspect ratio in all resolutions. splash screen makers need only to make their images with 4:3 proportions, and on widescreen systems the top & bottom portions of these images will simply be off the edges of the screen. for the splash concepts i've seen this will work fine, since they're almost universally some sort of logo thing in the middle of a field.
please let me know if this is ok, and i appreciate greatly your patience in this matter.
Reply
#2
This won't work for the default splash image though unless it is padded out (unnecessarily) to 720 pixels.

Will chat with the team about it.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
yeah that's the drawback for this method, current splash graphics will need to be redone a bit. should be relatively painless. can an AdvancedSettings value be used to control stuff in Splash or is it too early in the init process?
Reply
#4
this should just center the picture. then both will work just fine.
Reply
#5
~sigh~
what? you mean center it without re-sizing? thats what my last patch did, but it didn't work correctly under different resolutions apparently (no way to test it myself).
Reply
#6
then i'm quite sure u misunderstood the feedback.

the intention was correct. i guess you hadn't pulled it off in the "correct" way
Reply
#7
The problem is simple:

1. XBMC displays the splash at whatever resolution the user is going to be using for the GUI. Thus, this can be anything from NTSC (720x480) to 1080i (1920x1080). Thus, any image clearly needs scaling.

2. The default image in CVS is smaller than the screen size.

Thus, you have a choice:

1. Define some default width that will be scaled to full screen width. The aspect ratio stuff will take care of the height.

2. Define some portion of the screen that the image will always be scaled in to, no matter what the size.

Currently, we do method 2. You are proposing method 1 - I'm just outlining the potential difficulties. Personally, I don't care which way it works, as long as it always works for the official logo.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#8
well the reason i asked about the AdvancedSettings was that i could simply do a check & logic fork for "FullscreenSplash = true". if this value is undefined it would return false right? so out of box, it would still do option 2, but the user would be able to use AdvancedSettings to allow their splash to go fullscreen. it's logical to assume that if someone were to use this setting they would have already set up an appropriate graphic file.
Reply
#9
advanced is not loaded at that time. and the option is overkill. just implement it correctly using 2) above.
Reply
#10
Why don't we just define a "fullscreen" image as being 720 pixels wide. Then just scale based on that:

displaywidth = texturewidth / 720 * screenwidth.

displayheight = screenheight

set aspect ratio to keep
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#11
Question 
Maybe several versions of splash.png could be implemented instead?, that way the image doesn't have to be re-scaled which will produce a worse quality picture at 720p and 1080i.

splash_default.png (for 480i, 480p, 576i and 576p)
splash_720p.png (larger native resolution for 720p)
splash_1080.png (even larger native resolution for 1080i, and 1080p if that is ever implemented in a ffuture version of XBMC on a other platform)
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#12
I think i will do a "hack" of the splash code for private use.
(maybe i´ll put the code here on the forum later if it works ok)

I think i will define a fullscreen splash as a picture bigger then the lowest resolution (normal NTSC) and everything smaler then that will just get scaled as it is now and centered on screen.

Does that sound like a good idea ? Or is there a big flaw in my thinking ?
  • ASRock ION 330 OpenELEC XBMC Frodo.
  • 47" LG HDTV1080p, AC3/DTS Receiver.
  • 96" Epson LCD 1080p projector
  • 2x Raspbery Pi with XBMC
Reply
#13
Have these functions that SleepyP mentions been removed ?

SetTextureWidth(w);
SetPosition(x,y);

I cant find them in the CGUIImage class.
  • ASRock ION 330 OpenELEC XBMC Frodo.
  • 47" LG HDTV1080p, AC3/DTS Receiver.
  • 96" Epson LCD 1080p projector
  • 2x Raspbery Pi with XBMC
Reply
#14
Just found that it was removed in skin version 2.1.
I´ll continue my ventures Smile
  • ASRock ION 330 OpenELEC XBMC Frodo.
  • 47" LG HDTV1080p, AC3/DTS Receiver.
  • 96" Epson LCD 1080p projector
  • 2x Raspbery Pi with XBMC
Reply

Logout Mark Read Team Forum Stats Members Help
Fullscreen Splash Revisited0