Skip to content

Commit

Permalink
Core (LV::Bin): Re-implement.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaixiong committed Jan 21, 2025
1 parent 9c932a6 commit 43eb434
Show file tree
Hide file tree
Showing 7 changed files with 270 additions and 557 deletions.
17 changes: 2 additions & 15 deletions libvisual/examples/simple/simple_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,8 @@ SimpleExample::SimpleExample ()

SDL_WM_SetCaption (m_actor_name.c_str (), 0);

m_bin.depth_changed ();

m_bin.realize ();
m_bin.sync (false);
m_bin.sync ();

m_bin.use_morph (true);
m_bin.set_morph (m_morph_name);
Expand Down Expand Up @@ -126,7 +124,7 @@ void SimpleExample::resize_display (int width, int height)
create_display (width, height, m_bin.get_depth ());

m_bin.set_video (m_screen);
m_bin.sync (false);
m_bin.sync ();
}

void SimpleExample::set_palette (LV::Palette const& pal)
Expand Down Expand Up @@ -219,16 +217,5 @@ void SimpleExample::run ()
if (!handle_events ()) {
break;
}

if (m_bin.depth_changed ())
{
int depthflag = m_bin.get_depth ();
VisVideoDepth depth = visual_video_depth_get_highest (depthflag);

create_display (m_screen->get_width (), m_screen->get_height (), depth);
m_bin.set_video (m_screen);

m_bin.sync (true);
}
}
}
Loading

0 comments on commit 43eb434

Please sign in to comment.