mirror of https://github.com/PCSX2/pcsx2.git
plugins: Remove CDVDolio
Superseded by PCSX2 internal ISO reader and cdvdGigaherz.
This commit is contained in:
parent
0d659a1b46
commit
6aef44271e
|
@ -290,7 +290,6 @@ endif()
|
|||
#-------------------------------------------------------------------------------
|
||||
# Super-seeded by cdvdGigaherz
|
||||
set(CDVDisoEFP FALSE)
|
||||
set(CDVDolio FALSE)
|
||||
set(CDVDpeops FALSE)
|
||||
set(CDVDlinuz FALSE) # used to be compiled on linux
|
||||
set(CDVDiso FALSE) # used to be compiled on linux
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25123.0
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3rdparty", "3rdparty", "{78EBE642-7A4D-4EA7-86BE-5639C6646C38}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
|
@ -18,7 +18,6 @@ EndProject
|
|||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Include", "Include", "{0FADC26C-0E9D-4DD7-84B1-BF4F7754E90C}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
common\include\afxresmw.h = common\include\afxresmw.h
|
||||
common\include\intrin_x86.h = common\include\intrin_x86.h
|
||||
common\include\Pcsx2Api.h = common\include\Pcsx2Api.h
|
||||
common\include\Pcsx2Defs.h = common\include\Pcsx2Defs.h
|
||||
common\include\Pcsx2Types.h = common\include\Pcsx2Types.h
|
||||
|
@ -43,21 +42,19 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bzip2", "3rdparty\bzip2\bzi
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZeroSPU2", "plugins\zerospu2\Windows\ZeroSPU2.vcxproj", "{7F059854-568D-4E08-9D00-1E78E203E4DC}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CDVDolio", "plugins\CDVDolio\CDVDolio.vcxproj", "{FCDF5AE2-EA47-4CC6-9F20-23A0517FEBCB}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "utilities", "common\build\Utilities\utilities.vcxproj", "{4639972E-424E-4E13-8B07-CA403C481346}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg7", "3rdparty\libjpeg\libjpeg.vcxproj", "{BC236261-77E8-4567-8D09-45CD02965EB6}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "3rdparty\libjpeg\libjpeg.vcxproj", "{BC236261-77E8-4567-8D09-45CD02965EB6}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PadSSSPSX", "plugins\SSSPSXPAD\PadSSSPSX.vcxproj", "{6C8D28E4-447E-4856-BD9E-6B8F5E7C58C9}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZZOgl", "plugins\zzogl-pg\opengl\Win32\zerogsogl.vcxproj", "{2D4E85B2-F47F-4D65-B091-701E5C031DAC}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxBase30", "3rdparty\wxwidgets3.0\build\msw\wx30_base.vcxproj", "{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wx30_base", "3rdparty\wxwidgets3.0\build\msw\wx30_base.vcxproj", "{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxConfig30", "3rdparty\wxwidgets3.0\build\msw\wx30_config.vcxproj", "{01F4CE10-2CFB-41A8-B41F-E54337868A1D}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wx30_config", "3rdparty\wxwidgets3.0\build\msw\wx30_config.vcxproj", "{01F4CE10-2CFB-41A8-B41F-E54337868A1D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxCore30", "3rdparty\wxwidgets3.0\build\msw\wx30_core.vcxproj", "{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wx30_core", "3rdparty\wxwidgets3.0\build\msw\wx30_core.vcxproj", "{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "3rdparty\libpng\projects\vstudio\libpng\libpng.vcxproj", "{D6973076-9317-4EF2-A0B8-B7A18AC0713E}"
|
||||
EndProject
|
||||
|
@ -130,18 +127,6 @@ Global
|
|||
{7F059854-568D-4E08-9D00-1E78E203E4DC}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{7F059854-568D-4E08-9D00-1E78E203E4DC}.Release|Win32.Build.0 = Release|Win32
|
||||
{7F059854-568D-4E08-9D00-1E78E203E4DC}.Release|x64.ActiveCfg = Release|Win32
|
||||
{FCDF5AE2-EA47-4CC6-9F20-23A0517FEBCB}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FCDF5AE2-EA47-4CC6-9F20-23A0517FEBCB}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FCDF5AE2-EA47-4CC6-9F20-23A0517FEBCB}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{FCDF5AE2-EA47-4CC6-9F20-23A0517FEBCB}.Debug|x64.Build.0 = Debug|x64
|
||||
{FCDF5AE2-EA47-4CC6-9F20-23A0517FEBCB}.Devel|Win32.ActiveCfg = Release|Win32
|
||||
{FCDF5AE2-EA47-4CC6-9F20-23A0517FEBCB}.Devel|Win32.Build.0 = Release|Win32
|
||||
{FCDF5AE2-EA47-4CC6-9F20-23A0517FEBCB}.Devel|x64.ActiveCfg = Release|x64
|
||||
{FCDF5AE2-EA47-4CC6-9F20-23A0517FEBCB}.Devel|x64.Build.0 = Release|x64
|
||||
{FCDF5AE2-EA47-4CC6-9F20-23A0517FEBCB}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FCDF5AE2-EA47-4CC6-9F20-23A0517FEBCB}.Release|Win32.Build.0 = Release|Win32
|
||||
{FCDF5AE2-EA47-4CC6-9F20-23A0517FEBCB}.Release|x64.ActiveCfg = Release|x64
|
||||
{FCDF5AE2-EA47-4CC6-9F20-23A0517FEBCB}.Release|x64.Build.0 = Release|x64
|
||||
{4639972E-424E-4E13-8B07-CA403C481346}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{4639972E-424E-4E13-8B07-CA403C481346}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{4639972E-424E-4E13-8B07-CA403C481346}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
|
@ -248,7 +233,6 @@ Global
|
|||
{2F6C0388-20CB-4242-9F6C-A6EBB6A83F47} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
|
||||
{F4EB4AB2-C595-4B05-8BC0-059024BC796C} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
|
||||
{7F059854-568D-4E08-9D00-1E78E203E4DC} = {703FD00B-D7A0-41E3-BD03-CEC86B385DAF}
|
||||
{FCDF5AE2-EA47-4CC6-9F20-23A0517FEBCB} = {703FD00B-D7A0-41E3-BD03-CEC86B385DAF}
|
||||
{4639972E-424E-4E13-8B07-CA403C481346} = {88F517F9-CE1C-4005-9BDF-4481FEB55053}
|
||||
{BC236261-77E8-4567-8D09-45CD02965EB6} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
|
||||
{6C8D28E4-447E-4856-BD9E-6B8F5E7C58C9} = {703FD00B-D7A0-41E3-BD03-CEC86B385DAF}
|
||||
|
|
|
@ -1,177 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2009 Gabest
|
||||
* http://www.gabest.org
|
||||
*
|
||||
* This Program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This Program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Make; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA USA.
|
||||
* http://www.gnu.org/copyleft/gpl.html
|
||||
*
|
||||
*/
|
||||
|
||||
#include "StdAfx.h"
|
||||
#include "CDVD.h"
|
||||
#include "CDVDDialog.h"
|
||||
|
||||
CDVDDialog::CDVDDialog(UINT id)
|
||||
: m_id(id)
|
||||
, m_hWnd(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
INT_PTR CDVDDialog::DoModal()
|
||||
{
|
||||
return DialogBoxParam(theApp.GetModuleHandle(), MAKEINTRESOURCE(m_id), NULL, DialogProc, (LPARAM)this);
|
||||
}
|
||||
|
||||
INT_PTR CALLBACK CDVDDialog::DialogProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
CDVDDialog* dlg = NULL;
|
||||
|
||||
if(message == WM_INITDIALOG)
|
||||
{
|
||||
dlg = (CDVDDialog*)lParam;
|
||||
SetWindowLongPtr(hWnd, GWL_USERDATA, (LONG_PTR)dlg);
|
||||
dlg->m_hWnd = hWnd;
|
||||
|
||||
MONITORINFO mi;
|
||||
mi.cbSize = sizeof(mi);
|
||||
GetMonitorInfo(MonitorFromWindow(hWnd, MONITOR_DEFAULTTONEAREST), &mi);
|
||||
|
||||
RECT r;
|
||||
GetWindowRect(hWnd, &r);
|
||||
|
||||
int x = (mi.rcWork.left + mi.rcWork.right - (r.right - r.left)) / 2;
|
||||
int y = (mi.rcWork.top + mi.rcWork.bottom - (r.bottom - r.top)) / 2;
|
||||
|
||||
SetWindowPos(hWnd, NULL, x, y, -1, -1, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
|
||||
|
||||
dlg->OnInit();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
dlg = (CDVDDialog*)GetWindowLongPtr(hWnd, GWL_USERDATA);
|
||||
|
||||
return dlg != NULL ? dlg->OnMessage(message, wParam, lParam) : FALSE;
|
||||
}
|
||||
|
||||
bool CDVDDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
return message == WM_COMMAND ? OnCommand((HWND)lParam, LOWORD(wParam), HIWORD(wParam)) : false;
|
||||
}
|
||||
|
||||
bool CDVDDialog::OnCommand(HWND hWnd, UINT id, UINT code)
|
||||
{
|
||||
if(id == IDOK || id == IDCANCEL)
|
||||
{
|
||||
EndDialog(m_hWnd, id);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
string CDVDDialog::GetText(UINT id)
|
||||
{
|
||||
string s;
|
||||
|
||||
char* buff = NULL;
|
||||
|
||||
for(int size = 256, limit = 65536; size < limit; size <<= 1)
|
||||
{
|
||||
buff = new char[size];
|
||||
|
||||
if(GetDlgItemText(m_hWnd, id, buff, size))
|
||||
{
|
||||
s = buff;
|
||||
size = limit;
|
||||
}
|
||||
|
||||
delete [] buff;
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
int CDVDDialog::GetTextAsInt(UINT id)
|
||||
{
|
||||
return atoi(GetText(id).c_str());
|
||||
}
|
||||
|
||||
void CDVDDialog::SetText(UINT id, const char* str)
|
||||
{
|
||||
SetDlgItemText(m_hWnd, id, str);
|
||||
}
|
||||
|
||||
void CDVDDialog::SetTextAsInt(UINT id, int i)
|
||||
{
|
||||
char buff[32] = {0};
|
||||
itoa(i, buff, 10);
|
||||
SetText(id, buff);
|
||||
}
|
||||
|
||||
void CDVDDialog::ComboBoxInit(UINT id, const CDVDSetting* settings, int count, uint32 selid, uint32 maxid)
|
||||
{
|
||||
HWND hWnd = GetDlgItem(m_hWnd, id);
|
||||
|
||||
SendMessage(hWnd, CB_RESETCONTENT, 0, 0);
|
||||
|
||||
for(int i = 0; i < count; i++)
|
||||
{
|
||||
if(settings[i].id <= maxid)
|
||||
{
|
||||
string str = settings[i].name;
|
||||
|
||||
if(!settings[i].note.empty())
|
||||
{
|
||||
str = str + " (" + settings[i].note + ")";
|
||||
}
|
||||
|
||||
ComboBoxAppend(id, str.c_str(), (LPARAM)settings[i].id, settings[i].id == selid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int CDVDDialog::ComboBoxAppend(UINT id, const char* str, LPARAM data, bool select)
|
||||
{
|
||||
HWND hWnd = GetDlgItem(m_hWnd, id);
|
||||
|
||||
int item = (int)SendMessage(hWnd, CB_ADDSTRING, 0, (LPARAM)str);
|
||||
|
||||
SendMessage(hWnd, CB_SETITEMDATA, item, (LPARAM)data);
|
||||
|
||||
if(select)
|
||||
{
|
||||
SendMessage(hWnd, CB_SETCURSEL, item, 0);
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
bool CDVDDialog::ComboBoxGetSelData(UINT id, INT_PTR& data)
|
||||
{
|
||||
HWND hWnd = GetDlgItem(m_hWnd, id);
|
||||
|
||||
int item = SendMessage(hWnd, CB_GETCURSEL, 0, 0);
|
||||
|
||||
if(item >= 0)
|
||||
{
|
||||
data = SendMessage(hWnd, CB_GETITEMDATA, item, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2009 Gabest
|
||||
* http://www.gabest.org
|
||||
*
|
||||
* This Program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This Program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Make; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA USA.
|
||||
* http://www.gnu.org/copyleft/gpl.html
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
struct CDVDSetting
|
||||
{
|
||||
uint32 id;
|
||||
string name;
|
||||
string note;
|
||||
};
|
||||
|
||||
class CDVDDialog
|
||||
{
|
||||
int m_id;
|
||||
|
||||
static INT_PTR CALLBACK DialogProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
protected:
|
||||
HWND m_hWnd;
|
||||
|
||||
virtual void OnInit() {}
|
||||
virtual bool OnMessage(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
virtual bool OnCommand(HWND hWnd, UINT id, UINT code);
|
||||
|
||||
public:
|
||||
CDVDDialog (UINT id);
|
||||
virtual ~CDVDDialog () {}
|
||||
|
||||
INT_PTR DoModal();
|
||||
|
||||
string GetText(UINT id);
|
||||
int GetTextAsInt(UINT id);
|
||||
|
||||
void SetText(UINT id, const char* str);
|
||||
void SetTextAsInt(UINT id, int i);
|
||||
|
||||
void ComboBoxInit(UINT id, const CDVDSetting* settings, int count, uint32 selid, uint32 maxid = ~0);
|
||||
int ComboBoxAppend(UINT id, const char* str, LPARAM data = 0, bool select = false);
|
||||
bool ComboBoxGetSelData(UINT id, INT_PTR& data);
|
||||
};
|
|
@ -1,179 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>CDVDolio</ProjectName>
|
||||
<ProjectGuid>{FCDF5AE2-EA47-4CC6-9F20-23A0517FEBCB}</ProjectGuid>
|
||||
<RootNamespace>cdvd</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>Static</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>Static</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="vsprops\common.props" />
|
||||
<Import Project="vsprops\ProjectRootDir.props" />
|
||||
<Import Project="..\..\common\vsprops\BaseProperties.props" />
|
||||
<Import Project="vsprops\release.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="vsprops\common.props" />
|
||||
<Import Project="vsprops\ProjectRootDir.props" />
|
||||
<Import Project="..\..\common\vsprops\BaseProperties.props" />
|
||||
<Import Project="vsprops\debug.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="vsprops\common.props" />
|
||||
<Import Project="vsprops\ProjectRootDir.props" />
|
||||
<Import Project="..\..\common\vsprops\BaseProperties.props" />
|
||||
<Import Project="vsprops\release.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="vsprops\common.props" />
|
||||
<Import Project="vsprops\ProjectRootDir.props" />
|
||||
<Import Project="..\..\common\vsprops\BaseProperties.props" />
|
||||
<Import Project="vsprops\debug.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)-dbg</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<ModuleDefinitionFile>.\cdvd.def</ModuleDefinitionFile>
|
||||
<DelayLoadDLLs>
|
||||
</DelayLoadDLLs>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<ModuleDefinitionFile>
|
||||
</ModuleDefinitionFile>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<ModuleDefinitionFile>.\cdvd.def</ModuleDefinitionFile>
|
||||
<DelayLoadDLLs>
|
||||
</DelayLoadDLLs>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<ModuleDefinitionFile>
|
||||
</ModuleDefinitionFile>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="cdvd.cpp" />
|
||||
<ClCompile Include="CDVDDialog.cpp" />
|
||||
<ClCompile Include="SettingsDlg.cpp" />
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="cdvd.def" />
|
||||
<None Include="res\cdvd.rc2" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="cdvd.h" />
|
||||
<ClInclude Include="CDVDDialog.h" />
|
||||
<ClInclude Include="SettingsDlg.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="svnrev.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="cdvd.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<UserProperties RESOURCE_FILE="cdvd.rc" />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
|
@ -1,64 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="cdvd.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CDVDDialog.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SettingsDlg.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="cdvd.def">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="res\cdvd.rc2">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="cdvd.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="CDVDDialog.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SettingsDlg.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="svnrev.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="cdvd.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,157 +0,0 @@
|
|||
// SettingsDlg.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "CDVD.h"
|
||||
#include "SettingsDlg.h"
|
||||
#include <dbt.h>
|
||||
|
||||
CDVDSettingsDlg::CDVDSettingsDlg()
|
||||
: CDVDDialog(IDD_CONFIG)
|
||||
{
|
||||
}
|
||||
|
||||
void CDVDSettingsDlg::OnInit()
|
||||
{
|
||||
__super::OnInit();
|
||||
|
||||
UpdateDrives();
|
||||
|
||||
SetText(IDC_EDIT1, theApp.GetConfig("iso", "").c_str());
|
||||
}
|
||||
|
||||
bool CDVDSettingsDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
if(message == WM_DEVICECHANGE && (wParam == DBT_DEVICEARRIVAL || wParam == DBT_DEVICEREMOVECOMPLETE))
|
||||
{
|
||||
UpdateDrives();
|
||||
|
||||
DEV_BROADCAST_HDR* p = (DEV_BROADCAST_HDR*)lParam;
|
||||
|
||||
if(p->dbch_devicetype == DBT_DEVTYP_VOLUME)
|
||||
{
|
||||
DEV_BROADCAST_VOLUME* v = (DEV_BROADCAST_VOLUME*)p;
|
||||
|
||||
for(int i = 0; i < 32; i++)
|
||||
{
|
||||
if(v->dbcv_unitmask & (1 << i))
|
||||
{
|
||||
// printf("%c:\n", 'A' + i);
|
||||
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return __super::OnMessage(message, wParam, lParam);
|
||||
}
|
||||
|
||||
bool CDVDSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
|
||||
{
|
||||
if(id == IDOK)
|
||||
{
|
||||
INT_PTR data = 0;
|
||||
|
||||
if(!ComboBoxGetSelData(IDC_COMBO1, data))
|
||||
{
|
||||
data = -1;
|
||||
}
|
||||
|
||||
theApp.SetConfig("drive", (int)data);
|
||||
|
||||
theApp.SetConfig("iso", GetText(IDC_EDIT1).c_str());
|
||||
}
|
||||
else if(id == IDC_BUTTON1 && code == BN_CLICKED)
|
||||
{
|
||||
char buff[MAX_PATH] = {0};
|
||||
|
||||
OPENFILENAME ofn;
|
||||
|
||||
memset(&ofn, 0, sizeof(ofn));
|
||||
|
||||
ofn.lStructSize = sizeof(ofn);
|
||||
ofn.hwndOwner = m_hWnd;
|
||||
ofn.lpstrFile = buff;
|
||||
ofn.nMaxFile = countof(buff);
|
||||
ofn.lpstrFilter = "ISO file\0*.iso\0All files\0*.*\0";
|
||||
ofn.Flags = OFN_EXPLORER | OFN_ENABLESIZING | OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_NOCHANGEDIR;
|
||||
|
||||
strcpy(ofn.lpstrFile, GetText(IDC_EDIT1).c_str());
|
||||
|
||||
if(GetOpenFileName(&ofn))
|
||||
{
|
||||
SetText(IDC_EDIT1, ofn.lpstrFile);
|
||||
|
||||
HWND hWnd = GetDlgItem(m_hWnd, IDC_COMBO1);
|
||||
|
||||
SendMessage(hWnd, CB_SETCURSEL, SendMessage(hWnd, CB_GETCOUNT, 0, 0) - 1, 0);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return __super::OnCommand(hWnd, id, code);
|
||||
}
|
||||
|
||||
void CDVDSettingsDlg::UpdateDrives()
|
||||
{
|
||||
int drive = theApp.GetConfig("drive", -1);
|
||||
|
||||
INT_PTR data = 0;
|
||||
|
||||
if(ComboBoxGetSelData(IDC_COMBO1, data))
|
||||
{
|
||||
drive = (int)data;
|
||||
}
|
||||
|
||||
vector<CDVDSetting> drives;
|
||||
|
||||
for(int i = 'A'; i <= 'Z'; i++)
|
||||
{
|
||||
string path = format("%c:", i);
|
||||
|
||||
if(GetDriveType(path.c_str()) == DRIVE_CDROM)
|
||||
{
|
||||
string label = path;
|
||||
|
||||
path = format("\\\\.\\%c:", i);
|
||||
|
||||
CDVD cdvd;
|
||||
|
||||
if(cdvd.Open(path.c_str()))
|
||||
{
|
||||
string str = cdvd.GetLabel();
|
||||
|
||||
if(str.empty())
|
||||
{
|
||||
str = "(no label)";
|
||||
}
|
||||
|
||||
label = "[" + label + "] " + str;
|
||||
}
|
||||
else
|
||||
{
|
||||
label = "[" + label + "] (not detected)";
|
||||
}
|
||||
|
||||
CDVDSetting s;
|
||||
|
||||
s.id = i;
|
||||
s.name = label;
|
||||
|
||||
drives.push_back(s);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
CDVDSetting s;
|
||||
|
||||
s.id = -1;
|
||||
s.name = "Other...";
|
||||
|
||||
drives.push_back(s);
|
||||
}
|
||||
|
||||
ComboBoxInit(IDC_COMBO1, &drives[0], drives.size(), drive);
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
#pragma once
|
||||
#include "CDVDDialog.h"
|
||||
#include "resource.h"
|
||||
|
||||
class CDVDSettingsDlg : public CDVDDialog
|
||||
{
|
||||
void UpdateDrives();
|
||||
|
||||
protected:
|
||||
void OnInit();
|
||||
bool OnMessage(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
bool OnCommand(HWND hWnd, UINT id, UINT code);
|
||||
|
||||
public:
|
||||
CDVDSettingsDlg();
|
||||
};
|
|
@ -1,409 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007 Gabest
|
||||
* http://www.gabest.org
|
||||
*
|
||||
* This Program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This Program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Make; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA USA.
|
||||
* http://www.gnu.org/copyleft/gpl.html
|
||||
*
|
||||
*/
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "cdvd.h"
|
||||
#include "SettingsDlg.h"
|
||||
|
||||
static HMODULE s_hModule;
|
||||
|
||||
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
|
||||
{
|
||||
switch(ul_reason_for_call)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
s_hModule = hModule;
|
||||
case DLL_THREAD_ATTACH:
|
||||
case DLL_THREAD_DETACH:
|
||||
case DLL_PROCESS_DETACH:
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
CDVDolioApp theApp;
|
||||
|
||||
const char* CDVDolioApp::m_ini = "inis/CDVDolio.ini";
|
||||
const char* CDVDolioApp::m_section = "Settings";
|
||||
|
||||
CDVDolioApp::CDVDolioApp()
|
||||
{
|
||||
}
|
||||
|
||||
HMODULE CDVDolioApp::GetModuleHandle()
|
||||
{
|
||||
return s_hModule;
|
||||
}
|
||||
|
||||
string CDVDolioApp::GetConfig(const char* entry, const char* value)
|
||||
{
|
||||
char buff[4096] = {0};
|
||||
GetPrivateProfileString(m_section, entry, value, buff, countof(buff), m_ini);
|
||||
return string(buff);
|
||||
}
|
||||
|
||||
void CDVDolioApp::SetConfig(const char* entry, const char* value)
|
||||
{
|
||||
WritePrivateProfileString(m_section, entry, value, m_ini);
|
||||
}
|
||||
|
||||
int CDVDolioApp::GetConfig(const char* entry, int value)
|
||||
{
|
||||
return GetPrivateProfileInt(m_section, entry, value, m_ini);
|
||||
}
|
||||
|
||||
void CDVDolioApp::SetConfig(const char* entry, int value)
|
||||
{
|
||||
char buff[32] = {0};
|
||||
itoa(value, buff, 10);
|
||||
SetConfig(entry, buff);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
#define PS2E_LT_CDVD 0x08
|
||||
#define PS2E_CDVD_VERSION 0x0005
|
||||
|
||||
EXPORT_C_(uint32) PS2EgetLibType()
|
||||
{
|
||||
return PS2E_LT_CDVD;
|
||||
}
|
||||
|
||||
EXPORT_C_(char*) PS2EgetLibName()
|
||||
{
|
||||
return "CDVDolio"; // olio = OverLapped I/O (duh)
|
||||
}
|
||||
|
||||
EXPORT_C_(uint32) PS2EgetLibVersion2(UINT32 type)
|
||||
{
|
||||
const uint32 revision = 0;
|
||||
const uint32 build = 1;
|
||||
const uint32 minor = 0;
|
||||
|
||||
return (build << 0) | (revision << 8) | (PS2E_CDVD_VERSION << 16) | (minor << 24);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
CDVD::CDVD()
|
||||
: m_hFile(INVALID_HANDLE_VALUE)
|
||||
{
|
||||
memset(&m_overlapped, 0, sizeof(m_overlapped));
|
||||
m_overlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||
m_cache.pending = false;
|
||||
m_cache.count = 0;
|
||||
}
|
||||
|
||||
CDVD::~CDVD()
|
||||
{
|
||||
CloseHandle(m_overlapped.hEvent);
|
||||
}
|
||||
|
||||
LARGE_INTEGER CDVD::MakeOffset(int lsn)
|
||||
{
|
||||
LARGE_INTEGER offset;
|
||||
offset.QuadPart = (LONGLONG)lsn * m_block.size + m_block.offset;
|
||||
return offset;
|
||||
}
|
||||
|
||||
bool CDVD::SyncRead(int lsn)
|
||||
{
|
||||
return Read(lsn) && GetBuffer();
|
||||
}
|
||||
|
||||
bool CDVD::Open(const char* path)
|
||||
{
|
||||
m_label.clear();
|
||||
|
||||
uint32 share = FILE_SHARE_READ;
|
||||
uint32 flags = FILE_ATTRIBUTE_READONLY | FILE_FLAG_SEQUENTIAL_SCAN | FILE_FLAG_OVERLAPPED;
|
||||
|
||||
m_hFile = CreateFile(path, GENERIC_READ, share, NULL, OPEN_EXISTING, flags, (HANDLE)NULL);
|
||||
|
||||
if(m_hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
m_block.count = 0;
|
||||
m_block.size = 2048;
|
||||
m_block.offset = 0;
|
||||
|
||||
GET_LENGTH_INFORMATION info;
|
||||
DWORD ret = 0;
|
||||
|
||||
if(GetFileSizeEx(m_hFile, &info.Length) || DeviceIoControl(m_hFile, IOCTL_DISK_GET_LENGTH_INFO, NULL, 0, &info, sizeof(info), &ret, NULL))
|
||||
{
|
||||
m_block.count = (int)(info.Length.QuadPart / m_block.size);
|
||||
}
|
||||
else
|
||||
{
|
||||
Close();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!SyncRead(16) || memcmp(&m_buff[24 + 1], "CD001", 5) != 0)
|
||||
{
|
||||
Close();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
m_label = string((const char*)&m_buff[24 + 40], 32);
|
||||
|
||||
// trim
|
||||
|
||||
{
|
||||
string::size_type i = m_label.find_first_not_of(' ');
|
||||
string::size_type j = m_label.find_last_not_of(' ');
|
||||
|
||||
if(i == string::npos)
|
||||
{
|
||||
m_label.clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_label = m_label.substr(i, (j != string::npos ? j + 1 : string::npos) - i);
|
||||
}
|
||||
}
|
||||
|
||||
// m_block.count = *(DWORD*)&m_buff[24 + 80];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void CDVD::Close()
|
||||
{
|
||||
if(m_hFile != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
CancelIo(m_hFile);
|
||||
CloseHandle(m_hFile);
|
||||
m_hFile = INVALID_HANDLE_VALUE;
|
||||
}
|
||||
|
||||
m_cache.pending = false;
|
||||
m_cache.count = 0;
|
||||
|
||||
m_label.clear();
|
||||
}
|
||||
|
||||
const char* CDVD::GetLabel()
|
||||
{
|
||||
return m_label.c_str();
|
||||
}
|
||||
|
||||
bool CDVD::Read(int lsn, int mode)
|
||||
{
|
||||
if(mode != CDVD_MODE_2048) return false;
|
||||
|
||||
if(lsn < 0) lsn += m_block.count;
|
||||
|
||||
if(lsn < 0 || lsn >= m_block.count) return false;
|
||||
|
||||
if(m_cache.pending)
|
||||
{
|
||||
CancelIo(m_hFile);
|
||||
ResetEvent(m_overlapped.hEvent);
|
||||
m_cache.pending = false;
|
||||
}
|
||||
|
||||
if(lsn >= m_cache.start && lsn < m_cache.start + m_cache.count)
|
||||
{
|
||||
memcpy(&m_buff[24], &m_cache.buff[(lsn - m_cache.start) * 2048], 2048);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
m_cache.pending = true;
|
||||
m_cache.start = lsn;
|
||||
m_cache.count = min(CACHE_BLOCK_COUNT, m_block.count - m_cache.start);
|
||||
|
||||
LARGE_INTEGER offset = MakeOffset(lsn);
|
||||
|
||||
m_overlapped.Offset = offset.LowPart;
|
||||
m_overlapped.OffsetHigh = offset.HighPart;
|
||||
|
||||
if(!ReadFile(m_hFile, m_cache.buff, m_cache.count * 2048, NULL, &m_overlapped))
|
||||
{
|
||||
switch(GetLastError())
|
||||
{
|
||||
case ERROR_IO_PENDING:
|
||||
break;
|
||||
case ERROR_HANDLE_EOF:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
uint8* CDVD::GetBuffer()
|
||||
{
|
||||
DWORD size = 0;
|
||||
|
||||
if(m_cache.pending)
|
||||
{
|
||||
if(GetOverlappedResult(m_hFile, &m_overlapped, &size, TRUE))
|
||||
{
|
||||
memcpy(&m_buff[24], m_cache.buff, 2048);
|
||||
|
||||
m_cache.pending = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return &m_buff[24];
|
||||
}
|
||||
|
||||
uint32 CDVD::GetTN(cdvdTN* buff)
|
||||
{
|
||||
buff->strack = 1;
|
||||
buff->etrack = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32 CDVD::GetTD(BYTE track, cdvdTD* buff)
|
||||
{
|
||||
if(track == 0)
|
||||
{
|
||||
buff->lsn = m_block.count;
|
||||
}
|
||||
else
|
||||
{
|
||||
buff->type = CDVD_MODE1_TRACK;
|
||||
buff->lsn = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static CDVD s_cdvd;
|
||||
|
||||
//
|
||||
|
||||
EXPORT_C_(uint32) CDVDinit()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_C CDVDshutdown()
|
||||
{
|
||||
}
|
||||
|
||||
EXPORT_C_(uint32) CDVDopen(const char* title)
|
||||
{
|
||||
string path;
|
||||
|
||||
int i = theApp.GetConfig("drive", -1);
|
||||
|
||||
if(i >= 'A' && i <= 'Z')
|
||||
{
|
||||
path = format("\\\\.\\%c:", i);
|
||||
}
|
||||
else
|
||||
{
|
||||
path = theApp.GetConfig("iso", "");
|
||||
}
|
||||
|
||||
return s_cdvd.Open(path.c_str()) ? 0 : -1;
|
||||
}
|
||||
|
||||
EXPORT_C CDVDclose()
|
||||
{
|
||||
s_cdvd.Close();
|
||||
}
|
||||
|
||||
EXPORT_C_(uint32) CDVDreadTrack(int lsn, int mode)
|
||||
{
|
||||
return s_cdvd.Read(lsn, mode) ? 0 : -1;
|
||||
}
|
||||
|
||||
EXPORT_C_(uint8*) CDVDgetBuffer()
|
||||
{
|
||||
return s_cdvd.GetBuffer();
|
||||
}
|
||||
|
||||
EXPORT_C_(uint32) CDVDreadSubQ(uint32 lsn, cdvdSubQ* subq)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
EXPORT_C_(uint32) CDVDgetTN(cdvdTN* buff)
|
||||
{
|
||||
return s_cdvd.GetTN(buff);
|
||||
}
|
||||
|
||||
EXPORT_C_(uint32) CDVDgetTD(uint8 track, cdvdTD* buff)
|
||||
{
|
||||
return s_cdvd.GetTD(track, buff);
|
||||
}
|
||||
|
||||
EXPORT_C_(uint32) CDVDgetTOC(void* toc)
|
||||
{
|
||||
return -1; // TODO
|
||||
}
|
||||
|
||||
EXPORT_C_(uint32) CDVDgetDiskType()
|
||||
{
|
||||
return CDVD_TYPE_PS2DVD; // TODO
|
||||
}
|
||||
|
||||
EXPORT_C_(uint32) CDVDgetTrayStatus()
|
||||
{
|
||||
return CDVD_TRAY_CLOSE;
|
||||
}
|
||||
|
||||
EXPORT_C_(uint32) CDVDctrlTrayOpen()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_C_(uint32) CDVDctrlTrayClose()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_C CDVDconfigure()
|
||||
{
|
||||
CDVDSettingsDlg dlg;
|
||||
|
||||
if(IDOK == dlg.DoModal())
|
||||
{
|
||||
CDVDshutdown();
|
||||
CDVDinit();
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT_C CDVDabout()
|
||||
{
|
||||
}
|
||||
|
||||
EXPORT_C_(uint32) CDVDtest()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
; cdvd.def : Declares the module parameters for the DLL.
|
||||
|
||||
LIBRARY "CDVDolio"
|
||||
|
||||
EXPORTS
|
||||
; Explicit exports can go here
|
||||
PS2EgetLibType
|
||||
PS2EgetLibName
|
||||
PS2EgetLibVersion2
|
||||
CDVDinit
|
||||
CDVDshutdown
|
||||
CDVDopen
|
||||
CDVDclose
|
||||
CDVDreadTrack
|
||||
CDVDgetBuffer
|
||||
CDVDreadSubQ
|
||||
CDVDgetTN
|
||||
CDVDgetTD
|
||||
CDVDgetTOC
|
||||
CDVDgetDiskType
|
||||
CDVDgetTrayStatus
|
||||
CDVDctrlTrayOpen
|
||||
CDVDctrlTrayClose
|
||||
CDVDconfigure
|
||||
CDVDtest
|
||||
CDVDabout
|
|
@ -1,139 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007 Gabest
|
||||
* http://www.gabest.org
|
||||
*
|
||||
* This Program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This Program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Make; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA USA.
|
||||
* http://www.gnu.org/copyleft/gpl.html
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
struct cdvdSubQ
|
||||
{
|
||||
uint8 ctrl:4; // control and mode bits
|
||||
uint8 mode:4; // control and mode bits
|
||||
uint8 trackNum; // current track number (1 to 99)
|
||||
uint8 trackIndex; // current index within track (0 to 99)
|
||||
uint8 trackM; // current minute location on the disc (BCD encoded)
|
||||
uint8 trackS; // current sector location on the disc (BCD encoded)
|
||||
uint8 trackF; // current frame location on the disc (BCD encoded)
|
||||
uint8 pad; // unused
|
||||
uint8 discM; // current minute offset from first track (BCD encoded)
|
||||
uint8 discS; // current sector offset from first track (BCD encoded)
|
||||
uint8 discF; // current frame offset from first track (BCD encoded)
|
||||
};
|
||||
|
||||
struct cdvdTD // NOT bcd coded
|
||||
{
|
||||
uint32 lsn;
|
||||
uint8 type;
|
||||
};
|
||||
|
||||
struct cdvdTN
|
||||
{
|
||||
uint8 strack; // number of the first track (usually 1)
|
||||
uint8 etrack; // number of the last track
|
||||
};
|
||||
|
||||
// CDVDreadTrack mode values:
|
||||
|
||||
#define CDVD_MODE_2352 0 // full 2352 bytes
|
||||
#define CDVD_MODE_2340 1 // skip sync (12) bytes
|
||||
#define CDVD_MODE_2328 2 // skip sync+head+sub (24) bytes
|
||||
#define CDVD_MODE_2048 3 // skip sync+head+sub (24) bytes
|
||||
#define CDVD_MODE_2368 4 // full 2352 bytes + 16 subq
|
||||
|
||||
// CDVDgetDiskType returns:
|
||||
|
||||
#define CDVD_TYPE_ILLEGAL 0xff // Illegal Disc
|
||||
#define CDVD_TYPE_DVDV 0xfe // DVD Video
|
||||
#define CDVD_TYPE_CDDA 0xfd // Audio CD
|
||||
#define CDVD_TYPE_PS2DVD 0x14 // PS2 DVD
|
||||
#define CDVD_TYPE_PS2CDDA 0x13 // PS2 CD (with audio)
|
||||
#define CDVD_TYPE_PS2CD 0x12 // PS2 CD
|
||||
#define CDVD_TYPE_PSCDDA 0x11 // PS CD (with audio)
|
||||
#define CDVD_TYPE_PSCD 0x10 // PS CD
|
||||
#define CDVD_TYPE_UNKNOWN 0x05 // Unknown
|
||||
#define CDVD_TYPE_DETCTDVDD 0x04 // Detecting Dvd Dual Sided
|
||||
#define CDVD_TYPE_DETCTDVDS 0x03 // Detecting Dvd Single Sided
|
||||
#define CDVD_TYPE_DETCTCD 0x02 // Detecting Cd
|
||||
#define CDVD_TYPE_DETCT 0x01 // Detecting
|
||||
#define CDVD_TYPE_NODISC 0x00 // No Disc
|
||||
|
||||
// CDVDgetTrayStatus returns:
|
||||
|
||||
#define CDVD_TRAY_CLOSE 0x00
|
||||
#define CDVD_TRAY_OPEN 0x01
|
||||
|
||||
// cdvdTD.type (track types for cds)
|
||||
|
||||
#define CDVD_AUDIO_TRACK 0x01
|
||||
#define CDVD_MODE1_TRACK 0x41
|
||||
#define CDVD_MODE2_TRACK 0x61
|
||||
|
||||
#define CDVD_AUDIO_MASK 0x00
|
||||
#define CDVD_DATA_MASK 0x40
|
||||
// CDROM_DATA_TRACK 0x04 // do not enable this! (from linux kernel)
|
||||
|
||||
//
|
||||
|
||||
#define CACHE_BLOCK_COUNT 16
|
||||
|
||||
class CDVDolioApp
|
||||
{
|
||||
static const char* m_ini;
|
||||
static const char* m_section;
|
||||
|
||||
public:
|
||||
CDVDolioApp();
|
||||
|
||||
HMODULE GetModuleHandle();
|
||||
|
||||
string GetConfig(const char* entry, const char* value);
|
||||
void SetConfig(const char* entry, const char* value);
|
||||
int GetConfig(const char* entry, int value);
|
||||
void SetConfig(const char* entry, int value);
|
||||
};
|
||||
|
||||
extern CDVDolioApp theApp;
|
||||
|
||||
//
|
||||
|
||||
class CDVD
|
||||
{
|
||||
HANDLE m_hFile;
|
||||
string m_label;
|
||||
OVERLAPPED m_overlapped;
|
||||
struct {int count, size, offset;} m_block;
|
||||
struct {uint8 buff[2048 * CACHE_BLOCK_COUNT]; bool pending; int start, count;} m_cache;
|
||||
uint8 m_buff[2352];
|
||||
|
||||
LARGE_INTEGER MakeOffset(int lsn);
|
||||
bool SyncRead(int lsn);
|
||||
|
||||
public:
|
||||
CDVD();
|
||||
virtual ~CDVD();
|
||||
|
||||
bool Open(const char* path);
|
||||
void Close();
|
||||
const char* GetLabel();
|
||||
bool Read(int lsn, int mode = CDVD_MODE_2048);
|
||||
uint8* GetBuffer();
|
||||
uint32 GetTN(cdvdTN* buff);
|
||||
uint32 GetTD(uint8 track, cdvdTD* buff);
|
||||
};
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets" />
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_PropertySheetDisplayName>cdvd</_PropertySheetDisplayName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)common\vsprops\preBuild.cmd" "$(ProjectDir)."</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup />
|
||||
</Project>
|
|
@ -1,175 +0,0 @@
|
|||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#define APSTUDIO_HIDDEN_SYMBOLS
|
||||
#include "windows.h"
|
||||
#undef APSTUDIO_HIDDEN_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Hungarian resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_HUN)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT
|
||||
#pragma code_page(1250)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
|
||||
"#include ""windows.h""\r\n"
|
||||
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_OLE_RESOURCES\r\n"
|
||||
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
|
||||
"\r\n"
|
||||
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
|
||||
"LANGUAGE 9, 1\r\n"
|
||||
"#pragma code_page(1252)\r\n"
|
||||
"#include ""res\\cdvd.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
|
||||
"#endif\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // Hungarian resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,0
|
||||
PRODUCTVERSION 1,0,0,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904e4"
|
||||
BEGIN
|
||||
VALUE "Comments", "http://guliverkli.sf.net/"
|
||||
VALUE "CompanyName", "Gabest"
|
||||
VALUE "FileDescription", "CDVD plugin for ps2 emulators"
|
||||
VALUE "FileVersion", "1, 0, 0, 0"
|
||||
VALUE "InternalName", "xpad.dll"
|
||||
VALUE "LegalCopyright", "Copyright (c) 2007-2008 Gabest. All rights reserved."
|
||||
VALUE "OriginalFilename", "cdvd.dll"
|
||||
VALUE "ProductName", "cdvd"
|
||||
VALUE "ProductVersion", "1, 0, 0, 0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1252
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_CONFIG DIALOGEX 0, 0, 211, 71
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Settings..."
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
COMBOBOX IDC_COMBO1,7,7,197,85,CBS_DROPDOWNLIST | WS_VSCROLL | WS_GROUP | WS_TABSTOP
|
||||
EDITTEXT IDC_EDIT1,7,24,143,14,ES_AUTOHSCROLL | ES_READONLY
|
||||
PUSHBUTTON "Browse...",IDC_BUTTON1,154,24,50,14
|
||||
DEFPUSHBUTTON "OK",IDOK,53,50,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,107,50,50,14
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_CONFIG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 204
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 64
|
||||
HORZGUIDE, 13
|
||||
HORZGUIDE, 31
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#define _AFX_NO_SPLITTER_RESOURCES
|
||||
#define _AFX_NO_OLE_RESOURCES
|
||||
#define _AFX_NO_TRACKER_RESOURCES
|
||||
#define _AFX_NO_PROPERTY_RESOURCES
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
LANGUAGE 9, 1
|
||||
#pragma code_page(1252)
|
||||
#include "res\cdvd.rc2" // non-Microsoft Visual C++ edited resources
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
//
|
||||
// cdvd.RC2 - resources Microsoft Visual C++ does not edit directly
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#error this file is not editable by Microsoft Visual C++
|
||||
#endif //APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Add manually edited resources here...
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
|
@ -1,25 +0,0 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by cdvd.rc
|
||||
//
|
||||
|
||||
#ifndef IDC_STATIC
|
||||
#define IDC_STATIC -1
|
||||
#endif
|
||||
|
||||
#define IDC_COMBO1 2000
|
||||
#define IDC_RADIO1 2001
|
||||
#define IDC_EDIT1 2003
|
||||
#define IDC_BUTTON1 2004
|
||||
#define IDD_CONFIG 10000
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 10001
|
||||
#define _APS_NEXT_COMMAND_VALUE 32768
|
||||
#define _APS_NEXT_CONTROL_VALUE 2005
|
||||
#define _APS_NEXT_SYMED_VALUE 5000
|
||||
#endif
|
||||
#endif
|
|
@ -1,39 +0,0 @@
|
|||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// xpad.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: reference any additional headers you need in STDAFX.H
|
||||
// and not in this file
|
||||
|
||||
string format(const char* fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
|
||||
int result = -1, length = 256;
|
||||
|
||||
char* buffer = NULL;
|
||||
|
||||
while(result == -1)
|
||||
{
|
||||
if(buffer) delete [] buffer;
|
||||
|
||||
buffer = new char[length + 1];
|
||||
|
||||
memset(buffer, 0, length + 1);
|
||||
|
||||
result = _vsnprintf(buffer, length, fmt, args);
|
||||
|
||||
length *= 2;
|
||||
}
|
||||
|
||||
va_end(args);
|
||||
|
||||
string s(buffer);
|
||||
|
||||
delete [] buffer;
|
||||
|
||||
return s;
|
||||
}
|
|
@ -1,94 +0,0 @@
|
|||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma warning(disable: 4996 4995 4324 4100 4101 4201)
|
||||
|
||||
#ifdef _WINDOWS
|
||||
|
||||
// The following macros define the minimum required platform. The minimum required platform
|
||||
// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run
|
||||
// your application. The macros work by enabling all features available on platform versions up to and
|
||||
// including the version specified.
|
||||
|
||||
// Modify the following defines if you have to target a platform prior to the ones specified below.
|
||||
// Refer to MSDN for the latest info on corresponding values for different platforms.
|
||||
|
||||
#ifndef WINVER // Specifies that the minimum required platform is Windows Vista.
|
||||
#define WINVER 0x0600 // Change this to the appropriate value to target other versions of Windows.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista.
|
||||
#define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98.
|
||||
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0.
|
||||
#define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE.
|
||||
#endif
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
|
||||
#include <windows.h>
|
||||
#include <commctrl.h>
|
||||
#include <commdlg.h>
|
||||
#include <shellapi.h>
|
||||
#include <winioctl.h>
|
||||
|
||||
#endif
|
||||
|
||||
// stdc
|
||||
|
||||
#include <math.h>
|
||||
#include <time.h>
|
||||
#include <intrin.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <map>
|
||||
|
||||
using namespace std;
|
||||
|
||||
extern string format(const char* fmt, ...);
|
||||
|
||||
// syntactic sugar
|
||||
|
||||
// put these into vc9/common7/ide/usertype.dat to have them highlighted
|
||||
|
||||
typedef unsigned char uint8;
|
||||
typedef signed char int8;
|
||||
typedef unsigned short uint16;
|
||||
typedef signed short int16;
|
||||
typedef unsigned int uint32;
|
||||
typedef signed int int32;
|
||||
typedef unsigned long long uint64;
|
||||
typedef signed long long int64;
|
||||
|
||||
#define countof(a) (sizeof(a) / sizeof(a[0]))
|
||||
|
||||
#define EXPORT_C extern "C" __declspec(dllexport) void __stdcall
|
||||
#define EXPORT_C_(type) extern "C" __declspec(dllexport) type __stdcall
|
||||
|
||||
#define ALIGN_STACK(n) __declspec(align(n)) int __dummy;
|
||||
|
||||
#ifndef RESTRICT
|
||||
#ifdef __INTEL_COMPILER
|
||||
#define RESTRICT restrict
|
||||
#elif _MSC_VER >= 1400 // TODO: gcc
|
||||
#define RESTRICT __restrict
|
||||
#else
|
||||
#define RESTRICT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_DEBUG) && defined(_MSC_VER)
|
||||
#define ASSERT assert
|
||||
#else
|
||||
#define ASSERT(exp) ((void)0)
|
||||
#endif
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<ProjectRootDir>$(ProjectDir).</ProjectRootDir>
|
||||
<SvnRootDir>$(ProjectRootDir)\..\..</SvnRootDir>
|
||||
<SvnCommonDir>$(SvnRootDir)\common</SvnCommonDir>
|
||||
<PcsxSubsection>plugins</PcsxSubsection>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<BuildMacro Include="ProjectRootDir">
|
||||
<Value>$(ProjectRootDir)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="SvnRootDir">
|
||||
<Value>$(SvnRootDir)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="SvnCommonDir">
|
||||
<Value>$(SvnCommonDir)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="PcsxSubsection">
|
||||
<Value>$(PcsxSubsection)</Value>
|
||||
</BuildMacro>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
|
||||
<OutDir>$(PlatformName)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformName)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;_WIN32_WINNT=0x500;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4995;4324;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>..\..\bin\plugins\$(ProjectName).dll</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>StackFrameRuntimeCheck</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PreprocessorDefinitions>NDEBUG;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
|
@ -26,10 +26,6 @@ if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/CDVDnull" AND CDVDnull)
|
|||
add_subdirectory(CDVDnull)
|
||||
endif()
|
||||
|
||||
# if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/CDVDolio" AND CDVDolio)
|
||||
# add_subdirectory(CDVDolio)
|
||||
# endif()
|
||||
|
||||
#if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/CDVDpeops" AND CDVDpeops)
|
||||
# add_subdirectory(CDVDpeops)
|
||||
#endif()
|
||||
|
|
Loading…
Reference in New Issue