ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

ps3.cpp

Go to the documentation of this file.
00001 /* ScummVM - Graphic Adventure Engine
00002  *
00003  * ScummVM is the legal property of its developers, whose names
00004  * are too numerous to list here. Please refer to the COPYRIGHT
00005  * file distributed with this source distribution.
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020  *
00021  */
00022 
00023 #define FORBIDDEN_SYMBOL_EXCEPTION_mkdir
00024 #define FORBIDDEN_SYMBOL_EXCEPTION_time_h   // sys/stat.h includes sys/time.h
00025 #define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
00026 
00027 #include "common/scummsys.h"
00028 #include "common/config-manager.h"
00029 #include "backends/platform/sdl/ps3/ps3.h"
00030 #include "backends/graphics/surfacesdl/surfacesdl-graphics.h"
00031 #include "backends/saves/default/default-saves.h"
00032 #include "backends/fs/ps3/ps3-fs-factory.h"
00033 #include "backends/events/ps3sdl/ps3sdl-events.h"
00034 
00035 #include <dirent.h>
00036 #include <sys/stat.h>
00037 
00038 int access(const char *pathname, int mode) {
00039     struct stat sb;
00040 
00041     if (stat(pathname, &sb) == -1) {
00042         return -1;
00043     }
00044 
00045     return 0;
00046 }
00047 
00048 OSystem_PS3::OSystem_PS3(Common::String baseConfigName)
00049     : _baseConfigName(baseConfigName) {
00050 }
00051 
00052 void OSystem_PS3::init() {
00053     // Initialze File System Factory
00054     _fsFactory = new PS3FilesystemFactory();
00055 
00056     // Invoke parent implementation of this method
00057     OSystem_SDL::init();
00058 }
00059 
00060 void OSystem_PS3::initBackend() {
00061     ConfMan.set("joystick_num", 0);
00062     ConfMan.registerDefault("fullscreen", true);
00063     ConfMan.registerDefault("aspect_ratio", true);
00064 
00065     // Create the savefile manager
00066     if (_savefileManager == 0)
00067         _savefileManager = new DefaultSaveFileManager(PREFIX "/saves");
00068 
00069     // Event source
00070     if (_eventSource == 0)
00071         _eventSource = new PS3SdlEventSource();
00072 
00073     // Invoke parent implementation of this method
00074     OSystem_SDL::initBackend();
00075 }
00076 
00077 Common::String OSystem_PS3::getDefaultConfigFileName() {
00078     return PREFIX "/" + _baseConfigName;
00079 }
00080 
00081 Common::WriteStream *OSystem_PS3::createLogFile() {
00082     Common::FSNode file(PREFIX "/residualvm.log");
00083     return file.createWriteStream();
00084 }


Generated on Sat May 25 2019 05:00:51 for ResidualVM by doxygen 1.7.1
curved edge   curved edge