# HG changeset patch # User M. George Hansen # Date 1307784974 36000 # Node ID 47d58c7a95d7dd8594784eff96be21bc2bac06e4 # Parent ca1fcb96907de55643ffe9c12f1d227711114627 Fixed a bug in VFSDirectory that prevented absolute paths from being resolved. * Modified the VFSDirectory constructor so that it now adds the drive root as the VFS root by default, instead of the current working directory. * Added the current working directory to the VFS in Engine::preInit in addition to the default drive root. * Reverted a change to EventManager::processMouseEvent which prevents GUIChan from grabbing mouse input. The fact that GUIChan grabs all mouse input will need to be addressed once the GUI code is modularized. diff -r ca1fcb96907d -r 47d58c7a95d7 engine/core/controller/engine.cpp --- a/engine/core/controller/engine.cpp Fri Jun 10 23:35:30 2011 -1000 +++ b/engine/core/controller/engine.cpp Fri Jun 10 23:36:14 2011 -1000 @@ -169,6 +169,7 @@ FL_LOG(_log, "Adding root directory to VFS"); m_vfs->addSource( new VFSDirectory(m_vfs) ); + m_vfs->addSource( new VFSDirectory(m_vfs, "./") ); m_vfs->addProvider( new DirectoryProvider() ); #ifdef HAVE_ZIP FL_LOG(_log, "Adding zip provider to VFS"); diff -r ca1fcb96907d -r 47d58c7a95d7 engine/core/eventchannel/eventmanager.cpp --- a/engine/core/eventchannel/eventmanager.cpp Fri Jun 10 23:35:30 2011 -1000 +++ b/engine/core/eventchannel/eventmanager.cpp Fri Jun 10 23:36:14 2011 -1000 @@ -435,8 +435,8 @@ void EventManager::processMouseEvent(SDL_Event event) { // FIXME Technomage 2011-02-02: Guichan just consumes all mouse events. -// if(dispatchSdlEvent(event)) -// return; + if(dispatchSdlEvent(event)) + return; MouseEvent mouseevt; mouseevt.setSource(this); diff -r ca1fcb96907d -r 47d58c7a95d7 engine/core/vfs/vfsdirectory.h --- a/engine/core/vfs/vfsdirectory.h Fri Jun 10 23:35:30 2011 -1000 +++ b/engine/core/vfs/vfsdirectory.h Fri Jun 10 23:36:14 2011 -1000 @@ -47,7 +47,7 @@ * Creates the given file system's VFS Source, Uses boost_filesystem to * achieve Plattform independancy. */ - VFSDirectory(VFS* vfs, const std::string& root = "./"); + VFSDirectory(VFS* vfs, const std::string& root = "/"); /** Destructor */ virtual ~VFSDirectory();