mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-11 11:45:21 +00:00
COMMON: Remove kInvalidPathError
This commit is contained in:
parent
7c13aa48cd
commit
cd2fcaf4ca
@ -131,7 +131,7 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const
|
||||
|
||||
// Verify that the game path refers to an actual directory
|
||||
if (!(dir.exists() && dir.isDirectory()))
|
||||
err = Common::kInvalidPathError;
|
||||
err = Common::kPathNotDirectory;
|
||||
|
||||
// Create the game engine
|
||||
if (err.getCode() == Common::kNoError)
|
||||
|
@ -40,8 +40,6 @@ static String errorToString(ErrorCode errorCode) {
|
||||
switch (errorCode) {
|
||||
case kNoError:
|
||||
return _s("No error");
|
||||
case kInvalidPathError:
|
||||
return _s("Invalid path");
|
||||
case kNoGameDataFoundError:
|
||||
return _s("Game data not found");
|
||||
case kUnsupportedGameidError:
|
||||
@ -54,7 +52,6 @@ static String errorToString(ErrorCode errorCode) {
|
||||
case kWritePermissionDenied:
|
||||
return _s("Write permission denied");
|
||||
|
||||
// The following three overlap a bit with kInvalidPathError and each other. Which to keep?
|
||||
case kPathDoesNotExist:
|
||||
return _s("Path does not exist");
|
||||
case kPathNotDirectory:
|
||||
|
@ -47,7 +47,6 @@ namespace Common {
|
||||
*/
|
||||
enum ErrorCode {
|
||||
kNoError = 0, ///< No error occurred
|
||||
kInvalidPathError, ///< Engine initialization: Invalid game path was passed
|
||||
kNoGameDataFoundError, ///< Engine initialization: No game data was found in the specified location
|
||||
kUnsupportedGameidError, ///< Engine initialization: Gameid not supported by this (Meta)Engine
|
||||
kUnsupportedColorMode, ///< Engine initialization: Engine does not support backend's color mode
|
||||
@ -56,7 +55,6 @@ enum ErrorCode {
|
||||
kReadPermissionDenied, ///< Unable to read data due to missing read permission
|
||||
kWritePermissionDenied, ///< Unable to write data due to missing write permission
|
||||
|
||||
// The following three overlap a bit with kInvalidPathError and each other. Which to keep?
|
||||
kPathDoesNotExist, ///< The specified path does not exist
|
||||
kPathNotDirectory, ///< The specified path does not point to a directory
|
||||
kPathNotFile, ///< The specified path does not point to a file
|
||||
|
@ -994,7 +994,7 @@ Common::Error ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) co
|
||||
Common::FSList fslist;
|
||||
Common::FSNode dir(ConfMan.get("path"));
|
||||
if (!dir.isDirectory())
|
||||
return Common::kInvalidPathError;
|
||||
return Common::kPathNotDirectory;
|
||||
if (!dir.getChildren(fslist, Common::FSNode::kListFilesOnly))
|
||||
return Common::kNoGameDataFoundError;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user