Mercurial > hg > orthanc-stone
diff Applications/Sdl/SdlStoneApplicationRunner.cpp @ 1068:04a95ee91327 broker
recovery of OrthancStoneSingleFrame
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 15 Oct 2019 19:36:57 +0200 |
parents | b537002f83a9 |
children | 8d3936f06541 |
line wrap: on
line diff
--- a/Applications/Sdl/SdlStoneApplicationRunner.cpp Tue Oct 15 18:11:40 2019 +0200 +++ b/Applications/Sdl/SdlStoneApplicationRunner.cpp Tue Oct 15 19:36:57 2019 +0200 @@ -34,6 +34,7 @@ #include <Core/OrthancException.h> #include <Plugins/Samples/Common/OrthancHttpConnection.h> +#include <boost/make_shared.hpp> #include <boost/program_options.hpp> namespace OrthancStone @@ -103,19 +104,19 @@ LOG(WARNING) << "Starting the application"; SdlWindow window(title.c_str(), width_, height_, enableOpenGl_); - SdlEngine sdl(window, context); + boost::shared_ptr<SdlEngine> sdl(boost::make_shared<SdlEngine>(window, context)); { NativeStoneApplicationContext::GlobalMutexLocker locker(context); - sdl.Register<Deprecated::IViewport::ViewportChangedMessage> + sdl->Register<Deprecated::IViewport::ViewportChangedMessage> (locker.GetCentralViewport(), &SdlEngine::OnViewportChanged); //context.GetCentralViewport().Register(sdl); // (*) } context.Start(); - sdl.Run(); + sdl->Run(); LOG(WARNING) << "Stopping the application";