[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Enigma-devel] Source of screen width is somewhat a mess ...
From: |
Till Harbaum / Lists |
Subject: |
[Enigma-devel] Source of screen width is somewhat a mess ... |
Date: |
Wed, 13 Feb 2008 19:25:30 +0100 |
User-agent: |
KMail/1.9.6 (enterprise 0.20070907.709405) |
Hi,
adding some extra things on the screen isn't that trivial as i just learned.
This is due to the fact that enigma is mixing two different sources of screen
width information to do the drawing.
Most parts rely on the contents of the vminfo structure. But others instead
request the screen size directly from the SDL layer. This makes things
like the sidebar on my 800x480 screen quite difficult to implement. You can
see what i am talking about if you just add some fake pixels to the window
width in Video_SDL::init:
bpp = SDL_VideoModeOK (w+100, h, bpp, flags);
if (bpp == 0)
return false;
sdlScreen = SDL_SetVideoMode(w+100, h, bpp, flags);
if (sdlScreen == 0)
return false;
This will result in some of the video related stuff (e.g. the backgrounds) to
be left aligned as they use the vmwinfo structure which is unaware of the 100
extra pixels. And some things like the options menu are using the entire
wider window area as e.g. the menu centering functionality uses the values
requested from the SDL layer which is aware of the 100 extra pixels.
This is rather inconsistent and imho might need some fixing.
Till