GSdx: corrected recording code.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1637 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gabest11 2009-08-16 16:45:26 +00:00
parent 7a36e448c9
commit de2d3603a0
6 changed files with 17 additions and 20 deletions

View File

@ -731,6 +731,7 @@
<None Include="..\..\x86\ix86\ix86_inlines.inl" />
<None Include="..\..\x86\microVU_Alloc.inl" />
<None Include="..\..\x86\microVU_Analyze.inl" />
<None Include="..\..\x86\microVU_Branch.inl" />
<None Include="..\..\x86\microVU_Compile.inl" />
<None Include="..\..\x86\microVU_Execute.inl" />
<None Include="..\..\x86\microVU_Flags.inl" />

View File

@ -1110,6 +1110,9 @@
<None Include="..\..\x86\microVU_Analyze.inl">
<Filter>Ps2\EmotionEngine\VUmicro\Dynarec\microVU</Filter>
</None>
<None Include="..\..\x86\microVU_Branch.inl">
<Filter>Ps2\EmotionEngine\VUmicro\Dynarec\microVU</Filter>
</None>
<None Include="..\..\x86\microVU_Compile.inl">
<Filter>Ps2\EmotionEngine\VUmicro\Dynarec\microVU</Filter>
</None>

View File

@ -289,10 +289,14 @@ EXPORT_C GSirqCallback(void (*irq)())
s_irq = irq;
}
EXPORT_C_(int) GSsetupRecording(int start, void* pData)
EXPORT_C_(int) GSsetupRecording(int start, void* data)
{
s_gs->ToggleRecord();
GSKeyEventData e;
e.type = KEYPRESS;
e.key = VK_F12;
s_gs->KeyEvent(&e, start & 1);
return 1;
}

View File

@ -25,7 +25,7 @@
GSDevice::GSDevice()
: m_wnd(NULL)
, m_rbswapped(true) //(GScapture) was false before, but seems to be needed now (rama)
, m_rbswapped(false)
, m_backbuffer(NULL)
, m_merge(NULL)
, m_weavebob(NULL)

View File

@ -375,7 +375,7 @@ void GSRenderer::VSync(int field)
if(offscreen->Map(m))
{
m_capture.DeliverFrame(m.bits, m.pitch, m_dev->IsRBSwapped());
m_capture.DeliverFrame(m.bits, m.pitch, !m_dev->IsRBSwapped());
offscreen->Unmap();
}
@ -403,17 +403,7 @@ bool GSRenderer::MakeSnapshot(const string& path)
return true;
}
void GSRenderer::ToggleRecord(void)
{
if(m_capture.IsCapturing()){
m_capture.EndCapture();
}
else {
m_capture.BeginCapture(GetFPS());
}
}
void GSRenderer::KeyEvent(GSKeyEventData* e)
void GSRenderer::KeyEvent(GSKeyEventData* e, int param)
{
if(e->type == KEYPRESS)
{
@ -433,8 +423,8 @@ void GSRenderer::KeyEvent(GSKeyEventData* e)
m_shader = (m_shader + 3 + step) % 3;
return;
case VK_F12:
if(m_capture.IsCapturing()) m_capture.EndCapture();
else m_capture.BeginCapture(GetFPS());
if(param) m_capture.BeginCapture(GetFPS());
else m_capture.EndCapture();
return;
case VK_DELETE:
m_aa1 = !m_aa1;

View File

@ -76,8 +76,7 @@ public:
virtual bool Create(const string& title, int w, int h);
virtual void VSync(int field);
virtual bool MakeSnapshot(const string& path);
virtual void KeyEvent(GSKeyEventData* e);
virtual void ToggleRecord();
virtual void KeyEvent(GSKeyEventData* e, int param = 0);
virtual bool CanUpscale()
{
return !m_nativeres && m_regs->PMODE.EN != 0; // upscale ratio depends on the display size, with no output it may not be set correctly (ps2 logo to game transition)