diff Applications/Sdl/SdlStoneApplicationRunner.cpp @ 1066:b537002f83a9 broker

removing broker from deprecated classes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 15 Oct 2019 15:39:39 +0200
parents 4fe4b221a31f
children 04a95ee91327
line wrap: on
line diff
--- a/Applications/Sdl/SdlStoneApplicationRunner.cpp	Tue Oct 15 14:08:15 2019 +0200
+++ b/Applications/Sdl/SdlStoneApplicationRunner.cpp	Tue Oct 15 15:39:39 2019 +0200
@@ -103,14 +103,13 @@
     LOG(WARNING) << "Starting the application";
 
     SdlWindow window(title.c_str(), width_, height_, enableOpenGl_);
-    SdlEngine sdl(window, context, broker_);
+    SdlEngine sdl(window, context);
 
     {
       NativeStoneApplicationContext::GlobalMutexLocker locker(context);
 
-      locker.GetCentralViewport().RegisterObserverCallback(
-        new Callable<SdlEngine, Deprecated::IViewport::ViewportChangedMessage>
-        (sdl, &SdlEngine::OnViewportChanged));
+      sdl.Register<Deprecated::IViewport::ViewportChangedMessage>
+        (locker.GetCentralViewport(), &SdlEngine::OnViewportChanged);
 
       //context.GetCentralViewport().Register(sdl);  // (*)
     }