Make the global twindow object globally available.

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.
This commit is contained in:
Boldizsár Lipka 2014-06-08 10:54:54 +02:00
parent 0ec70a22fd
commit d85f74e64d
2 changed files with 12 additions and 0 deletions

View file

@ -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)

View file

@ -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
@ -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
/**