diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 085a54e..6738097 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -14,13 +14,9 @@
-
-
-
-
-
-
+
+
@@ -36,8 +32,8 @@
-
-
+
+
@@ -45,6 +41,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -55,16 +71,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -85,16 +91,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -105,10 +101,20 @@
+
+
+
+
+
+
+
+
+
+
-
+
@@ -118,8 +124,8 @@
-
-
+
+
@@ -129,11 +135,6 @@
- Cannot create
- glXCreate
- glXCreateContex
- Could not bind
- glXCreateCon
context
GL_INVA
GLSL TEST
@@ -159,6 +160,11 @@
do_decompres
nier_
IShaderConstantSetCallBack
+ Failed reso
+ changeWorkingDirectory
+ ::fileResolver
+ "."
+ Failed
@@ -209,15 +215,15 @@
-
-
+
+
@@ -233,7 +239,7 @@
-
+
@@ -259,34 +265,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -358,33 +341,34 @@
-
+
-
+
-
+
+
-
+
+
+
-
+
-
-
@@ -439,43 +423,15 @@
file://$PROJECT_DIR$/wallpaperengine/fs/fileResolver.cpp
- 90
-
+ 106
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -524,6 +480,9 @@
+
+
+
@@ -538,6 +497,7 @@
+
@@ -547,6 +507,7 @@
+
@@ -561,6 +522,7 @@
+
@@ -568,6 +530,7 @@
+
@@ -577,6 +540,9 @@
+
+
+
@@ -584,6 +550,9 @@
+
+
+
@@ -599,6 +568,9 @@
+
+
+
@@ -613,6 +585,7 @@
+
@@ -620,17 +593,11 @@
+
-
-
-
-
-
-
-
@@ -642,6 +609,9 @@
+
+
+
@@ -649,6 +619,7 @@
+
@@ -656,6 +627,7 @@
+
@@ -672,6 +644,7 @@
+
@@ -683,30 +656,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -732,18 +681,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
diff --git a/main.cpp b/main.cpp
index 5e57ff9..54f16b8 100644
--- a/main.cpp
+++ b/main.cpp
@@ -97,10 +97,10 @@ void preconfigure_wallpaper_engine ()
wp::config::path::resources = wp::config::path::base + "/res";
wp::config::path::shaders = wp::config::path::resources + "/shaders";
- wp::fs::resolver.changeWorkingDirectory(wp::config::path::base);
+ wp::fs::resolver.changeWorkingDirectory (wp::config::path::base);
}
-int main(int argc, char* argv[])
+int main (int argc, char* argv[])
{
// parse the integer if it exists
if (argc >= 1)
@@ -110,7 +110,7 @@ int main(int argc, char* argv[])
ss >> WinID;
}
- printf("Initializing X11 to %d\n", WinID);
+ printf ("Initializing X11 to %d\n", WinID);
if (init_irrlicht())
diff --git a/wallpaperengine/fs/fileResolver.cpp b/wallpaperengine/fs/fileResolver.cpp
index a9bc78f..dccfcf6 100644
--- a/wallpaperengine/fs/fileResolver.cpp
+++ b/wallpaperengine/fs/fileResolver.cpp
@@ -18,7 +18,6 @@ namespace wp
fileResolver::fileResolver (std::vector environment)
{
- this->m_environment.push_back (".");
this->m_environment.insert (this->m_environment.end (), environment.begin (), environment.end ());
}
diff --git a/wallpaperengine/image.cpp b/wallpaperengine/image.cpp
index e74aacd..20e2e53 100644
--- a/wallpaperengine/image.cpp
+++ b/wallpaperengine/image.cpp
@@ -64,7 +64,19 @@ namespace wp
for (; texturesCur != texturesEnd; texturesCur ++)
{
+ // TODO: SUPPORT PROPER WALLPAPERENGINE FORMATS
irr::io::path texturePath = this->m_resolver.resolveOnWorkingDirectory ((*texturesCur));
+ std::string basename = (*texturesCur);
+
+ // TRY NORMAL EXTENSIONS FOR NOW...
+ if (texturePath == "")
+ {
+ texturePath = this->m_resolver.resolveOnWorkingDirectory (basename + ".png");
+ }
+ if (texturePath == "")
+ {
+ texturePath = this->m_resolver.resolveOnWorkingDirectory (basename + ".jpg");
+ }
this->m_textures.push_back (new wp::texture (texturePath));
}
@@ -113,7 +125,7 @@ namespace wp
std::vector::const_iterator cur = this->m_textures.begin ();
std::vector::const_iterator end = this->m_textures.end ();
- for (int i = 0; cur != end; cur ++, i ++)
+ for (irr::u32 i = 0; cur != end; cur ++, i ++)
{
this->getMaterial ().setTexture (i, (*cur)->getIrrTexture ());
}