Remove PluginSpecs.h. Merge the few needed enums from that file into Common.h for now. I am up for suggestions on a better place for those.

Fix frame dumping on linux.
Make sure that on screen messages get cleared between games.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7039 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice
2011-02-02 04:40:27 +00:00
parent ebc8f02885
commit 8b309e26dc
51 changed files with 221 additions and 249 deletions

View File

@ -244,6 +244,7 @@ bool AVIDump::CreateFile()
s_FormatContext = avformat_alloc_context();
snprintf(s_FormatContext->filename, sizeof(s_FormatContext->filename), "%s",
StringFromFormat("%sframedump0.avi", File::GetUserPath(D_DUMPFRAMES_IDX)).c_str());
File::CreateFullPath(s_FormatContext->filename);
if (!(s_FormatContext->oformat = av_guess_format("avi", NULL, NULL)) ||
!(s_Stream = av_new_stream(s_FormatContext, 0)))

View File

@ -217,11 +217,11 @@ void BPWritten(const BPCmd& bp)
}
break;
case BPMEM_PE_TOKEN_ID: // Pixel Engine Token ID
PixelEngine::SetToken(static_cast<u16>(bp.newvalue & 0xFFFF), FALSE);
PixelEngine::SetToken(static_cast<u16>(bp.newvalue & 0xFFFF), false);
DEBUG_LOG(VIDEO, "SetPEToken 0x%04x", (bp.newvalue & 0xFFFF));
break;
case BPMEM_PE_TOKEN_INT_ID: // Pixel Engine Interrupt Token ID
PixelEngine::SetToken(static_cast<u16>(bp.newvalue & 0xFFFF), TRUE);
PixelEngine::SetToken(static_cast<u16>(bp.newvalue & 0xFFFF), true);
DEBUG_LOG(VIDEO, "SetPEToken + INT 0x%04x", (bp.newvalue & 0xFFFF));
break;
// ------------------------

View File

