#7 video_set_mode flag list broken

v0.5
closed-accepted
nobody
Image (1)
5
2002-08-29
2002-05-28
Anonymous
No

Hello,

Sdlvideo.video_set_mode does not handle flag lists
correctly.

The code in the stub library supposes that there is
only one concrete type with all the flags, but this is
not the case, since there is a first concrete type with
two constructors (C and E) and then a list of constant
constructors for each of these two types.

I am not entirely sure that splitting the flags like
that trully brings something, but anyway, here is a
patch that will fix it (i can now open a fullscreen
screen :)))

--- patch here ---
@@ -199,7 +199,9 @@
value l = flag_list;
while (is_not_nil(l))
{
- switch (Int_val(hd(l)))
+ int v = hd(l);
+ int f = (ASYNCBLIT_tag * Tag_val(v)) +
Int_val(Field(v, 0));
+ switch (f)
{
case SWSURFACE_tag : flag |= SDL_SWSURFACE
; break;
case HWSURFACE_tag : flag |= SDL_HWSURFACE
; break;
--- patch end ---

Friendly,

Sven Luther

Discussion

  • Mazardo Luc

    Mazardo Luc - 2002-06-06

    Logged In: YES
    user_id=3279

    seems to be good now.

     
  • Mazardo Luc

    Mazardo Luc - 2002-08-29
    • status: open --> closed
     
  • Mazardo Luc

    Mazardo Luc - 2002-08-29
    • labels: 330054 --> Image
    • status: closed --> closed-accepted
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks