mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-09-14 13:56:48 +08:00
Hopefully addressed #148 while detecting the patches folder
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
This commit is contained in:
parent
a0d1a7202f
commit
6d5c5b7825
@ -40,11 +40,32 @@ void CWallpaperApplication::setupContainer (CCombinedContainer& container, const
|
|||||||
container.addPkg (basepath / "scene.pkg");
|
container.addPkg (basepath / "scene.pkg");
|
||||||
container.addPkg (basepath / "gifscene.pkg");
|
container.addPkg (basepath / "gifscene.pkg");
|
||||||
container.add (new CDirectory (this->m_context.assets));
|
container.add (new CDirectory (this->m_context.assets));
|
||||||
#if !NDEBUG
|
|
||||||
|
// add two possible patches directories to the container
|
||||||
|
// hopefully one sticks
|
||||||
|
bool relative = true;
|
||||||
|
bool absolute = true;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
container.add (new CDirectory ("../share/"));
|
container.add (new CDirectory ("../share/"));
|
||||||
#else
|
}
|
||||||
|
catch (std::runtime_error& ex)
|
||||||
|
{
|
||||||
|
relative = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
container.add (new CDirectory (DATADIR));
|
container.add (new CDirectory (DATADIR));
|
||||||
#endif /* DEBUG */
|
}
|
||||||
|
catch (std::runtime_error& ex)
|
||||||
|
{
|
||||||
|
absolute = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!relative && !absolute)
|
||||||
|
sLog.error ("WARNING: Shader patches directory cannot be found, this might make some backgrounds not work properly");
|
||||||
|
|
||||||
// TODO: move this somewhere else?
|
// TODO: move this somewhere else?
|
||||||
CVirtualContainer* virtualContainer = new CVirtualContainer ();
|
CVirtualContainer* virtualContainer = new CVirtualContainer ();
|
||||||
|
@ -13,9 +13,7 @@ void CustomXIOErrorExitHandler (Display* dsp, void* userdata)
|
|||||||
{
|
{
|
||||||
auto context = static_cast <CX11Output*> (userdata);
|
auto context = static_cast <CX11Output*> (userdata);
|
||||||
|
|
||||||
#if !NDEBUG
|
|
||||||
sLog.debugerror ("Critical XServer error detected. Attempting to recover...");
|
sLog.debugerror ("Critical XServer error detected. Attempting to recover...");
|
||||||
#endif /* DEBUG */
|
|
||||||
|
|
||||||
// refetch all the resources
|
// refetch all the resources
|
||||||
context->reset ();
|
context->reset ();
|
||||||
@ -23,9 +21,7 @@ void CustomXIOErrorExitHandler (Display* dsp, void* userdata)
|
|||||||
|
|
||||||
int CustomXErrorHandler (Display* dpy, XErrorEvent* event)
|
int CustomXErrorHandler (Display* dpy, XErrorEvent* event)
|
||||||
{
|
{
|
||||||
#if !NDEBUG
|
|
||||||
sLog.debugerror ("Detected X error");
|
sLog.debugerror ("Detected X error");
|
||||||
#endif /* DEBUG */
|
|
||||||
|
|
||||||
// call the original handler so we can keep some information reporting
|
// call the original handler so we can keep some information reporting
|
||||||
originalErrorHandler (dpy, event);
|
originalErrorHandler (dpy, event);
|
||||||
@ -35,9 +31,7 @@ int CustomXErrorHandler (Display* dpy, XErrorEvent* event)
|
|||||||
|
|
||||||
int CustomXIOErrorHandler (Display* dsp)
|
int CustomXIOErrorHandler (Display* dsp)
|
||||||
{
|
{
|
||||||
#if !NDEBUG
|
|
||||||
sLog.debugerror ("Detected X error");
|
sLog.debugerror ("Detected X error");
|
||||||
#endif /* DEBUG */
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user