|
@@ -227,14 +227,18 @@ int main (int argc, char* argv[])
|
|
|
return 3;
|
|
return 3;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // parse the project.json file
|
|
|
|
|
+ auto project = WallpaperEngine::Core::CProject::fromFile ("project.json", containers);
|
|
|
|
|
+ // go to the right folder so the videos will play
|
|
|
|
|
+ if (project->getWallpaper ()->is <WallpaperEngine::Core::CVideo> () == true)
|
|
|
|
|
+ chdir (path.c_str ());
|
|
|
|
|
+
|
|
|
// initialize custom context class
|
|
// initialize custom context class
|
|
|
WallpaperEngine::Render::CContext* context = new WallpaperEngine::Render::CContext (screens, window);
|
|
WallpaperEngine::Render::CContext* context = new WallpaperEngine::Render::CContext (screens, window);
|
|
|
// initialize mouse support
|
|
// initialize mouse support
|
|
|
context->setMouse (new CMouseInput (window));
|
|
context->setMouse (new CMouseInput (window));
|
|
|
// set the default viewport
|
|
// set the default viewport
|
|
|
context->setDefaultViewport ({0, 0, windowWidth, windowHeight});
|
|
context->setDefaultViewport ({0, 0, windowWidth, windowHeight});
|
|
|
- // parse the project.json file
|
|
|
|
|
- auto project = WallpaperEngine::Core::CProject::fromFile ("project.json", containers);
|
|
|
|
|
// ensure the context knows what wallpaper to render
|
|
// ensure the context knows what wallpaper to render
|
|
|
context->setWallpaper (
|
|
context->setWallpaper (
|
|
|
WallpaperEngine::Render::CWallpaper::fromWallpaper (project->getWallpaper (), containers, context)
|
|
WallpaperEngine::Render::CWallpaper::fromWallpaper (project->getWallpaper (), containers, context)
|