Skip to content

Commit

Permalink
Make the global twindow object globally available.
Browse files Browse the repository at this point in the history
Note: This is a quick an not really elegant change. I'll fix this as
soon as I'll have figured how CVideo and twindow should relate to
eachother.
  • Loading branch information
lipk committed Jun 8, 2014
1 parent 0ec70a2 commit d85f74e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/video.cpp
Expand Up @@ -551,6 +551,12 @@ void CVideo::set_window_icon(surface& icon)
assert(window);
window->set_icon(icon);
}

sdl::twindow *CVideo::get_window()
{
return window;
}

#endif

#if SDL_VERSION_ATLEAST(2, 0, 0)
Expand Down
6 changes: 6 additions & 0 deletions src/video.hpp
Expand Up @@ -20,6 +20,10 @@

#include <boost/utility.hpp>

#if SDL_VERSION_ATLEAST(2,0,0)
#include "sdl/window.hpp"
#endif

struct surface;

//possible flags when setting video modes
Expand Down Expand Up @@ -143,6 +147,8 @@ class CVideo : private boost::noncopyable {
* @param icon The new icon for the window.
*/
static void set_window_icon(surface& icon);

static sdl::twindow *get_window();
#endif

/**
Expand Down

0 comments on commit d85f74e

Please sign in to comment.