mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 14:51:40 +00:00
Fix linker issues when doing a plugin build, and (hopefully) also on Windows
svn-id: r28950
This commit is contained in:
parent
162460d18a
commit
ab8997f64d
@ -60,7 +60,7 @@
|
||||
*
|
||||
* @return AbstractFilesystemFactory* The specific factory for the current architecture.
|
||||
*/
|
||||
static AbstractFilesystemFactory *makeFSFactory() {
|
||||
AbstractFilesystemFactory *AbstractFilesystemFactory::makeFSFactory() {
|
||||
#if defined(__amigaos4__)
|
||||
return &AmigaOSFilesystemFactory::instance();
|
||||
#elif defined(__DC__)
|
@ -25,6 +25,7 @@
|
||||
#ifndef ABSTRACT_FILESYSTEM_FACTORY_H
|
||||
#define ABSTRACT_FILESYSTEM_FACTORY_H
|
||||
|
||||
#include "common/stdafx.h"
|
||||
#include "common/str.h"
|
||||
#include "backends/fs/abstract-fs.h"
|
||||
|
||||
@ -68,6 +69,13 @@ public:
|
||||
* On Windows, it will be a special node which "contains" all drives (C:, D:, E:).
|
||||
*/
|
||||
virtual AbstractFilesystemNode *makeRootFileNode() const = 0;
|
||||
|
||||
|
||||
/**
|
||||
* Meta-factory method which returns a concrete AbstractFilesystemFactory
|
||||
* instance depending on the current architecture.
|
||||
*/
|
||||
static AbstractFilesystemFactory *makeFSFactory();
|
||||
};
|
||||
|
||||
#endif /*ABSTRACT_FILESYSTEM_FACTORY_H*/
|
||||
|
@ -81,7 +81,7 @@ public:
|
||||
* @param str String containing the path.
|
||||
* @return Pointer to the first char of the last component inside str.
|
||||
*/
|
||||
static const char *lastPathComponent(const Common::String &str) {
|
||||
const char *lastPathComponent(const Common::String &str) {
|
||||
const char *start = str.c_str();
|
||||
const char *cur = start + str.size() - 2;
|
||||
|
||||
|
@ -82,7 +82,7 @@ const char gpRootPath[] = "gp:\\";
|
||||
* @param str Path to obtain the last component from.
|
||||
* @return Pointer to the first char of the last component inside str.
|
||||
*/
|
||||
static const char *lastPathComponent(const Common::String &str) {
|
||||
const char *lastPathComponent(const Common::String &str) {
|
||||
const char *start = str.c_str();
|
||||
const char *cur = start + str.size() - 2;
|
||||
|
||||
@ -214,7 +214,7 @@ bool GP32FilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool
|
||||
//listDir += "/";
|
||||
|
||||
while (GpDirEnumList(listDir.c_str(), startIdx++, 1, &dirEntry, &read) == SM_OK) {
|
||||
if (dirEntry.name[0] == '.')
|
||||
da if (dirEntry.name[0] == '.')
|
||||
continue;
|
||||
|
||||
entry._displayName = dirEntry.name;
|
||||
|
@ -92,7 +92,7 @@ private:
|
||||
* @param str String containing the path.
|
||||
* @return Pointer to the first char of the last component inside str.
|
||||
*/
|
||||
static const char *lastPathComponent(const Common::String &str) {
|
||||
const char *lastPathComponent(const Common::String &str) {
|
||||
const char *start = str.c_str();
|
||||
const char *cur = start + str.size() - 2;
|
||||
|
||||
|
@ -91,7 +91,7 @@ private:
|
||||
* @param str String containing the path.
|
||||
* @return Pointer to the first char of the last component inside str.
|
||||
*/
|
||||
static const char *lastPathComponent(const Common::String &str) {
|
||||
const char *lastPathComponent(const Common::String &str) {
|
||||
const char *start = str.c_str();
|
||||
const char *cur = start + str.size() - 2;
|
||||
|
||||
|
@ -82,7 +82,7 @@ public:
|
||||
* @param str String containing the path.
|
||||
* @return Pointer to the first char of the last component inside str.
|
||||
*/
|
||||
static const char *lastPathComponent(const Common::String &str) {
|
||||
const char *lastPathComponent(const Common::String &str) {
|
||||
const char *start = str.c_str();
|
||||
const char *cur = start + str.size() - 2;
|
||||
|
||||
|
@ -83,7 +83,7 @@ public:
|
||||
* @param str Path to obtain the last component from.
|
||||
* @return Pointer to the first char of the last component inside str.
|
||||
*/
|
||||
static const char *lastPathComponent(const Common::String &str) {
|
||||
const char *lastPathComponent(const Common::String &str) {
|
||||
const char *start = str.c_str();
|
||||
const char *cur = start + str.size() - 2;
|
||||
|
||||
|
@ -124,7 +124,7 @@ private:
|
||||
* @param str Path to obtain the last component from.
|
||||
* @return Pointer to the first char of the last component inside str.
|
||||
*/
|
||||
static const char *lastPathComponent(const Common::String &str) {
|
||||
const char *lastPathComponent(const Common::String &str) {
|
||||
const char *start = str.c_str();
|
||||
const char *cur = start + str.size() - 2;
|
||||
|
||||
|
@ -2,11 +2,7 @@ MODULE := backends
|
||||
|
||||
MODULE_OBJS := \
|
||||
events/default/default-events.o \
|
||||
fs/posix/posix-fs.o \
|
||||
fs/morphos/abox-fs.o \
|
||||
fs/windows/windows-fs.o \
|
||||
fs/amigaos4/amigaos4-fs.o \
|
||||
fs/dc/dc-fs.o \
|
||||
fs/abstract-fs-factory.o \
|
||||
midi/alsa.o \
|
||||
midi/coreaudio.o \
|
||||
midi/coremidi.o \
|
||||
|
@ -25,9 +25,9 @@
|
||||
#include "common/stdafx.h"
|
||||
#include "common/util.h"
|
||||
#include "backends/fs/abstract-fs.h"
|
||||
#include "backends/fs/fs-factory-maker.cpp"
|
||||
#include "backends/fs/abstract-fs-factory.h"
|
||||
|
||||
/*
|
||||
/**
|
||||
* Simple DOS-style pattern matching function (understands * and ? like used in DOS).
|
||||
* Taken from exult/files/listfiles.cc
|
||||
*/
|
||||
@ -82,7 +82,7 @@ FilesystemNode::FilesystemNode(const FilesystemNode &node) {
|
||||
}
|
||||
|
||||
FilesystemNode::FilesystemNode(const Common::String &p) {
|
||||
AbstractFilesystemFactory *factory = makeFSFactory();
|
||||
AbstractFilesystemFactory *factory = AbstractFilesystemFactory::makeFSFactory();
|
||||
|
||||
if (p.empty() || p == ".")
|
||||
_realNode = factory->makeCurrentDirectoryFileNode();
|
||||
@ -234,6 +234,9 @@ bool FilesystemNode::lookupFile(FSList &results, FilesystemNode &dir, Common::St
|
||||
return ((matches > 0) ? true : false);
|
||||
}
|
||||
|
||||
// HACK HACK HACK
|
||||
extern const char *lastPathComponent(const Common::String &str);
|
||||
|
||||
int FilesystemNode::lookupFileRec(FSList &results, FilesystemNode &dir, Common::String &filename, bool hidden, bool exhaustive) const
|
||||
{
|
||||
FSList entries;
|
||||
|
Loading…
x
Reference in New Issue
Block a user