Mercurial > fife-parpg
changeset 695:47d58c7a95d7
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.
author | M. George Hansen <technopolitica@gmail.com> |
---|---|
date | Fri, 10 Jun 2011 23:36:14 -1000 |
parents | ca1fcb96907d |
children | e201abd8c807 |
files | engine/core/controller/engine.cpp engine/core/eventchannel/eventmanager.cpp engine/core/vfs/vfsdirectory.h |
diffstat | 3 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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");
--- 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);
--- 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();