The plot thickens. The resource manager prepends "rsrc/" to anything it

loads, but the sound manager wants to load things directly from the
classpath, so we need to allow it to use the classpath that the resource
manager was configured with to ensure that it did the right thing.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3379 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2005-03-02 04:35:43 +00:00
parent 91f936d147
commit bc837ca289
2 changed files with 11 additions and 1 deletions
@@ -708,7 +708,8 @@ public class SoundManager
String propPath = key.pkgPath + Sounds.PROP_NAME;
Properties props = new Properties();
try {
props.load(_rmgr.getResource(propPath + ".properties"));
props.load(_rmgr.getClassLoader().getResourceAsStream(
propPath + ".properties"));
} catch (IOException ioe) {
Log.warning("Failed to load sound properties " +
"[path=" + propPath + ", error=" + ioe + "].");
@@ -363,6 +363,15 @@ public class ResourceManager
unpack.start();
}
/**
* Returns the class loader being used to load resources if/when there
* are no resource bundles from which to load them.
*/
public ClassLoader getClassLoader ()
{
return _loader;
}
/**
* Fetches a resource from the local repository.
*