mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-09-14 13:56:48 +08:00
chore: linting
This commit is contained in:
parent
f20b2a0c37
commit
8dbb4aa7e8
@ -19,7 +19,8 @@ float g_TimeLast;
|
|||||||
float g_Daytime;
|
float g_Daytime;
|
||||||
|
|
||||||
namespace WallpaperEngine::Application {
|
namespace WallpaperEngine::Application {
|
||||||
CWallpaperApplication::CWallpaperApplication (CApplicationContext& context, WallpaperEngine::WebBrowser::CWebBrowserContext& browserContext) :
|
CWallpaperApplication::CWallpaperApplication (CApplicationContext& context,
|
||||||
|
WallpaperEngine::WebBrowser::CWebBrowserContext& browserContext) :
|
||||||
m_context (context),
|
m_context (context),
|
||||||
m_defaultBackground (nullptr),
|
m_defaultBackground (nullptr),
|
||||||
browserContext (browserContext) {
|
browserContext (browserContext) {
|
||||||
|
@ -9,7 +9,6 @@ const std::string& CWeb::getFilename () {
|
|||||||
return this->m_filename;
|
return this->m_filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
CWeb::CWeb (std::string filename, CProject& project) : CWallpaper (Type, project), m_filename (std::move (filename)) {
|
CWeb::CWeb (std::string filename, CProject& project) : CWallpaper (Type, project), m_filename (std::move (filename)) {}
|
||||||
}
|
|
||||||
|
|
||||||
const std::string CWeb::Type = "web";
|
const std::string CWeb::Type = "web";
|
||||||
|
@ -287,7 +287,8 @@ CWallpaper* CWallpaper::fromWallpaper (Core::CWallpaper* wallpaper, CRenderConte
|
|||||||
if (wallpaper->is<Core::CVideo> ())
|
if (wallpaper->is<Core::CVideo> ())
|
||||||
return new WallpaperEngine::Render::CVideo (wallpaper->as<Core::CVideo> (), context, audioContext, scalingMode);
|
return new WallpaperEngine::Render::CVideo (wallpaper->as<Core::CVideo> (), context, audioContext, scalingMode);
|
||||||
else if (wallpaper->is<Core::CWeb> ())
|
else if (wallpaper->is<Core::CWeb> ())
|
||||||
return new WallpaperEngine::Render::CWeb (wallpaper->as<Core::CWeb> (), context, audioContext, browserContext, scalingMode);
|
return new WallpaperEngine::Render::CWeb (wallpaper->as<Core::CWeb> (), context, audioContext, browserContext,
|
||||||
|
scalingMode);
|
||||||
else
|
else
|
||||||
sLog.exception ("Unsupported wallpaper type");
|
sLog.exception ("Unsupported wallpaper type");
|
||||||
}
|
}
|
@ -6,8 +6,7 @@
|
|||||||
using namespace WallpaperEngine::Render;
|
using namespace WallpaperEngine::Render;
|
||||||
using namespace WallpaperEngine::WebBrowser;
|
using namespace WallpaperEngine::WebBrowser;
|
||||||
|
|
||||||
CWeb::CWeb (Core::CWeb* web, CRenderContext& context, CAudioContext& audioContext,
|
CWeb::CWeb (Core::CWeb* web, CRenderContext& context, CAudioContext& audioContext, CWebBrowserContext& browserContext,
|
||||||
CWebBrowserContext& browserContext,
|
|
||||||
const CWallpaperState::TextureUVsScaling& scalingMode) :
|
const CWallpaperState::TextureUVsScaling& scalingMode) :
|
||||||
CWallpaper (web, Type, context, audioContext, scalingMode),
|
CWallpaper (web, Type, context, audioContext, scalingMode),
|
||||||
m_width (16),
|
m_width (16),
|
||||||
|
@ -17,14 +17,13 @@ CWebBrowserContext::CWebBrowserContext (int argc, char** argv) : m_stopped(false
|
|||||||
|
|
||||||
CefMainArgs args (argc, argv2);
|
CefMainArgs args (argc, argv2);
|
||||||
|
|
||||||
int exit_code = CefExecuteProcess(args, nullptr, nullptr);//Spawned processes will terminate here(see CefIninitilize below). Maybe implementing settings.browser_subprocess_path will allow it to work not in main function.
|
int exit_code = CefExecuteProcess (
|
||||||
if (exit_code >= 0)
|
args, nullptr, nullptr); // Spawned processes will terminate here(see CefIninitilize below). Maybe implementing
|
||||||
{
|
// settings.browser_subprocess_path will allow it to work not in main function.
|
||||||
|
if (exit_code >= 0) {
|
||||||
// Sub proccess has endend, so exit
|
// Sub proccess has endend, so exit
|
||||||
exit (exit_code);
|
exit (exit_code);
|
||||||
}
|
} else if (exit_code == -1) {
|
||||||
else if (exit_code == -1)
|
|
||||||
{
|
|
||||||
// If called for the browser process (identified by no "type" command-line value)
|
// If called for the browser process (identified by no "type" command-line value)
|
||||||
// it will return immediately with a value of -1
|
// it will return immediately with a value of -1
|
||||||
}
|
}
|
||||||
@ -44,8 +43,7 @@ CWebBrowserContext::CWebBrowserContext (int argc, char** argv) : m_stopped(false
|
|||||||
// spawns two new processess
|
// spawns two new processess
|
||||||
bool result = CefInitialize (args, settings, nullptr, nullptr);
|
bool result = CefInitialize (args, settings, nullptr, nullptr);
|
||||||
|
|
||||||
if (!result)
|
if (!result) {
|
||||||
{
|
|
||||||
sLog.exception ("CefInitialize: failed");
|
sLog.exception ("CefInitialize: failed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user