Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/psx/mednadisc/cdrom/CDAccess.cpp
2 views
1
/* Mednafen - Multi-system Emulator
2
*
3
* This program is free software; you can redistribute it and/or modify
4
* it under the terms of the GNU General Public License as published by
5
* the Free Software Foundation; either version 2 of the License, or
6
* (at your option) any later version.
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*/
17
18
#include "emuware/emuware.h"
19
#include "CDAccess.h"
20
#include "CDAccess_Image.h"
21
#include "CDAccess_CCD.h"
22
23
using namespace CDUtility;
24
25
CDAccess::CDAccess()
26
{
27
28
}
29
30
CDAccess::~CDAccess()
31
{
32
33
}
34
35
CDAccess* CDAccess_Open(const std::string& path, bool image_memcache)
36
{
37
CDAccess *ret = NULL;
38
39
if(path.size() >= 4 && !strcasecmp(path.c_str() + path.size() - 4, ".ccd"))
40
ret = new CDAccess_CCD(path, image_memcache);
41
else
42
ret = new CDAccess_Image(path, image_memcache);
43
44
return ret;
45
}
46
47
48