mirror of https://github.com/PCSX2/pcsx2.git
Patch to GSdx capture that offers RGB mode. By patrickdinh.
Also added Valkyria Profile 2 Italy to the gamedb and GSdx crc list. By Leucos. Thanks guys :) git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4618 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
763f21cfbc
commit
6ee229b141
|
@ -39038,6 +39038,12 @@ Region = PAL-E
|
|||
Compat = 5
|
||||
VuAddSubHack = 1
|
||||
---------------------------------------------
|
||||
Serial = SLES-54647
|
||||
Name = Valkyrie Profile 2 - Silmeria
|
||||
Region = PAL-I
|
||||
Compat = 5
|
||||
VuAddSubHack = 1
|
||||
---------------------------------------------
|
||||
Serial = SLES-54666
|
||||
Name = Mr. Bean
|
||||
Region = PAL-E
|
||||
|
|
|
@ -64,7 +64,7 @@ GSSource : public CBaseFilter, private CCritSec, public IGSSource
|
|||
vector<CMediaType> m_mts;
|
||||
|
||||
public:
|
||||
GSSourceOutputPin(const GSVector2i& size, REFERENCE_TIME atpf, CBaseFilter* pFilter, CCritSec* pLock, HRESULT& hr)
|
||||
GSSourceOutputPin(const GSVector2i& size, REFERENCE_TIME atpf, CBaseFilter* pFilter, CCritSec* pLock, HRESULT& hr, int m_colorspace)
|
||||
: CBaseOutputPin("GSSourceOutputPin", pFilter, pLock, &hr, L"Output")
|
||||
, m_size(size)
|
||||
{
|
||||
|
@ -79,8 +79,24 @@ GSSource : public CBaseFilter, private CCritSec, public IGSSource
|
|||
vih.bmiHeader.biWidth = m_size.x;
|
||||
vih.bmiHeader.biHeight = m_size.y;
|
||||
|
||||
// YUY2
|
||||
// RGB32 (priority)
|
||||
if ( m_colorspace == 1 )
|
||||
{
|
||||
mt.subtype = MEDIASUBTYPE_RGB32;
|
||||
mt.lSampleSize = m_size.x * m_size.y * 4;
|
||||
|
||||
vih.bmiHeader.biCompression = BI_RGB;
|
||||
vih.bmiHeader.biPlanes = 1;
|
||||
vih.bmiHeader.biBitCount = 32;
|
||||
vih.bmiHeader.biSizeImage = m_size.x * m_size.y * 4;
|
||||
mt.SetFormat((uint8*)&vih, sizeof(vih));
|
||||
|
||||
m_mts.push_back(mt);
|
||||
}
|
||||
|
||||
// YUY2
|
||||
else
|
||||
{
|
||||
mt.subtype = MEDIASUBTYPE_YUY2;
|
||||
mt.lSampleSize = m_size.x * m_size.y * 2;
|
||||
|
||||
|
@ -91,6 +107,7 @@ GSSource : public CBaseFilter, private CCritSec, public IGSSource
|
|||
mt.SetFormat((uint8*)&vih, sizeof(vih));
|
||||
|
||||
m_mts.push_back(mt);
|
||||
}
|
||||
|
||||
// RGB32
|
||||
|
||||
|
@ -172,14 +189,14 @@ GSSource : public CBaseFilter, private CCritSec, public IGSSource
|
|||
|
||||
public:
|
||||
|
||||
GSSource(int w, int h, int fps, IUnknown* pUnk, HRESULT& hr)
|
||||
GSSource(int w, int h, int fps, IUnknown* pUnk, HRESULT& hr, int m_colorspace)
|
||||
: CBaseFilter(NAME("GSSource"), pUnk, this, __uuidof(this), &hr)
|
||||
, m_output(NULL)
|
||||
, m_size(w, h)
|
||||
, m_atpf(10000000i64 / fps)
|
||||
, m_now(0)
|
||||
{
|
||||
m_output = new GSSourceOutputPin(m_size, m_atpf, this, this, hr);
|
||||
m_output = new GSSourceOutputPin(m_size, m_atpf, this, this, hr, m_colorspace);
|
||||
|
||||
// FIXME
|
||||
if(fps == 60) m_atpf = 166834; // = 10000000i64 / 59.94
|
||||
|
@ -403,6 +420,8 @@ bool GSCapture::BeginCapture(int fps)
|
|||
m_size.x = (dlg.m_width + 7) & ~7;
|
||||
m_size.y = (dlg.m_height + 7) & ~7;
|
||||
|
||||
m_colorspace = dlg.m_colorspace;
|
||||
|
||||
wstring fn(dlg.m_filename.begin(), dlg.m_filename.end());
|
||||
|
||||
//
|
||||
|
@ -420,7 +439,7 @@ bool GSCapture::BeginCapture(int fps)
|
|||
return false;
|
||||
}
|
||||
|
||||
m_src = new GSSource(m_size.x, m_size.y, fps, NULL, hr);
|
||||
m_src = new GSSource(m_size.x, m_size.y, fps, NULL, hr, m_colorspace);
|
||||
|
||||
if (dlg.m_enc==0)
|
||||
{
|
||||
|
|
|
@ -33,6 +33,8 @@ class GSCapture : protected GSCritSec
|
|||
bool m_capturing;
|
||||
GSVector2i m_size;
|
||||
|
||||
int m_colorspace;
|
||||
|
||||
#ifdef _WINDOWS
|
||||
|
||||
CComPtr<IGraphBuilder> m_graph;
|
||||
|
|
|
@ -68,6 +68,9 @@ void GSCaptureDlg::OnInit()
|
|||
|
||||
ComboBoxAppend(IDC_CODECS, "Uncompressed", 0, true);
|
||||
|
||||
ComboBoxAppend(IDC_COLORSPACE, "YUY2", 0, true);
|
||||
ComboBoxAppend(IDC_COLORSPACE, "RGB32", 1, false);
|
||||
|
||||
CoInitialize(0); // this is obviously wrong here, each thread should call this on start, and where is CoUninitalize?
|
||||
|
||||
BeginEnumSysDev(CLSID_VideoCompressorCategory, moniker)
|
||||
|
@ -178,6 +181,7 @@ bool GSCaptureDlg::OnCommand(HWND hWnd, UINT id, UINT code)
|
|||
m_width = GetTextAsInt(IDC_WIDTH);
|
||||
m_height = GetTextAsInt(IDC_HEIGHT);
|
||||
m_filename = GetText(IDC_FILENAME);
|
||||
ComboBoxGetSelData(IDC_COLORSPACE, (INT_PTR)m_colorspace);
|
||||
|
||||
Codec c;
|
||||
|
||||
|
|
|
@ -49,5 +49,6 @@ public:
|
|||
int m_width;
|
||||
int m_height;
|
||||
string m_filename;
|
||||
int m_colorspace;
|
||||
CComPtr<IBaseFilter> m_enc;
|
||||
};
|
||||
|
|
|
@ -180,6 +180,7 @@ CRC::Game CRC::m_games[] =
|
|||
{0x774DE8E2, ValkyrieProfile2, JP, 0},
|
||||
{0x04CCB600, ValkyrieProfile2, EU, 0},
|
||||
{0xB65E141B, ValkyrieProfile2, EU, 0}, // PAL German
|
||||
{0xC70FC973, ValkyrieProfile2, EU, 0}, // PAL Italy
|
||||
{0x47B9B2FD, RadiataStories, US, 0},
|
||||
{0xE8FCF8EC, SMTNocturne, US, ZWriteMustNotClear}, // saves/reloads z buffer around shadow drawing, same issue with all the SMT games following
|
||||
{0xF0A31EE3, SMTNocturne, EU, ZWriteMustNotClear}, // SMTNocturne (Lucifers Call in EU)
|
||||
|
|
|
@ -132,6 +132,7 @@ BEGIN
|
|||
EDITTEXT IDC_HEIGHT,64,47,31,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
|
||||
PUSHBUTTON "Cancel",IDCANCEL,169,47,50,14
|
||||
DEFPUSHBUTTON "OK",IDOK,221,47,50,14
|
||||
COMBOBOX IDC_COLORSPACE,102,47,48,32,CBS_DROPDOWNLIST | WS_TABSTOP
|
||||
END
|
||||
|
||||
IDD_GPUCONFIG DIALOGEX 0, 0, 189, 199
|
||||
|
|
|
@ -74,6 +74,7 @@
|
|||
#define IDC_USERHACKS 2047
|
||||
#define IDC_SKIPDRAWHACKEDIT 2048
|
||||
#define IDC_STATIC10 2049
|
||||
#define IDC_COLORSPACE 3000
|
||||
#define IDR_CONVERT_FX 10000
|
||||
#define IDR_TFX_FX 10001
|
||||
#define IDR_MERGE_FX 10002
|
||||
|
|
Loading…
Reference in New Issue