Updated VS2010 project files for recent FSNode changes.

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2602 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2013-02-10 22:28:00 +00:00
parent ec77f9d1b5
commit 96b3d31806
4 changed files with 75 additions and 49 deletions

View File

@ -20,6 +20,44 @@
// Copyright (C) 2002-2004 The ScummVM project
//============================================================================
#include <cassert>
#include <shlobj.h>
#ifdef ARRAYSIZE
#undef ARRAYSIZE
#endif
#ifdef _WIN32_WCE
#include <windows.h>
// winnt.h defines ARRAYSIZE, but we want our own one...
#undef ARRAYSIZE
#undef GetCurrentDirectory
#endif
#include <io.h>
#include <stdio.h>
#ifndef _WIN32_WCE
#include <windows.h>
// winnt.h defines ARRAYSIZE, but we want our own one...
#undef ARRAYSIZE
#endif
// F_OK, R_OK and W_OK are not defined under MSVC, so we define them here
// For more information on the modes used by MSVC, check:
// http://msdn2.microsoft.com/en-us/library/1w06ktdy(VS.80).aspx
#ifndef F_OK
#define F_OK 0
#endif
#ifndef R_OK
#define R_OK 4
#endif
#ifndef W_OK
#define W_OK 2
#endif
#include "FSNodeWin32.hxx"
/**
* Returns the last component of a given path.
*
@ -45,6 +83,24 @@ const char* lastPathComponent(const string& str)
return cur + 1;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool FilesystemNodeWin32::exists() const
{
return _access(_path.c_str(), F_OK) == 0;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool FilesystemNodeWin32::isReadable() const
{
return _access(_path.c_str(), R_OK) == 0;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool FilesystemNodeWin32::isWritable() const
{
return _access(_path.c_str(), W_OK) == 0;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FilesystemNodeWin32::setFlags()
{
@ -279,9 +335,3 @@ AbstractFSNode* FilesystemNodeWin32::getParent() const
return p;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AbstractFSNode* AbstractFSNode::makeFileNodePath(const string& path)
{
return new FilesystemNodeWin32(path);
}

View File

@ -23,44 +23,8 @@
#ifndef FS_NODE_WIN32_HXX
#define FS_NODE_WIN32_HXX
#include <cassert>
#include <shlobj.h>
#ifdef ARRAYSIZE
#undef ARRAYSIZE
#endif
#ifdef _WIN32_WCE
#include <windows.h>
// winnt.h defines ARRAYSIZE, but we want our own one...
#undef ARRAYSIZE
#undef GetCurrentDirectory
#endif
#include <io.h>
#include <stdio.h>
#include <stdlib.h>
#ifndef _WIN32_WCE
#include <windows.h>
// winnt.h defines ARRAYSIZE, but we want our own one...
#undef ARRAYSIZE
#endif
#include <tchar.h>
// F_OK, R_OK and W_OK are not defined under MSVC, so we define them here
// For more information on the modes used by MSVC, check:
// http://msdn2.microsoft.com/en-us/library/1w06ktdy(VS.80).aspx
#ifndef F_OK
#define F_OK 0
#endif
#ifndef R_OK
#define R_OK 4
#endif
#ifndef W_OK
#define W_OK 2
#endif
#include "FSNode.hxx"
#include "HomeFinder.hxx"
@ -98,14 +62,14 @@ class FilesystemNodeWin32 : public AbstractFSNode
*/
FilesystemNodeWin32(const string& path);
bool exists() const { return _access(_path.c_str(), F_OK) == 0; }
bool exists() const;
const string& getName() const { return _displayName; }
const string& getPath() const { return _path; }
string getShortPath() const;
bool isDirectory() const { return _isDirectory; }
bool isFile() const { return _isFile; }
bool isReadable() const { return _access(_path.c_str(), R_OK) == 0; }
bool isWritable() const { return _access(_path.c_str(), W_OK) == 0; }
bool isReadable() const;
bool isWritable() const;
bool isAbsolute() const;
bool makeDir();
bool rename(const string& newfile);

View File

@ -223,6 +223,7 @@ SDLmain.lib
<ClCompile Include="..\common\FBSurfaceTIA.cxx" />
<ClCompile Include="..\common\FrameBufferGL.cxx" />
<ClCompile Include="..\common\FrameBufferSoft.cxx" />
<ClCompile Include="..\common\FSNodeZIP.cxx" />
<ClCompile Include="..\common\MouseControl.cxx" />
<ClCompile Include="..\common\tv_filters\atari_ntsc.c" />
<ClCompile Include="..\common\tv_filters\NTSCFilter.cxx" />
@ -294,7 +295,6 @@ SDLmain.lib
<ClCompile Include="..\emucore\M6502.cxx" />
<ClCompile Include="..\emucore\M6532.cxx" />
<ClCompile Include="..\emucore\MD5.cxx" />
<ClCompile Include="..\emucore\MediaFactory.cxx" />
<ClCompile Include="..\emucore\MT24LC256.cxx" />
<ClCompile Include="..\emucore\NullDev.cxx" />
<ClCompile Include="..\emucore\OSystem.cxx" />
@ -423,6 +423,8 @@ SDLmain.lib
<ClInclude Include="..\common\FBSurfaceTIA.hxx" />
<ClInclude Include="..\common\FrameBufferGL.hxx" />
<ClInclude Include="..\common\FrameBufferSoft.hxx" />
<ClInclude Include="..\common\FSNodeFactory.hxx" />
<ClInclude Include="..\common\FSNodeZIP.hxx" />
<ClInclude Include="..\common\MouseControl.hxx" />
<ClInclude Include="..\common\StellaKeys.hxx" />
<ClInclude Include="..\common\StringList.hxx" />
@ -449,6 +451,7 @@ SDLmain.lib
<ClInclude Include="..\libpng\pnginfo.h" />
<ClInclude Include="..\libpng\pnglibconf.h" />
<ClInclude Include="..\libpng\pngstruct.h" />
<ClInclude Include="FSNodeWin32.hxx" />
<ClInclude Include="HomeFinder.hxx" />
<ClInclude Include="OSystemWin32.hxx" />
<ClInclude Include="..\common\PNGLibrary.hxx" />

View File

@ -213,9 +213,6 @@
<ClCompile Include="..\emucore\MD5.cxx">
<Filter>Source Files\emucore</Filter>
</ClCompile>
<ClCompile Include="..\emucore\MediaFactory.cxx">
<Filter>Source Files\emucore</Filter>
</ClCompile>
<ClCompile Include="..\emucore\MT24LC256.cxx">
<Filter>Source Files\emucore</Filter>
</ClCompile>
@ -627,6 +624,9 @@
<ClCompile Include="..\emucore\CartCTY.cxx">
<Filter>Source Files\emucore</Filter>
</ClCompile>
<ClCompile Include="..\common\FSNodeZIP.cxx">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\common\Array.hxx">
@ -1247,6 +1247,15 @@
<ClInclude Include="..\emucore\CartCTYTunes.hxx">
<Filter>Header Files\emucore</Filter>
</ClInclude>
<ClInclude Include="..\common\FSNodeFactory.hxx">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\common\FSNodeZIP.hxx">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="FSNodeWin32.hxx">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="stella.ico">