@ -39,9 +39,9 @@ static struct
static u32 s_AccessEFBResult = 0;
void VideoBackendHLE::EmuStateChange(PLUGIN_EMUSTATE newState)
void VideoBackendHLE::EmuStateChange(EMUSTATE_CHANGE newState)
{
Fifo_RunLoop((newState == PLUGIN_EMUSTATE_PLAY) ? true : false);
Fifo_RunLoop((newState == EMUSTATE_CHANGE_PLAY) ? true : false);
}
// Enter and exit the video loop
@ -70,7 +70,7 @@ void VideoFifo_CheckSwapRequest()
{
EFBRectangle rc;
g_renderer->Swap(s_beginFieldArgs.xfbAddr, s_beginFieldArgs.field, s_beginFieldArgs.fbWidth, s_beginFieldArgs.fbHeight,rc);
Common::AtomicStoreRelease(s_swapRequested, FALSE);
Common::AtomicStoreRelease(s_swapRequested, false);
}
}
}
@ -112,7 +112,7 @@ void VideoBackendHLE::Video_EndField()
{
if (s_PluginInitialized)
{
Common::AtomicStoreRelease(s_swapRequested, TRUE);
Common::AtomicStoreRelease(s_swapRequested, true);
}
}
@ -121,6 +121,11 @@ void VideoBackendHLE::Video_AddMessage(const char* pstr, u32 milliseconds)
OSD::AddMessage(pstr, milliseconds);
}
void VideoBackendHLE::Video_ClearMessages()
{
OSD::ClearMessages();
}
// Screenshot
bool VideoBackendHLE::Video_Screenshot(const char *_szFilename)
{
@ -134,7 +139,7 @@ void VideoFifo_CheckEFBAccess()
{
s_AccessEFBResult = g_renderer->AccessEFB(s_accessEFBArgs.type, s_accessEFBArgs.x, s_accessEFBArgs.y, s_accessEFBArgs.Data);
Common::AtomicStoreRelease(s_efbAccessRequested, FALSE);
Common::AtomicStoreRelease(s_efbAccessRequested, false);
}
}
@ -147,7 +152,7 @@ u32 VideoBackendHLE::Video_AccessEFB(EFBAccessType type, u32 x, u32 y, u32 Input
s_accessEFBArgs.y = y;
s_accessEFBArgs.Data = InputData;
Common::AtomicStoreRelease(s_efbAccessRequested, TRUE);
Common::AtomicStoreRelease(s_efbAccessRequested, true);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread)
{
@ -164,7 +169,7 @@ u32 VideoBackendHLE::Video_AccessEFB(EFBAccessType type, u32 x, u32 y, u32 Input
return 0;
}
static volatile u32 s_doStateRequested = FALSE;
static volatile u32 s_doStateRequested = false;
static volatile struct
{
@ -193,7 +198,7 @@ static void check_DoState() {
RecomputeCachedArraybases();
}
Common::AtomicStoreRelease(s_doStateRequested, FALSE);
Common::AtomicStoreRelease(s_doStateRequested, false);
}
}
@ -202,7 +207,7 @@ void VideoBackendHLE::DoState(PointerWrap& p)
{
s_doStateArgs.ptr = p.ptr;
s_doStateArgs.mode = p.mode;
Common::AtomicStoreRelease(s_doStateRequested, TRUE);
Common::AtomicStoreRelease(s_doStateRequested, true);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread)
{
while (Common::AtomicLoadAcquire(s_doStateRequested) && !s_FifoShuttingDown)

View File

@ -18,7 +18,7 @@
#ifndef _NATIVEVERTEXFORMAT_H
#define _NATIVEVERTEXFORMAT_H
#include "PluginSpecs.h"
#include "Common.h"
// m_components
enum {

View File

@ -76,4 +76,11 @@ void DrawMessages()
}
}
void ClearMessages()
{
std::list<MESSAGE>::iterator it = s_listMsgs.begin();
while (it != s_listMsgs.end())
it = s_listMsgs.erase(it);
}
} // namespace

View File

@ -24,6 +24,7 @@ namespace OSD
// On-screen message display
void AddMessage(const char* str, u32 ms);
void DrawMessages(); // draw the current messages on the screen. Only call once per frame.
void ClearMessages();
} // namespace

View File

@ -213,7 +213,7 @@ bool FifoCommandRunnable()
"* Some other sort of bug\n\n"
"Dolphin will now likely crash or hang. Enjoy." , cmd_byte);
Host_SysMessage(szTemp);
Core::Callback_VideoLog(szTemp, TRUE);
Core::Callback_VideoLog(szTemp, true);
{
SCPFifoStruct &fifo = CommandProcessor::fifo;
@ -238,7 +238,7 @@ bool FifoCommandRunnable()
,fifo.bFF_Breakpoint ? "true" : "false");
Host_SysMessage(szTmp);
Core::Callback_VideoLog(szTmp, TRUE);
Core::Callback_VideoLog(szTmp, true);
}
}
break;

View File

@ -107,7 +107,7 @@ void Renderer::RenderToXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRect
else
{
g_renderer->Swap(xfbAddr, FIELD_PROGRESSIVE, fbWidth, fbHeight,sourceRc,Gamma);
Common::AtomicStoreRelease(s_swapRequested, FALSE);
Common::AtomicStoreRelease(s_swapRequested, false);
}
}

View File

@ -7,8 +7,6 @@
#include "RenderBase.h"
#include "FileUtil.h"
#include "PluginSpecs.h"
#include "TextureCacheBase.h"
#include "Debugger.h"
#include "ConfigManager.h"

View File

@ -18,6 +18,11 @@
#ifndef _VIDEOCOMMON_H
#define _VIDEOCOMMON_H
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
#include "Common.h"
#include "MathUtil.h"
#include "VideoBackendBase.h"