69 changes: 23 additions & 46 deletions Source/Core/VideoCommon/Src/MainBase.cpp
Expand Up @@ -12,6 +12,8 @@
#include "Fifo.h"
#include "BPStructs.h"
#include "OnScreenDisplay.h"
#include "VideoBackendBase.h"
#include "ConfigManager.h"

bool s_PluginInitialized = false;

Expand All @@ -37,25 +39,24 @@ static struct

static u32 s_AccessEFBResult = 0;


void EmuStateChange(PLUGIN_EMUSTATE newState)
void VideoBackendHLE::EmuStateChange(PLUGIN_EMUSTATE newState)
{
Fifo_RunLoop((newState == PLUGIN_EMUSTATE_PLAY) ? true : false);
}

// Enter and exit the video loop
void Video_EnterLoop()
void VideoBackendHLE::Video_EnterLoop()
{
Fifo_EnterLoop(g_VideoInitialize);
Fifo_EnterLoop();
}

void Video_ExitLoop()
void VideoBackendHLE::Video_ExitLoop()
{
Fifo_ExitLoop();
s_FifoShuttingDown = true;
}

void Video_SetRendering(bool bEnabled)
void VideoBackendHLE::Video_SetRendering(bool bEnabled)
{
Fifo_SetRendering(bEnabled);
}
Expand Down Expand Up @@ -93,11 +94,11 @@ void VideoFifo_CheckSwapRequestAt(u32 xfbAddr, u32 fbWidth, u32 fbHeight)
}

// Run from the CPU thread (from VideoInterface.cpp)
void Video_BeginField(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
void VideoBackendHLE::Video_BeginField(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
{
if (s_PluginInitialized && g_ActiveConfig.bUseXFB)
{
if (!g_VideoInitialize.bOnThread)
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread)
VideoFifo_CheckSwapRequest();
s_beginFieldArgs.xfbAddr = xfbAddr;
s_beginFieldArgs.field = field;
Expand All @@ -107,23 +108,24 @@ void Video_BeginField(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
}

// Run from the CPU thread (from VideoInterface.cpp)
void Video_EndField()
void VideoBackendHLE::Video_EndField()
{
if (s_PluginInitialized)
{
Common::AtomicStoreRelease(s_swapRequested, TRUE);
}
}

void Video_AddMessage(const char* pstr, u32 milliseconds)
void VideoBackendHLE::Video_AddMessage(const char* pstr, u32 milliseconds)
{
OSD::AddMessage(pstr, milliseconds);
}

// Screenshot
void Video_Screenshot(const char *_szFilename)
bool VideoBackendHLE::Video_Screenshot(const char *_szFilename)
{
Renderer::SetScreenshot(_szFilename);
return true;
}

void VideoFifo_CheckEFBAccess()
Expand All @@ -136,7 +138,7 @@ void VideoFifo_CheckEFBAccess()
}
}

u32 Video_AccessEFB(EFBAccessType type, u32 x, u32 y, u32 InputData)
u32 VideoBackendHLE::Video_AccessEFB(EFBAccessType type, u32 x, u32 y, u32 InputData)
{
if (s_PluginInitialized)
{
Expand All @@ -147,7 +149,7 @@ u32 Video_AccessEFB(EFBAccessType type, u32 x, u32 y, u32 InputData)

Common::AtomicStoreRelease(s_efbAccessRequested, TRUE);

if (g_VideoInitialize.bOnThread)
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread)
{
while (Common::AtomicLoadAcquire(s_efbAccessRequested) && !s_FifoShuttingDown)
//Common::SleepCurrentThread(1);
Expand Down Expand Up @@ -196,12 +198,12 @@ static void check_DoState() {
}

// Run from the CPU thread
void DoState(unsigned char **ptr, int mode)
void VideoBackendHLE::DoState(PointerWrap& p)
{
s_doStateArgs.ptr = ptr;
s_doStateArgs.mode = mode;
s_doStateArgs.ptr = p.ptr;
s_doStateArgs.mode = p.mode;
Common::AtomicStoreRelease(s_doStateRequested, TRUE);
if (g_VideoInitialize.bOnThread)
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread)
{
while (Common::AtomicLoadAcquire(s_doStateRequested) && !s_FifoShuttingDown)
//Common::SleepCurrentThread(1);
Expand All @@ -218,47 +220,22 @@ void VideoFifo_CheckAsyncRequest()
check_DoState();
}

void Video_CommandProcessorRead16(u16& _rReturnValue, const u32 _Address)
{
CommandProcessor::Read16(_rReturnValue, _Address);
}

void Video_CommandProcessorWrite16(const u16 _Data, const u32 _Address)
{
CommandProcessor::Write16(_Data, _Address);
}

void Video_PixelEngineRead16(u16& _rReturnValue, const u32 _Address)
{
PixelEngine::Read16(_rReturnValue, _Address);
}

void Video_PixelEngineWrite16(const u16 _Data, const u32 _Address)
{
PixelEngine::Write16(_Data, _Address);
}

void Video_PixelEngineWrite32(const u32 _Data, const u32 _Address)
{
PixelEngine::Write32(_Data, _Address);
}

void Video_GatherPipeBursted(void)
void VideoBackend::Video_GatherPipeBursted()
{
CommandProcessor::GatherPipeBursted();
}

void Video_WaitForFrameFinish(void)
void VideoBackendHLE::Video_WaitForFrameFinish()
{
CommandProcessor::WaitForFrameFinish();
}

bool Video_IsFifoBusy(void)
bool VideoBackendHLE::Video_IsFifoBusy()
{
return CommandProcessor::isFifoBusy;
}

void Video_AbortFrame(void)
void VideoBackendHLE::Video_AbortFrame()
{
CommandProcessor::AbortFrame();
}
19 changes: 11 additions & 8 deletions Source/Core/VideoCommon/Src/OpcodeDecoding.cpp
Expand Up @@ -30,6 +30,9 @@
#include "OpcodeDecoding.h"
#include "CommandProcessor.h"
#include "CPUDetect.h"
#include "Core.h"
#include "Host.h"
#include "HW/Memmap.h"

#include "VertexLoaderManager.h"

Expand Down Expand Up @@ -95,9 +98,9 @@ static void Decode();
void InterpretDisplayList(u32 address, u32 size)
{
u8* old_pVideoData = g_pVideoData;
u8* startAddress = Memory_GetPtr(address);
u8* startAddress = Memory::GetPointer(address);

// Avoid the crash if Memory_GetPtr failed ..
// Avoid the crash if Memory::GetPointer failed ..
if (startAddress != 0)
{
g_pVideoData = startAddress;
Expand Down Expand Up @@ -201,16 +204,16 @@ bool FifoCommandRunnable()
else
{
// TODO(Omega): Maybe dump FIFO to file on this error
char szTemp[1024];
sprintf(szTemp, "GFX FIFO: Unknown Opcode (0x%x).\n"
char szTemp[1024];
sprintf(szTemp, "GFX FIFO: Unknown Opcode (0x%x).\n"
"This means one of the following:\n"
"* The emulated GPU got desynced, disabling dual core can help\n"
"* Command stream corrupted by some spurious memory bug\n"
"* This really is an unknown opcode (unlikely)\n"
"* Some other sort of bug\n\n"
"Dolphin will now likely crash or hang. Enjoy." , cmd_byte);
g_VideoInitialize.pSysMessage(szTemp);
g_VideoInitialize.pLog(szTemp, TRUE);
Host_SysMessage(szTemp);
Core::Callback_VideoLog(szTemp, TRUE);
{
SCPFifoStruct &fifo = CommandProcessor::fifo;

Expand All @@ -234,8 +237,8 @@ bool FifoCommandRunnable()
,fifo.bFF_BPEnable ? "true" : "false" ,fifo.bFF_BPInt ? "true" : "false"
,fifo.bFF_Breakpoint ? "true" : "false");

g_VideoInitialize.pSysMessage(szTmp);
g_VideoInitialize.pLog(szTmp, TRUE);
Host_SysMessage(szTmp);
Core::Callback_VideoLog(szTmp, TRUE);
}
}
break;
Expand Down
29 changes: 16 additions & 13 deletions Source/Core/VideoCommon/Src/PixelEngine.cpp
Expand Up @@ -24,9 +24,12 @@
#include "VideoCommon.h"
#include "ChunkFile.h"
#include "Atomic.h"
#include "CoreTiming.h"
#include "ConfigManager.h"

#include "PixelEngine.h"
#include "CommandProcessor.h"
#include "HW/ProcessorInterface.h"

namespace PixelEngine
{
Expand Down Expand Up @@ -151,8 +154,8 @@ void Init()
{
m_Control.Hex = 0;

et_SetTokenOnMainThread = g_VideoInitialize.pRegisterEvent("SetToken", SetToken_OnMainThread);
et_SetFinishOnMainThread = g_VideoInitialize.pRegisterEvent("SetFinish", SetFinish_OnMainThread);
et_SetTokenOnMainThread = CoreTiming::RegisterEvent("SetToken", SetToken_OnMainThread);
et_SetFinishOnMainThread = CoreTiming::RegisterEvent("SetFinish", SetFinish_OnMainThread);

bbox[0] = 0x80;
bbox[1] = 0xA0;
Expand Down Expand Up @@ -298,7 +301,7 @@ void Write32(const u32 _iValue, const u32 _iAddress)

bool AllowIdleSkipping()
{
return !g_VideoInitialize.bOnThread || (!m_Control.PETokenEnable && !m_Control.PEFinishEnable);
return !SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread || (!m_Control.PETokenEnable && !m_Control.PEFinishEnable);
}

void UpdateInterrupts()
Expand All @@ -314,7 +317,7 @@ void UpdateTokenInterrupt(bool active)
{
if(interruptSetToken != active)
{
g_VideoInitialize.pSetInterrupt(INT_CAUSE_PE_TOKEN, active);
ProcessorInterface::SetInterrupt(INT_CAUSE_PE_TOKEN, active);
interruptSetToken = active;
}
}
Expand All @@ -324,7 +327,7 @@ void UpdateFinishInterrupt(bool active)

if(interruptSetFinish != active)
{
g_VideoInitialize.pSetInterrupt(INT_CAUSE_PE_FINISH, active);
ProcessorInterface::SetInterrupt(INT_CAUSE_PE_FINISH, active);
interruptSetFinish = active;
}
}
Expand Down Expand Up @@ -366,8 +369,7 @@ void SetToken(const u16 _token, const int _bSetTokenAcknowledge)
CommandProcessor::IncrementGPWDToken(); // for DC watchdog hack since PEToken seems to be a frame-finish too
Common::AtomicStore(*(volatile u32*)&CommandProcessor::fifo.PEToken, _token);
CommandProcessor::interruptTokenWaiting = true;
g_VideoInitialize.pScheduleEvent_Threadsafe(
0, et_SetTokenOnMainThread, _token | (_bSetTokenAcknowledge << 16));
CoreTiming::ScheduleEvent_Threadsafe(0, et_SetTokenOnMainThread, _token | (_bSetTokenAcknowledge << 16));
}
else // set token value
{
Expand All @@ -386,8 +388,7 @@ void SetFinish()
{
CommandProcessor::IncrementGPWDToken(); // for DC watchdog hack
CommandProcessor::interruptFinishWaiting = true;
g_VideoInitialize.pScheduleEvent_Threadsafe(
0, et_SetFinishOnMainThread, 0);
CoreTiming::ScheduleEvent_Threadsafe(0, et_SetFinishOnMainThread, 0);
INFO_LOG(PIXELENGINE, "VIDEO Set Finish");
}

Expand All @@ -401,9 +402,10 @@ void ResetSetFinish()
UpdateFinishInterrupt(false);
g_bSignalFinishInterrupt = false;

}else
}
else
{
g_VideoInitialize.pRemoveEvent(et_SetFinishOnMainThread);
CoreTiming::RemoveEvent(et_SetFinishOnMainThread);
}
CommandProcessor::interruptFinishWaiting = false;
}
Expand All @@ -415,9 +417,10 @@ void ResetSetToken()
UpdateTokenInterrupt(false);
g_bSignalTokenInterrupt = false;

}else
}
else
{
g_VideoInitialize.pRemoveEvent(et_SetTokenOnMainThread);
CoreTiming::RemoveEvent(et_SetTokenOnMainThread);
}
CommandProcessor::interruptTokenWaiting = false;
}
Expand Down
31 changes: 24 additions & 7 deletions Source/Core/VideoCommon/Src/PixelShaderManager.cpp
Expand Up @@ -22,7 +22,9 @@
#include "PixelShaderManager.h"
#include "VideoCommon.h"
#include "VideoConfig.h"

#include "RenderBase.h"

static float GC_ALIGNED16(s_fMaterials[16]);
static int s_nColorsChanged[2]; // 0 - regular colors, 1 - k colors
static int s_nIndTexMtxChanged;
Expand All @@ -43,6 +45,21 @@ static u32 lastTexDims[8]; // width | height << 16 | wrap_s << 28 | wrap_t << 30
static u32 lastZBias;
static int nMaterialsChanged;

inline void SetPSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4)
{
g_renderer->SetPSConstant4f(const_number, f1, f2, f3, f4);
}

inline void SetPSConstant4fv(unsigned int const_number, const float *f)
{
g_renderer->SetPSConstant4fv(const_number, f);
}

inline void SetMultiPSConstant4fv(unsigned int const_number, unsigned int count, const float *f)
{
g_renderer->SetMultiPSConstant4fv(const_number, count, f);
}

void PixelShaderManager::Init()
{
lastAlpha = 0;
Expand Down Expand Up @@ -97,7 +114,7 @@ void PixelShaderManager::SetConstants()

if (s_bAlphaChanged)
{
SetPSConstant4f(C_ALPHA, (lastAlpha&0xff)/255.0f, ((lastAlpha>>8)&0xff)/255.0f, 0, ((lastAlpha>>16)&0xff)/255.0f);
SetPSConstant4f(C_ALPHA, (lastAlpha&0xff)/255.0f, ((lastAlpha>>8)&0xff)/255.0f, 0, ((lastAlpha>>16)&0xff)/255.0f);
s_bAlphaChanged = false;
}

Expand Down Expand Up @@ -126,7 +143,7 @@ void PixelShaderManager::SetConstants()
if (s_bZBiasChanged || s_bDepthRangeChanged)
{
//ERROR_LOG("pixel=%x,%x, bias=%x\n", bpmem.zcontrol.pixel_format, bpmem.ztex2.type, lastZBias);
SetPSConstant4f(C_ZBIAS+1, lastDepthRange[0] / 16777216.0f, lastDepthRange[1] / 16777216.0f, 0, (float)(lastZBias)/16777215.0f);
SetPSConstant4f(C_ZBIAS+1, lastDepthRange[0] / 16777216.0f, lastDepthRange[1] / 16777216.0f, 0, (float)(lastZBias)/16777215.0f);
s_bZBiasChanged = s_bDepthRangeChanged = false;
}

Expand All @@ -144,7 +161,7 @@ void PixelShaderManager::SetConstants()
f[2 * i + 1] = bpmem.texscale[0].getScaleT(i & 1);
PRIM_LOG("tex indscale%d: %f %f\n", i, f[2 * i], f[2 * i + 1]);
}
SetPSConstant4fv(C_INDTEXSCALE, f);
SetPSConstant4fv(C_INDTEXSCALE, f);
}

if (s_nIndTexScaleChanged & 0x0c) {
Expand All @@ -153,7 +170,7 @@ void PixelShaderManager::SetConstants()
f[2 * i + 1] = bpmem.texscale[1].getScaleT(i & 1);
PRIM_LOG("tex indscale%d: %f %f\n", i, f[2 * i], f[2 * i + 1]);
}
SetPSConstant4fv(C_INDTEXSCALE+1, &f[4]);
SetPSConstant4fv(C_INDTEXSCALE+1, &f[4]);
}

s_nIndTexScaleChanged = 0;
Expand All @@ -173,7 +190,7 @@ void PixelShaderManager::SetConstants()
// xyz - static matrix
// TODO w - dynamic matrix scale / 256...... somehow / 4 works better
// rev 2972 - now using / 256.... verify that this works
SetPSConstant4f(C_INDTEXMTX + 2 * i,
SetPSConstant4f(C_INDTEXMTX + 2 * i,
bpmem.indmtx[i].col0.ma * fscale,
bpmem.indmtx[i].col1.mc * fscale,
bpmem.indmtx[i].col2.me * fscale,
Expand All @@ -195,8 +212,8 @@ void PixelShaderManager::SetConstants()

if (s_bFogColorChanged)
{
SetPSConstant4f(C_FOG, bpmem.fog.color.r / 255.0f, bpmem.fog.color.g / 255.0f, bpmem.fog.color.b / 255.0f, 0);
s_bFogColorChanged = false;
SetPSConstant4f(C_FOG, bpmem.fog.color.r / 255.0f, bpmem.fog.color.g / 255.0f, bpmem.fog.color.b / 255.0f, 0);
s_bFogColorChanged = false;
}

if (s_bFogParamChanged)
Expand Down
4 changes: 0 additions & 4 deletions Source/Core/VideoCommon/Src/PixelShaderManager.h
Expand Up @@ -22,10 +22,6 @@
#include "XFMemory.h"
#include "PixelShaderGen.h"

void SetPSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4);
void SetPSConstant4fv(unsigned int const_number, const float *f);
void SetMultiPSConstant4fv(unsigned int const_number, unsigned int count, const float *f);

// The non-API dependent parts.
class PixelShaderManager
{
Expand Down
3 changes: 0 additions & 3 deletions Source/Core/VideoCommon/Src/RenderBase.cpp
Expand Up @@ -42,9 +42,6 @@
int frameCount;
//int OSDChoice, OSDTime, OSDInternalW, OSDInternalH;

SVideoInitialize g_VideoInitialize;
PLUGIN_GLOBALS* globals;

Renderer *g_renderer;

bool s_bLastFrameDumped = false;
Expand Down
14 changes: 11 additions & 3 deletions Source/Core/VideoCommon/Src/RenderBase.h
Expand Up @@ -31,7 +31,6 @@
#include "VideoCommon.h"
#include "Thread.h"
#include "MathUtil.h"
#include "pluginspecs_video.h"
#include "NativeVertexFormat.h"
#include "FramebufferManagerBase.h"
#include "BPMemory.h"
Expand All @@ -43,8 +42,6 @@ extern int frameCount;
extern int OSDChoice, OSDTime;

extern bool s_bLastFrameDumped;
extern SVideoInitialize g_VideoInitialize;
extern PLUGIN_GLOBALS* globals;

// Renderer really isn't a very good name for this class - it's more like "Misc".
// The long term goal is to get rid of this class and replace it with others that make
Expand Down Expand Up @@ -132,6 +129,17 @@ class Renderer
static unsigned int GetPrevPixelFormat() { return prev_efb_format; }
static void StorePixelFormat(unsigned int new_format) { prev_efb_format = new_format; }

// TODO: doesn't belong here
virtual void SetPSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4) = 0;
virtual void SetPSConstant4fv(unsigned int const_number, const float *f) = 0;
virtual void SetMultiPSConstant4fv(unsigned int const_number, unsigned int count, const float *f) = 0;

// TODO: doesn't belong here
virtual void SetVSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4) = 0;
virtual void SetVSConstant4fv(unsigned int const_number, const float *f) = 0;
virtual void SetMultiVSConstant3fv(unsigned int const_number, unsigned int count, const float *f) = 0;
virtual void SetMultiVSConstant4fv(unsigned int const_number, unsigned int count, const float *f) = 0;

protected:

static Common::CriticalSection s_criticalScreenshot;
Expand Down
17 changes: 8 additions & 9 deletions Source/Core/VideoCommon/Src/TextureCacheBase.cpp
Expand Up @@ -11,6 +11,8 @@

#include "TextureCacheBase.h"
#include "Debugger.h"
#include "ConfigManager.h"
#include "HW/Memmap.h"

// ugly
extern int frameCount;
Expand All @@ -33,20 +35,17 @@ TextureCache::TCacheEntryBase::~TCacheEntryBase()

if (!isRenderTarget && !g_ActiveConfig.bSafeTextureCache)
{
u32 *const ptr = (u32*)g_VideoInitialize.pGetMemoryPointer(addr);
u32 *const ptr = (u32*)Memory::GetPointer(addr);
if (ptr && *ptr == hash)
*ptr = oldpixel;
}
}

// TODO: uglyness
extern PLUGIN_GLOBALS *globals;

TextureCache::TextureCache()
{
temp = (u8*)AllocateMemoryPages(TEMP_SIZE);
TexDecoder_SetTexFmtOverlayOptions(g_ActiveConfig.bTexFmtOverlayEnable, g_ActiveConfig.bTexFmtOverlayCenter);
HiresTextures::Init(globals->unique_id);
HiresTextures::Init(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID.c_str());
}

void TextureCache::Invalidate(bool shutdown)
Expand Down Expand Up @@ -164,7 +163,7 @@ TextureCache::TCacheEntryBase* TextureCache::Load(unsigned int stage,
if (0 == address)
return NULL;

u8* ptr = g_VideoInitialize.pGetMemoryPointer(address);
u8* ptr = Memory::GetPointer(address);

// TexelSizeInNibbles(format)*width*height/16;
const unsigned int bsw = TexDecoder_GetBlockWidthInTexels(texformat) - 1;
Expand Down Expand Up @@ -288,7 +287,7 @@ TextureCache::TCacheEntryBase* TextureCache::Load(unsigned int stage,
unsigned int newWidth = width;
unsigned int newHeight = height;

sprintf(texPathTemp, "%s_%08llx_%i", globals->unique_id, texHash, texformat);
sprintf(texPathTemp, "%s_%08llx_%i", SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID.c_str(), texHash, texformat);
pcfmt = HiresTextures::GetHiresTex(texPathTemp, &newWidth, &newHeight, texformat, temp);

if (pcfmt != PC_TEX_FMT_NONE)
Expand Down Expand Up @@ -385,11 +384,11 @@ TextureCache::TCacheEntryBase* TextureCache::Load(unsigned int stage,
char szDir[MAX_PATH];

// make sure that the directory exists
sprintf(szDir, "%s%s", File::GetUserPath(D_DUMPTEXTURES_IDX), globals->unique_id);
sprintf(szDir, "%s%s", File::GetUserPath(D_DUMPTEXTURES_IDX), SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID.c_str());
if (false == File::Exists(szDir) || false == File::IsDirectory(szDir))
File::CreateDir(szDir);

sprintf(szTemp, "%s/%s_%08llx_%i.png", szDir, globals->unique_id, texHash, texformat);
sprintf(szTemp, "%s/%s_%08llx_%i.png", szDir, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID.c_str(), texHash, texformat);

if (false == File::Exists(szTemp))
entry->Save(szTemp);
Expand Down
5 changes: 3 additions & 2 deletions Source/Core/VideoCommon/Src/TextureConversionShader.cpp
Expand Up @@ -25,6 +25,7 @@
#include "PixelShaderManager.h"
#include "PixelShaderGen.h"
#include "BPMemory.h"
#include "RenderBase.h"

#define WRITE p+=sprintf

Expand Down Expand Up @@ -874,8 +875,8 @@ const char *GenerateEncodingShader(u32 format,API_TYPE ApiType)

void SetShaderParameters(float width, float height, float offsetX, float offsetY, float widthStride, float heightStride,float buffW,float buffH)
{
SetPSConstant4f(C_COLORMATRIX, widthStride, heightStride, buffW, buffH);
SetPSConstant4f(C_COLORMATRIX + 1, width, (height - 1), offsetX, offsetY);
g_renderer->SetPSConstant4f(C_COLORMATRIX, widthStride, heightStride, buffW, buffH);
g_renderer->SetPSConstant4f(C_COLORMATRIX + 1, width, (height - 1), offsetX, offsetY);
}

} // namespace
3 changes: 2 additions & 1 deletion Source/Core/VideoCommon/Src/VertexLoader.cpp
Expand Up @@ -25,6 +25,7 @@
#include "x64Emitter.h"
#include "ABI.h"
#include "PixelEngine.h"
#include "Host.h"

#include "LookUpTables.h"
#include "Statistics.h"
Expand Down Expand Up @@ -302,7 +303,7 @@ void VertexLoader::CompileVertexTranslator()
{
char temp[256];
sprintf(temp,"%i %i %i %i", m_VtxDesc.Normal, m_VtxAttr.NormalFormat, m_VtxAttr.NormalElements, m_VtxAttr.NormalIndex3);
g_VideoInitialize.pSysMessage("VertexLoader_Normal::GetFunction returned zero!");
Host_SysMessage("VertexLoader_Normal::GetFunction returned zero!");
}
WriteCall(pFunc);

Expand Down
5 changes: 3 additions & 2 deletions Source/Core/VideoCommon/Src/VertexLoaderManager.cpp
Expand Up @@ -32,6 +32,7 @@ using __gnu_cxx::hash_map;
#include "VertexShaderManager.h"
#include "VertexLoader.h"
#include "VertexLoaderManager.h"
#include "HW/Memmap.h"

static int s_attr_dirty; // bitfield

Expand Down Expand Up @@ -204,7 +205,7 @@ void LoadCPReg(u32 sub_cmd, u32 value)
// Pointers to vertex arrays in GC RAM
case 0xA0:
arraybases[sub_cmd & 0xF] = value;
cached_arraybases[sub_cmd & 0xF] = Memory_GetPtr(value);
cached_arraybases[sub_cmd & 0xF] = Memory::GetPointer(value);
break;

case 0xB0:
Expand All @@ -217,6 +218,6 @@ void RecomputeCachedArraybases()
{
for (int i = 0; i < 16; i++)
{
cached_arraybases[i] = Memory_GetPtr(arraybases[i]);
cached_arraybases[i] = Memory::GetPointer(arraybases[i]);
}
}
22 changes: 22 additions & 0 deletions Source/Core/VideoCommon/Src/VertexShaderManager.cpp
Expand Up @@ -32,6 +32,8 @@
#include "VideoCommon.h"
#include "VertexManagerBase.h"

#include "RenderBase.h"

static float GC_ALIGNED16(s_fMaterials[16]);
float GC_ALIGNED16(g_fProjectionMatrix[16]);

Expand All @@ -50,6 +52,26 @@ static float s_fViewRotation[2];

void UpdateViewport();

inline void SetVSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4)
{
g_renderer->SetVSConstant4f(const_number, f1, f2, f3, f4);
}

inline void SetVSConstant4fv(unsigned int const_number, const float *f)
{
g_renderer->SetVSConstant4fv(const_number, f);
}

inline void SetMultiVSConstant3fv(unsigned int const_number, unsigned int count, const float *f)
{
g_renderer->SetMultiVSConstant3fv(const_number, count, f);
}

inline void SetMultiVSConstant4fv(unsigned int const_number, unsigned int count, const float *f)
{
g_renderer->SetMultiVSConstant4fv(const_number, count, f);
}

namespace
{
// Control Variables
Expand Down
6 changes: 0 additions & 6 deletions Source/Core/VideoCommon/Src/VertexShaderManager.h
Expand Up @@ -55,10 +55,4 @@ class VertexShaderManager
static void ResetView();
};

void SetVSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4);
void SetVSConstant4fv(unsigned int const_number, const float *f);
void SetMultiVSConstant3fv(unsigned int const_number, unsigned int count, const float *f);
void SetMultiVSConstant4fv(unsigned int const_number, unsigned int count, const float *f);


#endif // _VERTEXSHADERMANAGER_H
40 changes: 1 addition & 39 deletions Source/Core/VideoCommon/Src/VideoCommon.h
Expand Up @@ -20,7 +20,7 @@

#include "Common.h"
#include "MathUtil.h"
#include "pluginspecs_video.h"
#include "VideoBackendBase.h"

#if defined(_MSC_VER) && !defined(__x86_64__) && !defined(_M_X64)
void * memcpy_amd(void *dest, const void *src, size_t n);
Expand Down Expand Up @@ -57,44 +57,6 @@ enum
// Do testing to figure out if the speed hit is bad?
// #define BBOX_SUPPORT

extern SVideoInitialize g_VideoInitialize;

inline u8 *Memory_GetPtr(u32 _uAddress)
{
return g_VideoInitialize.pGetMemoryPointer(_uAddress);
}

inline u8 Memory_Read_U8(u32 _uAddress)
{
return *(u8*)g_VideoInitialize.pGetMemoryPointer(_uAddress);
}

inline u16 Memory_Read_U16(u32 _uAddress)
{
return Common::swap16(*(u16*)g_VideoInitialize.pGetMemoryPointer(_uAddress));
}

inline u32 Memory_Read_U32(u32 _uAddress)
{
return Common::swap32(*(u32*)g_VideoInitialize.pGetMemoryPointer(_uAddress));
}

inline u8* Memory_Read_U8_Ptr(u32 _uAddress)
{
return (u8*)g_VideoInitialize.pGetMemoryPointer(_uAddress);
}

inline u16* Memory_Read_U16_Unswapped_Ptr(u32 _uAddress)
{
return (u16*)g_VideoInitialize.pGetMemoryPointer(_uAddress);
}

inline u32* Memory_Read_U32_Unswapped_Ptr(u32 _uAddress)
{
return (u32*)g_VideoInitialize.pGetMemoryPointer(_uAddress);
}


// Logging
// ----------
void HandleGLError();
Expand Down
5 changes: 4 additions & 1 deletion Source/Core/VideoCommon/Src/VideoConfig.cpp
Expand Up @@ -243,6 +243,9 @@ void VideoConfig::Save(const char *ini_file)
iniFile.Save(ini_file);
}

// TODO: remove
extern bool g_aspect_wide;

// TODO: Figure out a better place for this function.
void ComputeDrawRectangle(int backbuffer_width, int backbuffer_height, bool flip, TargetRectangle *rc)
{
Expand All @@ -257,7 +260,7 @@ void ComputeDrawRectangle(int backbuffer_width, int backbuffer_height, bool flip

// Handle aspect ratio.
// Default to auto.
bool use16_9 = g_VideoInitialize.bAutoAspectIs16_9;
bool use16_9 = g_aspect_wide;

// Update aspect ratio hack values
// Won't take effect until next frame
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/VideoCommon/Src/XFStructs.cpp
Expand Up @@ -22,6 +22,7 @@
#include "VertexManagerBase.h"
#include "VertexShaderManager.h"
#include "PixelShaderManager.h"
#include "HW/Memmap.h"

// LoadXFReg 0x10
void LoadXFReg(u32 transferSize, u32 baseAddress, u32 *pData)
Expand Down Expand Up @@ -224,5 +225,5 @@ void LoadIndexedXF(u32 val, int array)
//PRIM_LOG("xfmem iwrite: 0x%x-0x%x\n", address, address+size);

for (int i = 0; i < size; i++)
xfmem[address + i] = Memory_Read_U32(arraybases[array] + arraystrides[array] * index + i * 4);
xfmem[address + i] = Memory::Read_U32(arraybases[array] + arraystrides[array] * index + i * 4);
}
14 changes: 7 additions & 7 deletions Source/Core/VideoCommon/VideoCommon.vcxproj
Expand Up @@ -127,7 +127,7 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\Common\Src;..\..\PluginSpecs;..\..\..\Externals\SOIL;..\..\..\Externals\CLRun\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\Common\Src;..\Core\Src;..\..\PluginSpecs;..\..\..\Externals\SOIL;..\..\..\Externals\CLRun\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
Expand All @@ -142,7 +142,7 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\Common\Src;..\..\PluginSpecs;..\..\..\Externals\SOIL;..\..\..\Externals\CLRun\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\Common\Src;..\Core\Src;..\..\PluginSpecs;..\..\..\Externals\SOIL;..\..\..\Externals\CLRun\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
Expand All @@ -159,7 +159,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\Common\Src;..\..\PluginSpecs;..\..\..\Externals\SOIL;..\..\..\Externals\CLRun\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\Common\Src;..\Core\Src;..\..\PluginSpecs;..\..\..\Externals\SOIL;..\..\..\Externals\CLRun\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
Expand All @@ -178,7 +178,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\Common\Src;..\..\PluginSpecs;..\..\..\Externals\SOIL;..\..\..\Externals\CLRun\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\Common\Src;..\Core\Src;..\..\PluginSpecs;..\..\..\Externals\SOIL;..\..\..\Externals\CLRun\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DEBUGFAST;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
Expand All @@ -197,7 +197,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\Common\Src;..\..\PluginSpecs;..\..\..\Externals\SOIL;..\..\..\Externals\CLRun\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\Common\Src;..\Core\Src;..\..\PluginSpecs;..\..\..\Externals\SOIL;..\..\..\Externals\CLRun\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
Expand All @@ -216,7 +216,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\Common\Src;..\..\PluginSpecs;..\..\..\Externals\SOIL;..\..\..\Externals\CLRun\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\Common\Src;..\Core\Src;..\..\PluginSpecs;..\..\..\Externals\SOIL;..\..\..\Externals\CLRun\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DEBUGFAST;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
Expand Down Expand Up @@ -350,4 +350,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
5 changes: 2 additions & 3 deletions Source/Core/VideoUICommon/Src/DebuggerPanel.cpp
Expand Up @@ -19,15 +19,14 @@
#include "IniFile.h"
#include "DebuggerPanel.h"
#include "FileUtil.h"
#include "../../Core/Src/ConfigManager.h"

#include "VideoConfig.h"
#include "TextureCacheBase.h"
#include "PixelShaderGen.h"
#include "VertexShaderGen.h"
#include "NativeVertexFormat.h"

extern PLUGIN_GLOBALS* globals;

BEGIN_EVENT_TABLE(GFXDebuggerPanel, wxPanel)
EVT_CLOSE(GFXDebuggerPanel::OnClose)
EVT_BUTTON(ID_PAUSE,GFXDebuggerPanel::OnPauseButton)
Expand Down Expand Up @@ -249,7 +248,7 @@ void GFXDebuggerPanel::OnPauseAtNextFrameButton(wxCommandEvent& event)
void GFXDebuggerPanel::OnDumpButton(wxCommandEvent& event)
{
char dump_path[MAX_PATH];
sprintf(dump_path, "%sDebug/%s/", File::GetUserPath(D_DUMP_IDX), globals->unique_id);
sprintf(dump_path, "%sDebug/%s/", File::GetUserPath(D_DUMP_IDX), SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID.c_str());
if (!File::CreateFullPath(dump_path))
return;

Expand Down
15 changes: 9 additions & 6 deletions Source/Dolphin.sln
Expand Up @@ -14,7 +14,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Core", "Core\Core\Core.vcpr
{B7F1A9FB-BEA8-416E-9460-AE35A6A5165C} = {B7F1A9FB-BEA8-416E-9460-AE35A6A5165C}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_VideoDX9", "Plugins\Plugin_VideoDX9\Plugin_VideoDX9.vcproj", "{636FAD5F-02D1-4E9A-BE67-FB8EA99B9A18}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VideoDX9", "Plugins\Plugin_VideoDX9\Plugin_VideoDX9.vcproj", "{636FAD5F-02D1-4E9A-BE67-FB8EA99B9A18}"
ProjectSection(ProjectDependencies) = postProject
{11F55366-12EC-4C44-A8CB-1D4E315D61ED} = {11F55366-12EC-4C44-A8CB-1D4E315D61ED}
{56C4B06E-F2C9-4729-A15A-DD327A9AA465} = {56C4B06E-F2C9-4729-A15A-DD327A9AA465}
Expand Down Expand Up @@ -42,7 +42,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DiscIO", "Core\DiscIO\DiscI
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_VideoOGL", "Plugins\Plugin_VideoOGL\Plugin_VideoOGL.vcproj", "{CFDCEE0E-FA45-4F72-9FCC-0B88F5A75160}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VideoOGL", "Plugins\Plugin_VideoOGL\Plugin_VideoOGL.vcproj", "{CFDCEE0E-FA45-4F72-9FCC-0B88F5A75160}"
ProjectSection(ProjectDependencies) = postProject
{C7E5D50A-2916-464B-86A7-E10B3CC88ADA} = {C7E5D50A-2916-464B-86A7-E10B3CC88ADA}
{05C75041-D67D-4903-A362-8395A7B35C75} = {05C75041-D67D-4903-A362-8395A7B35C75}
Expand All @@ -63,9 +63,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "Core\Common\Commo
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dolphin", "Core\DolphinWX\DolphinWX.vcproj", "{A72606EF-C5C1-4954-90AD-F0F93A8D97D9}"
ProjectSection(ProjectDependencies) = postProject
{21DBE606-2958-43AC-A14E-B6B798D56554} = {21DBE606-2958-43AC-A14E-B6B798D56554}
{C7E5D50A-2916-464B-86A7-E10B3CC88ADA} = {C7E5D50A-2916-464B-86A7-E10B3CC88ADA}
{CFDCEE0E-FA45-4F72-9FCC-0B88F5A75160} = {CFDCEE0E-FA45-4F72-9FCC-0B88F5A75160}
{D4833C30-FA5F-4DFE-BD32-109DE1F09ED1} = {D4833C30-FA5F-4DFE-BD32-109DE1F09ED1}
{05C75041-D67D-4903-A362-8395A7B35C75} = {05C75041-D67D-4903-A362-8395A7B35C75}
{636FAD5F-02D1-4E9A-BE67-FB8EA99B9A18} = {636FAD5F-02D1-4E9A-BE67-FB8EA99B9A18}
{33546D62-7F34-4EA6-A88E-D538B36E16BF} = {33546D62-7F34-4EA6-A88E-D538B36E16BF}
{11F55366-12EC-4C44-A8CB-1D4E315D61ED} = {11F55366-12EC-4C44-A8CB-1D4E315D61ED}
{FBAFB369-07EB-4460-9CAD-08BE5789DAB6} = {FBAFB369-07EB-4460-9CAD-08BE5789DAB6}
Expand Down Expand Up @@ -182,7 +185,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxCore28", "..\Externals\wx
{B807E8DB-4241-4754-BC2A-2F435BCA881A} = {B807E8DB-4241-4754-BC2A-2F435BCA881A}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_VideoSoftware", "Plugins\Plugin_VideoSoftware\Plugin_VideoSoftware.vcproj", "{66A4E7BD-E2E8-4373-9B75-8750EB5AE683}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VideoSoftware", "Plugins\Plugin_VideoSoftware\Plugin_VideoSoftware.vcproj", "{66A4E7BD-E2E8-4373-9B75-8750EB5AE683}"
ProjectSection(ProjectDependencies) = postProject
{11F55366-12EC-4C44-A8CB-1D4E315D61ED} = {11F55366-12EC-4C44-A8CB-1D4E315D61ED}
{E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA} = {E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}
Expand All @@ -191,7 +194,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_VideoSoftware", "Plu
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_VideoDX11", "Plugins\Plugin_VideoDX11\Plugin_VideoDX11.vcproj", "{21DBE606-2958-43AC-A14E-B6B798D56554}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VideoDX11", "Plugins\Plugin_VideoDX11\Plugin_VideoDX11.vcproj", "{21DBE606-2958-43AC-A14E-B6B798D56554}"
ProjectSection(ProjectDependencies) = postProject
{11F55366-12EC-4C44-A8CB-1D4E315D61ED} = {11F55366-12EC-4C44-A8CB-1D4E315D61ED}
{56C4B06E-F2C9-4729-A15A-DD327A9AA465} = {56C4B06E-F2C9-4729-A15A-DD327A9AA465}
Expand Down Expand Up @@ -582,9 +585,9 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
AMDCaProjectFile = G:\Dolphin\Source\CodeAnalyst\Dolphin.caw
AMDCaPersistentStartup = Dolphin
AMDCaPersistentConfig = Release|x64
AMDCaPersistentStartup = Dolphin
AMDCaProjectFile = G:\Dolphin\Source\CodeAnalyst\Dolphin.caw
EndGlobalSection
GlobalSection(DPCodeReviewSolutionGUID) = preSolution
DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}
Expand Down
42 changes: 1 addition & 41 deletions Source/Dolphin_2010.sln
Expand Up @@ -91,7 +91,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DiscIO", "Core\DiscIO\DiscI
{C87A4178-44F6-49B2-B7AA-C79AF1B8C534} = {C87A4178-44F6-49B2-B7AA-C79AF1B8C534}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_VideoDX9", "Plugins\Plugin_VideoDX9\Plugin_VideoDX9.vcxproj", "{DC7D7AF4-CE47-49E8-8B63-265CB6233A49}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VideoDX9", "Plugins\Plugin_VideoDX9\Plugin_VideoDX9.vcxproj", "{DC7D7AF4-CE47-49E8-8B63-265CB6233A49}"
ProjectSection(ProjectDependencies) = postProject
{281F6001-D032-4C3B-87AF-0B00962B4006} = {281F6001-D032-4C3B-87AF-0B00962B4006}
{3E5C4E02-1BA9-4776-BDBE-E3F91FFA34CF} = {3E5C4E02-1BA9-4776-BDBE-E3F91FFA34CF}
Expand All @@ -118,24 +118,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_VideoSoftware", "Plu
{3E5C4E02-1BA9-4776-BDBE-E3F91FFA34CF} = {3E5C4E02-1BA9-4776-BDBE-E3F91FFA34CF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_DSP_HLE", "Plugins\Plugin_DSP_HLE\Plugin_DSP_HLE.vcxproj", "{27980B4B-F26C-41E8-9C44-A3D4F259D6E7}"
ProjectSection(ProjectDependencies) = postProject
{11F55366-12EC-4C44-A8CB-1D4E315D61ED} = {11F55366-12EC-4C44-A8CB-1D4E315D61ED}
{0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E} = {0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E}
{37D007BD-D66C-4EAF-B56C-BD1AAC340A05} = {37D007BD-D66C-4EAF-B56C-BD1AAC340A05}
{1C8436C9-DBAF-42BE-83BC-CF3EC9175ABE} = {1C8436C9-DBAF-42BE-83BC-CF3EC9175ABE}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_DSP_LLE", "Plugins\Plugin_DSP_LLE\Plugin_DSP_LLE.vcxproj", "{14BF7DCF-8078-4FB4-B1E8-CDAC61271DFC}"
ProjectSection(ProjectDependencies) = postProject
{C5A30052-1FC7-4A30-B4A2-6B06DA298AB3} = {C5A30052-1FC7-4A30-B4A2-6B06DA298AB3}
{11F55366-12EC-4C44-A8CB-1D4E315D61ED} = {11F55366-12EC-4C44-A8CB-1D4E315D61ED}
{0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E} = {0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E}
{37D007BD-D66C-4EAF-B56C-BD1AAC340A05} = {37D007BD-D66C-4EAF-B56C-BD1AAC340A05}
{4ED3C8BE-91A7-4361-8D46-16D03B678D4C} = {4ED3C8BE-91A7-4361-8D46-16D03B678D4C}
{1C8436C9-DBAF-42BE-83BC-CF3EC9175ABE} = {1C8436C9-DBAF-42BE-83BC-CF3EC9175ABE}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InputCommon", "Core\InputCommon\InputCommon.vcxproj", "{B39AC394-5DB5-4DA9-9D98-09D46CA3701F}"
ProjectSection(ProjectDependencies) = postProject
{C87A4178-44F6-49B2-B7AA-C79AF1B8C534} = {C87A4178-44F6-49B2-B7AA-C79AF1B8C534}
Expand Down Expand Up @@ -456,28 +438,6 @@ Global
{9E9DA440-E9AD-413C-B648-91030E792211}.Release|Win32.Build.0 = Release|Win32
{9E9DA440-E9AD-413C-B648-91030E792211}.Release|x64.ActiveCfg = Release|x64
{9E9DA440-E9AD-413C-B648-91030E792211}.Release|x64.Build.0 = Release|x64
{27980B4B-F26C-41E8-9C44-A3D4F259D6E7}.Debug|Win32.ActiveCfg = Debug|Win32
{27980B4B-F26C-41E8-9C44-A3D4F259D6E7}.Debug|Win32.Build.0 = Debug|Win32
{27980B4B-F26C-41E8-9C44-A3D4F259D6E7}.Debug|x64.ActiveCfg = Debug|Win32
{27980B4B-F26C-41E8-9C44-A3D4F259D6E7}.DebugFast|Win32.ActiveCfg = Release|Win32
{27980B4B-F26C-41E8-9C44-A3D4F259D6E7}.DebugFast|Win32.Build.0 = Release|Win32
{27980B4B-F26C-41E8-9C44-A3D4F259D6E7}.DebugFast|x64.ActiveCfg = DebugFast|x64
{27980B4B-F26C-41E8-9C44-A3D4F259D6E7}.DebugFast|x64.Build.0 = DebugFast|x64
{27980B4B-F26C-41E8-9C44-A3D4F259D6E7}.Release|Win32.ActiveCfg = Release|Win32
{27980B4B-F26C-41E8-9C44-A3D4F259D6E7}.Release|Win32.Build.0 = Release|Win32
{27980B4B-F26C-41E8-9C44-A3D4F259D6E7}.Release|x64.ActiveCfg = Release|x64
{27980B4B-F26C-41E8-9C44-A3D4F259D6E7}.Release|x64.Build.0 = Release|x64
{14BF7DCF-8078-4FB4-B1E8-CDAC61271DFC}.Debug|Win32.ActiveCfg = Debug|Win32
{14BF7DCF-8078-4FB4-B1E8-CDAC61271DFC}.Debug|Win32.Build.0 = Debug|Win32
{14BF7DCF-8078-4FB4-B1E8-CDAC61271DFC}.Debug|x64.ActiveCfg = Debug|Win32
{14BF7DCF-8078-4FB4-B1E8-CDAC61271DFC}.DebugFast|Win32.ActiveCfg = Release|Win32
{14BF7DCF-8078-4FB4-B1E8-CDAC61271DFC}.DebugFast|Win32.Build.0 = Release|Win32
{14BF7DCF-8078-4FB4-B1E8-CDAC61271DFC}.DebugFast|x64.ActiveCfg = DebugFast|x64
{14BF7DCF-8078-4FB4-B1E8-CDAC61271DFC}.DebugFast|x64.Build.0 = DebugFast|x64
{14BF7DCF-8078-4FB4-B1E8-CDAC61271DFC}.Release|Win32.ActiveCfg = Release|Win32
{14BF7DCF-8078-4FB4-B1E8-CDAC61271DFC}.Release|Win32.Build.0 = Release|Win32
{14BF7DCF-8078-4FB4-B1E8-CDAC61271DFC}.Release|x64.ActiveCfg = Release|x64
{14BF7DCF-8078-4FB4-B1E8-CDAC61271DFC}.Release|x64.Build.0 = Release|x64
{B39AC394-5DB5-4DA9-9D98-09D46CA3701F}.Debug|Win32.ActiveCfg = Debug|Win32
{B39AC394-5DB5-4DA9-9D98-09D46CA3701F}.Debug|Win32.Build.0 = Debug|Win32
{B39AC394-5DB5-4DA9-9D98-09D46CA3701F}.Debug|x64.ActiveCfg = Debug|x64
Expand Down
6 changes: 0 additions & 6 deletions Source/PluginSpecs/ExportEpilog.h

This file was deleted.

15 changes: 0 additions & 15 deletions Source/PluginSpecs/ExportProlog.h

This file was deleted.

134 changes: 14 additions & 120 deletions Source/PluginSpecs/PluginSpecs.h
Expand Up @@ -9,7 +9,8 @@
// ------------
// TODO: See if we can get rid of the windows.h include.
#ifdef _WIN32
#include <windows.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
#include "Common.h"
#include "CommonTypes.h"
Expand All @@ -31,135 +32,28 @@ enum PLUGIN_COMM
// System specific declarations and definitions
// ------------

#ifdef _WIN32
#define EXPORT __declspec(dllexport)
#define CALL __cdecl
#else
#define EXPORT __attribute__ ((visibility("default")))
#define __cdecl
#define CALL
#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif
#endif

#if defined(__cplusplus)
extern "C" {
// TODO: get rid of this i think
#if !defined(_WIN32) && !defined(TRUE)
#define TRUE 1
#define FALSE 0
#endif



// Global values
// ------------

// Plugin types
enum PLUGIN_TYPE {
PLUGIN_TYPE_VIDEO = 1,
};

#define STATE_MODE_READ 1
#define STATE_MODE_WRITE 2
#define STATE_MODE_MEASURE 3
//enum STATE_MODE
//{
// STATE_MODE_READ = 1,
// STATE_MODE_WRITE,
// STATE_MODE_MEASURE,
//};

// used for notification on emulation state
enum PLUGIN_EMUSTATE {
enum PLUGIN_EMUSTATE
{
PLUGIN_EMUSTATE_PLAY = 1,
PLUGIN_EMUSTATE_PAUSE,
PLUGIN_EMUSTATE_STOP,
};

// Export structs
// ------------
typedef struct
{
u16 Version; // Set to 0x0100
PLUGIN_TYPE Type; // Set to PLUGIN_TYPE_DVD
char Name[100]; // Name of the DLL
} PLUGIN_INFO;

// TODO: Remove, or at least remove the void pointers and replace with data.
// This design is just wrong and ugly - the plugins shouldn't have this much access.
typedef struct
{
void *was_eventHandler_but_lets_not_break_abi;
void *logManager;
char game_ini[MAX_PATH];
char unique_id[16];
} PLUGIN_GLOBALS;

// GLOBAL I N T E R F A C E
// ____________________________________________________________________________
// Function: GetDllInfo
// Purpose: This function allows the emulator to gather information
// about the DLL by filling in the PluginInfo structure.
// input: A pointer to a PLUGIN_INFO structure that needs to be
// filled by the function. (see def above)
// output: none
//
EXPORT void CALL GetDllInfo(PLUGIN_INFO* _pPluginInfo);

// ___________________________________________________________________________
// Function: DllConfig
// Purpose: This function is optional function that is provided
// to allow the user to configure the DLL
// input: A handle to the window that calls this function
// output: none
//
EXPORT void CALL DllConfig(void *_hParent);

// ___________________________________________________________________________
// Function: DllDebugger
// Purpose: Open the debugger
// input: a handle to the window that calls this function
// output: none
//
EXPORT void* CALL DllDebugger(void *_hParent, bool Show);

// ___________________________________________________________________________
// Function: DllSetGlobals
// Purpose: Set the pointer for globals variables
// input: a pointer to the global struct
// output: none
//
EXPORT void CALL SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals);

// ___________________________________________________________________________
// Function: Initialize
// Purpose: Initialize the plugin
// input: Init
// output: none
//
EXPORT void CALL Initialize(void *init);

// ___________________________________________________________________________
// Function: Shutdown
// Purpose: This function is called when the emulator is shutting down
// a game allowing the dll to de-initialise.
// input: none
// output: none
//
EXPORT void CALL Shutdown(void);

// ___________________________________________________________________________
// Function: DoState
// Purpose: Saves/load state
// input/output: ptr
// input: mode
//
EXPORT void CALL DoState(unsigned char **ptr, int mode);

// ___________________________________________________________________________
// Function: EmuStateChange
// Purpose: Notifies the plugin of a change in emulation state
// input: newState
// output: none
//
EXPORT void CALL EmuStateChange(PLUGIN_EMUSTATE newState);


#if defined(__cplusplus)
}
#endif

#endif // _PLUGINS_H_INCLUDED__
208 changes: 0 additions & 208 deletions Source/PluginSpecs/pluginspecs_video.h

This file was deleted.

149 changes: 19 additions & 130 deletions Source/Plugins/Plugin_VideoDX11/Plugin_VideoDX11.vcproj
Expand Up @@ -2,7 +2,7 @@
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="Plugin_VideoDX11"
Name="VideoDX11"
ProjectGUID="{21DBE606-2958-43AC-A14E-B6B798D56554}"
RootNamespace="Plugin_VideoDX11"
TargetFrameworkVersion="196613"
Expand All @@ -22,7 +22,7 @@
Name="Release|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
Expand Down Expand Up @@ -58,7 +58,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="false"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/Core/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="_WIN32;WIN32;NDEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX11_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
StringPooling="true"
RuntimeLibrary="0"
Expand Down Expand Up @@ -89,26 +89,11 @@
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="&quot;..\..\core\common\win32\release\common.lib&quot;"
AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib dxguid.lib winmm.lib vfw32.lib wxbase28u.lib wxmsw28u_core.lib"
OutputFile="..\..\..\Binary\Win32\Plugins\Plugin_VideoDX11.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="../../../Externals/Cg;&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;"
GenerateManifest="false"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\$(TargetName).pdb"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary="$(PlatformName)\$(ConfigurationName)\$(TargetName).lib"
TargetMachine="1"
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
Expand All @@ -118,9 +103,6 @@
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
Expand All @@ -129,7 +111,7 @@
Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
Expand Down Expand Up @@ -166,7 +148,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="false"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/Core/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX11_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
StringPooling="true"
ExceptionHandling="1"
Expand Down Expand Up @@ -198,27 +180,11 @@
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib dxguid.lib winmm.lib vfw32.lib wxbase28u.lib wxmsw28u_core.lib"
OutputFile="..\..\..\Binary\x64\Plugins\Plugin_VideoDX11.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\Externals\Cg64;&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;"
GenerateManifest="false"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\$(TargetName).pdb"
SubSystem="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary="$(PlatformName)\$(ConfigurationName)\$(TargetName).lib"
TargetMachine="17"
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
Expand All @@ -228,9 +194,6 @@
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
Expand All @@ -239,7 +202,7 @@
Name="Debug|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
Expand Down Expand Up @@ -269,7 +232,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/Core/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="_WIN32;WIN32;_DEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX11_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
Expand All @@ -295,27 +258,11 @@
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="&quot;..\..\core\common\win32\debug\common.lib&quot;"
AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib uuid.lib dxguid.lib Rpcrt4.lib winmm.lib vfw32.lib wxbase28ud.lib wxmsw28ud_core.lib"
OutputFile="..\..\..\Binary\Win32/Plugins\Plugin_VideoDX11D.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="../../../Externals/Cg;&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;"
GenerateManifest="false"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\$(TargetName).pdb"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary="$(PlatformName)\$(ConfigurationName)\$(TargetName).lib"
TargetMachine="1"
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
Expand All @@ -325,9 +272,6 @@
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
Expand All @@ -336,7 +280,7 @@
Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
Expand Down Expand Up @@ -366,7 +310,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/Core/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX11_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
Expand All @@ -392,26 +336,11 @@
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib uuid.lib dxguid.lib Rpcrt4.lib winmm.lib vfw32.lib"
OutputFile="..\..\..\Binary\x64\Plugins\Plugin_VideoDX11D.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\Externals\Cg64;&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;"
GenerateManifest="false"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\$(TargetName).pdb"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary="$(PlatformName)\$(ConfigurationName)\$(TargetName).lib"
TargetMachine="17"
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
Expand All @@ -421,9 +350,6 @@
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
Expand All @@ -432,7 +358,7 @@
Name="DebugFast|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
Expand Down Expand Up @@ -468,7 +394,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="false"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/Core/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="_WIN32;WIN32;NDEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX11_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;DEBUGFAST"
StringPooling="true"
RuntimeLibrary="0"
Expand Down Expand Up @@ -498,27 +424,11 @@
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib uuid.lib dxguid.lib Rpcrt4.lib winmm.lib vfw32.lib"
OutputFile="..\..\..\Binary\Win32\Plugins\Plugin_VideoDX11DF.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="../../../Externals/Cg;&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;"
GenerateManifest="false"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\$(TargetName).pdb"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary="$(PlatformName)\$(ConfigurationName)\$(TargetName).lib"
TargetMachine="1"
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
Expand All @@ -528,9 +438,6 @@
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
Expand All @@ -539,7 +446,7 @@
Name="DebugFast|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
Expand Down Expand Up @@ -576,7 +483,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="false"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/Core/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX11_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;;DEBUGFAST"
StringPooling="true"
ExceptionHandling="1"
Expand Down Expand Up @@ -607,26 +514,11 @@
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib uuid.lib dxguid.lib Rpcrt4.lib winmm.lib vfw32.lib"
OutputFile="..\..\..\Binary\x64\Plugins\Plugin_VideoDX11DF.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\Externals\Cg64;&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;"
GenerateManifest="false"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\$(TargetName).pdb"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary="$(PlatformName)\$(ConfigurationName)\$(TargetName).lib"
TargetMachine="17"
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
Expand All @@ -636,9 +528,6 @@
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
Expand Down
22 changes: 12 additions & 10 deletions Source/Plugins/Plugin_VideoDX11/Plugin_VideoDX11.vcxproj
Expand Up @@ -29,38 +29,39 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{9A4C733C-BADE-4AC6-B58A-6E274395E90E}</ProjectGuid>
<RootNamespace>Plugin_VideoDX11</RootNamespace>
<ProjectName>VideoDX11</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugFast|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugFast|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
Expand Down Expand Up @@ -131,7 +132,7 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\Core\Common\Src;..\..\PluginSpecs;..\..\Core\VideoCommon\Src;..\..\Core\VideoUICommon\Src;..\..\..\Externals\wxWidgets\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\Core\Common\Src;..\..\Core\Core\Src;..\..\PluginSpecs;..\..\Core\VideoCommon\Src;..\..\Core\VideoUICommon\Src;..\..\..\Externals\wxWidgets\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<ForcedIncludeFiles>stdafx.h</ForcedIncludeFiles>
Expand All @@ -147,7 +148,7 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\Core\Common\Src;..\..\PluginSpecs;..\..\Core\VideoCommon\Src;..\..\Core\VideoUICommon\Src;..\..\..\Externals\wxWidgets\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\Core\Common\Src;..\..\Core\Core\Src;..\..\PluginSpecs;..\..\Core\VideoCommon\Src;..\..\Core\VideoUICommon\Src;..\..\..\Externals\wxWidgets\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<ForcedIncludeFiles>stdafx.h</ForcedIncludeFiles>
Expand All @@ -165,7 +166,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\Core\Common\Src;..\..\PluginSpecs;..\..\Core\VideoCommon\Src;..\..\Core\VideoUICommon\Src;..\..\..\Externals\wxWidgets\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\Core\Common\Src;..\..\Core\Core\Src;..\..\PluginSpecs;..\..\Core\VideoCommon\Src;..\..\Core\VideoUICommon\Src;..\..\..\Externals\wxWidgets\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<ForcedIncludeFiles>stdafx.h</ForcedIncludeFiles>
Expand Down Expand Up @@ -205,7 +206,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\Core\Common\Src;..\..\PluginSpecs;..\..\Core\VideoCommon\Src;..\..\Core\VideoUICommon\Src;..\..\..\Externals\wxWidgets\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\Core\Common\Src;..\..\Core\Core\Src;..\..\PluginSpecs;..\..\Core\VideoCommon\Src;..\..\Core\VideoUICommon\Src;..\..\..\Externals\wxWidgets\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<ForcedIncludeFiles>stdafx.h</ForcedIncludeFiles>
Expand Down Expand Up @@ -287,6 +288,7 @@
<ClInclude Include="Src\TextureCache.h" />
<ClInclude Include="Src\VertexManager.h" />
<ClInclude Include="Src\VertexShaderCache.h" />
<ClInclude Include="Src\VideoBackend.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
Expand Down
4 changes: 0 additions & 4 deletions Source/Plugins/Plugin_VideoDX11/Src/Globals.h
Expand Up @@ -23,9 +23,5 @@
#include "main.h"

#include "VideoCommon.h"
#include "pluginspecs_video.h"

// A global plugin specification
extern PLUGIN_GLOBALS* globals;

#endif // _GLOBALS_H_
10 changes: 5 additions & 5 deletions Source/Plugins/Plugin_VideoDX11/Src/NativeVertexFormat.cpp
Expand Up @@ -22,6 +22,9 @@
#include "VertexManager.h"
#include "VertexShaderCache.h"

namespace DX11
{

class D3DVertexFormat : public NativeVertexFormat
{
D3D11_INPUT_ELEMENT_DESC m_elems[32];
Expand All @@ -38,16 +41,11 @@ class D3DVertexFormat : public NativeVertexFormat
void SetupVertexPointers();
};

namespace DX11
{

NativeVertexFormat* VertexManager::CreateNativeVertexFormat()
{
return new D3DVertexFormat();
}

}

DXGI_FORMAT VarToD3D(VarType t, int size)
{
DXGI_FORMAT retval = DXGI_FORMAT_UNKNOWN;
Expand Down Expand Up @@ -155,3 +153,5 @@ void D3DVertexFormat::SetupVertexPointers()
}
DX11::D3D::context->IASetInputLayout(m_layout);
}

} // namespace DX11
16 changes: 8 additions & 8 deletions Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.cpp
Expand Up @@ -28,6 +28,8 @@
#include "PixelShaderGen.h"
#include "PixelShaderCache.h"

#include "ConfigManager.h"

extern int frameCount;

// See comment near the bottom of this file.
Expand All @@ -37,7 +39,6 @@ bool pscbufchanged = true;
namespace DX11
{


PixelShaderCache::PSCache PixelShaderCache::PixelShaders;
const PixelShaderCache::PSCacheEntry* PixelShaderCache::last_entry;

Expand Down Expand Up @@ -271,7 +272,7 @@ void PixelShaderCache::Init()
SETSTAT(stats.numPixelShadersAlive, 0);

char cache_filename[MAX_PATH];
sprintf(cache_filename, "%sdx11-%s-ps.cache", File::GetUserPath(D_SHADERCACHE_IDX), globals->unique_id);
sprintf(cache_filename, "%sdx11-%s-ps.cache", File::GetUserPath(D_SHADERCACHE_IDX), SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID.c_str());
PixelShaderCacheInserter inserter;
g_ps_disk_cache.OpenAndRead(cache_filename, inserter);
}
Expand Down Expand Up @@ -386,9 +387,6 @@ bool PixelShaderCache::InsertByteCode(const PIXELSHADERUID &uid, const void* byt
return true;
}

} // DX11


// These are "callbacks" from VideoCommon and thus must be outside namespace DX11.
// This will have to be changed when we merge.

Expand All @@ -414,7 +412,7 @@ static const unsigned int ps_constant_offset_table[] = {
260, 264, 268, 272, 276, // C_PLIGHTS7, 20
280, 284, 288, 292 // C_PMATERIALS, 16
};
void SetPSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4)
void Renderer::SetPSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4)
{
psconstants[ps_constant_offset_table[const_number] ] = f1;
psconstants[ps_constant_offset_table[const_number]+1] = f2;
Expand All @@ -423,14 +421,16 @@ void SetPSConstant4f(unsigned int const_number, float f1, float f2, float f3, fl
pscbufchanged = true;
}

void SetPSConstant4fv(unsigned int const_number, const float* f)
void Renderer::SetPSConstant4fv(unsigned int const_number, const float* f)
{
memcpy(&psconstants[ps_constant_offset_table[const_number]], f, sizeof(float)*4);
pscbufchanged = true;
}

void SetMultiPSConstant4fv(unsigned int const_number, unsigned int count, const float* f)
void Renderer::SetMultiPSConstant4fv(unsigned int const_number, unsigned int count, const float* f)
{
memcpy(&psconstants[ps_constant_offset_table[const_number]], f, sizeof(float)*4*count);
pscbufchanged = true;
}

} // DX11
5 changes: 3 additions & 2 deletions Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.h
Expand Up @@ -24,7 +24,8 @@
class PIXELSHADERUID;
enum DSTALPHA_MODE;

namespace DX11 {
namespace DX11
{

class PixelShaderCache
{
Expand Down Expand Up @@ -61,4 +62,4 @@ class PixelShaderCache
static const PSCacheEntry* last_entry;
};

} // namespace DX11
} // namespace DX11
12 changes: 6 additions & 6 deletions Source/Plugins/Plugin_VideoDX11/Src/Render.cpp
Expand Up @@ -38,7 +38,7 @@
#include "Render.h"
#include "TextureCache.h"
#include "VertexShaderCache.h"

#include "Core.h"

namespace DX11
{
Expand Down Expand Up @@ -313,7 +313,7 @@ Renderer::Renderer()
int x, y, w_temp, h_temp;
s_blendMode = 0;

g_VideoInitialize.pGetWindowSize(x, y, w_temp, h_temp);
Core::Callback_VideoGetWindowSize(x, y, w_temp, h_temp);

D3D::Create(EmuWindow::GetWnd());

Expand Down Expand Up @@ -447,7 +447,7 @@ void Renderer::SetWindowSize(int width, int height)
// Scale the window size by the EFB scale.
CalculateTargetScale(width, height, width, height);

g_VideoInitialize.pRequestWindowSize(width, height);
Core::Callback_VideoRequestWindowSize(width, height);
}

bool Renderer::SetScissorRect()
Expand Down Expand Up @@ -897,7 +897,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
{
if (g_bSkipCurrentFrame || (!XFBWrited && (!g_ActiveConfig.bUseXFB || !g_ActiveConfig.bUseRealXFB)) || !fbWidth || !fbHeight)
{
g_VideoInitialize.pCopiedToXFB(false);
Core::Callback_VideoCopiedToXFB(false);
return;
}
// this function is called after the XFB field is changed, not after
Expand All @@ -909,7 +909,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
const XFBSourceBase* const* xfbSourceList = FramebufferManager::GetXFBSource(xfbAddr, fbWidth, fbHeight, xfbCount);
if ((!xfbSourceList || xfbCount == 0) && g_ActiveConfig.bUseXFB && !g_ActiveConfig.bUseRealXFB)
{
g_VideoInitialize.pCopiedToXFB(false);
Core::Callback_VideoCopiedToXFB(false);
return;
}

Expand Down Expand Up @@ -1120,7 +1120,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
UpdateViewport();
VertexShaderManager::SetViewportChanged();

g_VideoInitialize.pCopiedToXFB(XFBWrited || (g_ActiveConfig.bUseXFB && g_ActiveConfig.bUseRealXFB));
Core::Callback_VideoCopiedToXFB(XFBWrited || (g_ActiveConfig.bUseXFB && g_ActiveConfig.bUseRealXFB));
XFBWrited = false;
}

Expand Down
9 changes: 9 additions & 0 deletions Source/Plugins/Plugin_VideoDX11/Src/Render.h
Expand Up @@ -49,6 +49,15 @@ class Renderer : public ::Renderer

static bool CheckForResize();
static void SetWindowSize(int width, int height);

void SetPSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4);
void SetPSConstant4fv(unsigned int const_number, const float *f);
void SetMultiPSConstant4fv(unsigned int const_number, unsigned int count, const float *f);

void SetVSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4);
void SetVSConstant4fv(unsigned int const_number, const float *f);
void SetMultiVSConstant3fv(unsigned int const_number, unsigned int count, const float *f);
void SetMultiVSConstant4fv(unsigned int const_number, unsigned int count, const float *f);
};

}
Expand Down
18 changes: 10 additions & 8 deletions Source/Plugins/Plugin_VideoDX11/Src/VertexShaderCache.cpp
Expand Up @@ -26,6 +26,8 @@
#include "Globals.h"
#include "VertexShaderCache.h"

#include "ConfigManager.h"

// See comment near the bottom of this file
static unsigned int vs_constant_offset_table[C_VENVCONST_END];
float vsconstants[C_VENVCONST_END*4];
Expand Down Expand Up @@ -168,7 +170,7 @@ void VertexShaderCache::Init()
SETSTAT(stats.numVertexShadersAlive, 0);

char cache_filename[MAX_PATH];
sprintf(cache_filename, "%sdx11-%s-vs.cache", File::GetUserPath(D_SHADERCACHE_IDX), globals->unique_id);
sprintf(cache_filename, "%sdx11-%s-vs.cache", File::GetUserPath(D_SHADERCACHE_IDX), SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID.c_str());
VertexShaderCacheInserter inserter;
g_vs_disk_cache.OpenAndRead(cache_filename, inserter);
}
Expand Down Expand Up @@ -264,13 +266,11 @@ bool VertexShaderCache::InsertByteCode(const VERTEXSHADERUID &uid, D3DBlob* bcod
return true;
}

} // namespace DX11

// These are "callbacks" from VideoCommon and thus must be outside namespace DX11.
// This will have to be changed when we merge.

// maps the constant numbers to float indices in the constant buffer
void SetVSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4)
void Renderer::SetVSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4)
{
vsconstants[vs_constant_offset_table[const_number] ] = f1;
vsconstants[vs_constant_offset_table[const_number]+1] = f2;
Expand All @@ -279,13 +279,13 @@ void SetVSConstant4f(unsigned int const_number, float f1, float f2, float f3, fl
vscbufchanged = true;
}

void SetVSConstant4fv(unsigned int const_number, const float* f)
void Renderer::SetVSConstant4fv(unsigned int const_number, const float* f)
{
memcpy(&vsconstants[vs_constant_offset_table[const_number]], f, sizeof(float)*4);
vscbufchanged = true;
}

void SetMultiVSConstant3fv(unsigned int const_number, unsigned int count, const float* f)
void Renderer::SetMultiVSConstant3fv(unsigned int const_number, unsigned int count, const float* f)
{
for (unsigned int i = 0; i < count; i++)
{
Expand All @@ -295,8 +295,10 @@ void SetMultiVSConstant3fv(unsigned int const_number, unsigned int count, const
vscbufchanged = true;
}

void SetMultiVSConstant4fv(unsigned int const_number, unsigned int count, const float* f)
void Renderer::SetMultiVSConstant4fv(unsigned int const_number, unsigned int count, const float* f)
{
memcpy(&vsconstants[vs_constant_offset_table[const_number]], f, sizeof(float)*4*count);
vscbufchanged = true;
}
}

} // namespace DX11
27 changes: 27 additions & 0 deletions Source/Plugins/Plugin_VideoDX11/Src/VideoBackend.h
@@ -0,0 +1,27 @@

#ifndef DX11_VIDEO_BACKEND_H_
#define DX11_VIDEO_BACKEND_H_

#include "VideoBackendBase.h"

namespace DX11
{

class VideoBackend : public VideoBackendHLE
{
void Initialize();
void Shutdown();

std::string GetName();

void Video_Prepare();

void ShowConfig(void* parent);

void UpdateFPSDisplay(const char*);
unsigned int PeekMessages();
};

}

#endif
160 changes: 42 additions & 118 deletions Source/Plugins/Plugin_VideoDX11/Src/main.cpp
Expand Up @@ -30,6 +30,7 @@
#include "VertexLoaderManager.h"
#include "VertexShaderManager.h"
#include "XFBConvert.h"
#include "Core.h"

#include "DebuggerPanel.h"
#include "DLCache.h"
Expand All @@ -46,83 +47,18 @@
#include "VertexManager.h"
#include "VertexShaderCache.h"

#include "VideoBackend.h"
#include "ConfigManager.h"

HINSTANCE g_hInstance = NULL;

wxLocale *InitLanguageSupport()
namespace DX11
{
wxLocale *m_locale;
unsigned int language = 0;

IniFile ini;
ini.Load(File::GetUserPath(F_DOLPHINCONFIG_IDX));
ini.Get("Interface", "Language", &language, wxLANGUAGE_DEFAULT);

// Load language if possible, fall back to system default otherwise
if(wxLocale::IsAvailable(language))
{
m_locale = new wxLocale(language);

m_locale->AddCatalogLookupPathPrefix(wxT("Languages"));

m_locale->AddCatalog(wxT("dolphin-emu"));

if(!m_locale->IsOk())
{
PanicAlertT("Error loading selected language. Falling back to system default.");
delete m_locale;
m_locale = new wxLocale(wxLANGUAGE_DEFAULT);
}
}
else
{
PanicAlertT("The selected language is not supported by your system. Falling back to system default.");
m_locale = new wxLocale(wxLANGUAGE_DEFAULT);
}
return m_locale;
}

// This is used for the functions right below here which use wxwidgets
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);

void *DllDebugger(void *_hParent, bool Show)
void*& VideoWindowHandle()
{
return new GFXDebuggerPanel((wxWindow*)_hParent);
return SConfig::GetInstance().m_LocalCoreStartupParameter.hMainWindow;
}

class wxDLLApp : public wxApp
{
bool OnInit()
{
return true;
}
};
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);

BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
{
static wxLocale *m_locale;
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
{
wxSetInstance((HINSTANCE)hinstDLL);
wxInitialize();
m_locale = InitLanguageSupport();
}
break;
case DLL_PROCESS_DETACH:
wxUninitialize();
delete m_locale;
break;
}

g_hInstance = hinstDLL;
return TRUE;
}

unsigned int Callback_PeekMessages()
unsigned int VideoBackend::PeekMessages()
{
MSG msg;
while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
Expand All @@ -135,31 +71,29 @@ unsigned int Callback_PeekMessages()
return TRUE;
}


void UpdateFPSDisplay(const char *text)
void VideoBackend::UpdateFPSDisplay(const char *text)
{
char temp[512];
sprintf_s(temp, sizeof temp, "%s | DX11 | %s", svn_rev_str, text);
SetWindowTextA(EmuWindow::GetWnd(), temp);
}

void GetDllInfo(PLUGIN_INFO* _PluginInfo)
//void GetDllInfo(PLUGIN_INFO* _PluginInfo)
//{
// _PluginInfo->Version = 0x0100;
// //_PluginInfo->Type = PLUGIN_TYPE_VIDEO;
//#ifdef DEBUGFAST
// sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D11 (DebugFast)");
//#elif defined _DEBUG
// sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D11 (Debug)");
//#else
// sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D11");
//#endif
//}

std::string VideoBackend::GetName()
{
_PluginInfo->Version = 0x0100;
_PluginInfo->Type = PLUGIN_TYPE_VIDEO;
#ifdef DEBUGFAST
sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D11 (DebugFast)");
#elif defined _DEBUG
sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D11 (Debug)");
#else
sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D11");
#endif
}

void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
{
globals = _pPluginGlobals;
LogManager::SetInstance((LogManager*)globals->logManager);
return "Direct3D11";
}

void InitBackendInfo()
Expand All @@ -175,7 +109,7 @@ void InitBackendInfo()
g_Config.backend_info.bSupportsPixelLighting = true;
}

void DllConfig(void *_hParent)
void VideoBackend::ShowConfig(void *_hParent)
{
#if defined(HAVE_WX) && HAVE_WX
InitBackendInfo();
Expand Down Expand Up @@ -234,55 +168,43 @@ void DllConfig(void *_hParent)
#endif
}

void Initialize(void *init)
void VideoBackend::Initialize()
{
InitBackendInfo();

frameCount = 0;
SVideoInitialize *_pVideoInitialize = (SVideoInitialize*)init;
// Create a shortcut to _pVideoInitialize that can also update it
g_VideoInitialize = *(_pVideoInitialize);
InitXFBConvTables();

g_Config.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_dx11.ini").c_str());
g_Config.GameIniLoad(globals->game_ini);
g_Config.GameIniLoad(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strGameIni.c_str());
UpdateProjectionHack(g_Config.iPhackvalue, g_Config.sPhackvalue);
UpdateActiveConfig();

g_VideoInitialize.pWindowHandle = (void*)EmuWindow::Create((HWND)g_VideoInitialize.pWindowHandle, g_hInstance, _T("Loading - Please wait."));
if (g_VideoInitialize.pWindowHandle == NULL)
VideoWindowHandle() = (void*)EmuWindow::Create((HWND)VideoWindowHandle(), GetModuleHandle(0), _T("Loading - Please wait."));
if (VideoWindowHandle() == NULL)
{
ERROR_LOG(VIDEO, "An error has occurred while trying to create the window.");
return;
}

g_VideoInitialize.pPeekMessages = &Callback_PeekMessages;
g_VideoInitialize.pUpdateFPSDisplay = &UpdateFPSDisplay;

_pVideoInitialize->pPeekMessages = g_VideoInitialize.pPeekMessages;
_pVideoInitialize->pUpdateFPSDisplay = g_VideoInitialize.pUpdateFPSDisplay;

// Now the window handle is written
_pVideoInitialize->pWindowHandle = g_VideoInitialize.pWindowHandle;

OSD::AddMessage("Dolphin Direct3D11 Video Plugin.", 5000);
s_PluginInitialized = true;
}

void Video_Prepare()
void VideoBackend::Video_Prepare()
{
// Better be safe...
s_efbAccessRequested = FALSE;
s_FifoShuttingDown = FALSE;
s_swapRequested = FALSE;

// internal interfaces
g_renderer = new DX11::Renderer;
g_texture_cache = new DX11::TextureCache;
g_vertex_manager = new DX11::VertexManager;
DX11::VertexShaderCache::Init();
DX11::PixelShaderCache::Init();
DX11::D3D::InitUtils();
g_renderer = new Renderer;
g_texture_cache = new TextureCache;
g_vertex_manager = new VertexManager;
VertexShaderCache::Init();
PixelShaderCache::Init();
D3D::InitUtils();

// VideoCommon
BPInit();
Expand All @@ -296,10 +218,10 @@ void Video_Prepare()
DLCache::Init();

// Tell the host that the window is ready
g_VideoInitialize.pCoreMessage(WM_USER_CREATE);
Core::Callback_CoreMessage(WM_USER_CREATE);
}

void Shutdown()
void VideoBackend::Shutdown()
{
s_PluginInitialized = false;

Expand All @@ -317,13 +239,15 @@ void Shutdown()
VertexLoaderManager::Shutdown();

// internal interfaces
DX11::D3D::ShutdownUtils();
DX11::PixelShaderCache::Shutdown();
DX11::VertexShaderCache::Shutdown();
D3D::ShutdownUtils();
PixelShaderCache::Shutdown();
VertexShaderCache::Shutdown();
delete g_vertex_manager;
delete g_texture_cache;
delete g_renderer;
EmuWindow::Close();

s_PluginInitialized = false;
}

}
3 changes: 0 additions & 3 deletions Source/Plugins/Plugin_VideoDX11/Src/main.h
Expand Up @@ -18,10 +18,7 @@
#ifndef MAIN_H
#define MAIN_H

#include "PluginSpecs_Video.h"
#include "Render.h"
#include "MainBase.h"

extern SVideoInitialize g_VideoInitialize;

#endif
149 changes: 19 additions & 130 deletions Source/Plugins/Plugin_VideoDX9/Plugin_VideoDX9.vcproj
Expand Up @@ -2,7 +2,7 @@
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="Plugin_VideoDX9"
Name="VideoDX9"
ProjectGUID="{636FAD5F-02D1-4E9A-BE67-FB8EA99B9A18}"
RootNamespace="Plugin_VideoDX9"
TargetFrameworkVersion="131072"
Expand All @@ -22,7 +22,7 @@
Name="Release|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
Expand Down Expand Up @@ -58,7 +58,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="false"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/Core/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="_WIN32;WIN32;NDEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX9_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
StringPooling="true"
RuntimeLibrary="0"
Expand Down Expand Up @@ -91,26 +91,11 @@
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="&quot;..\..\core\common\win32\release\common.lib&quot;"
AdditionalDependencies="comctl32.lib winmm.lib vfw32.lib wxbase28u.lib wxmsw28u_core.lib"
OutputFile="..\..\..\Binary\Win32\Plugins\Plugin_VideoDX9.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="../../../Externals/Cg;&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;"
GenerateManifest="false"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\$(TargetName).pdb"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary="$(PlatformName)\$(ConfigurationName)\$(TargetName).lib"
TargetMachine="1"
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
Expand All @@ -120,9 +105,6 @@
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
Expand All @@ -131,7 +113,7 @@
Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
Expand Down Expand Up @@ -168,7 +150,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="false"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/Core/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX9_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
StringPooling="true"
ExceptionHandling="1"
Expand Down Expand Up @@ -202,27 +184,11 @@
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib winmm.lib vfw32.lib rpcrt4.lib wxbase28u.lib wxmsw28u_core.lib"
OutputFile="..\..\..\Binary\x64\Plugins\Plugin_VideoDX9.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\Externals\Cg64;&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;"
GenerateManifest="false"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\$(TargetName).pdb"
SubSystem="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary="$(PlatformName)\$(ConfigurationName)\$(TargetName).lib"
TargetMachine="17"
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
Expand All @@ -232,9 +198,6 @@
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
Expand All @@ -243,7 +206,7 @@
Name="Debug|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
Expand Down Expand Up @@ -273,7 +236,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/Core/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="_WIN32;WIN32;_DEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX9_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
Expand Down Expand Up @@ -301,27 +264,11 @@
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="&quot;..\..\core\common\win32\debug\common.lib&quot;"
AdditionalDependencies="comctl32.lib winmm.lib vfw32.lib rpcrt4.lib wxbase28ud.lib wxmsw28ud_core.lib"
OutputFile="..\..\..\Binary\Win32/Plugins\Plugin_VideoDX9D.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="../../../Externals/Cg;&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;"
GenerateManifest="false"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\$(TargetName).pdb"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary="$(PlatformName)\$(ConfigurationName)\$(TargetName).lib"
TargetMachine="1"
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
Expand All @@ -331,9 +278,6 @@
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
Expand All @@ -342,7 +286,7 @@
Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
Expand Down Expand Up @@ -372,7 +316,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/Core/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX9_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
Expand Down Expand Up @@ -400,26 +344,11 @@
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib winmm.lib vfw32.lib rpcrt4.lib wxbase28ud.lib wxmsw28ud_core.lib"
OutputFile="..\..\..\Binary\x64\Plugins\Plugin_VideoDX9D.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\Externals\Cg64;&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;"
GenerateManifest="false"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\$(TargetName).pdb"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary="$(PlatformName)\$(ConfigurationName)\$(TargetName).lib"
TargetMachine="17"
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
Expand All @@ -429,9 +358,6 @@
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
Expand All @@ -440,7 +366,7 @@
Name="DebugFast|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
Expand Down Expand Up @@ -476,7 +402,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="false"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/Core/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="_WIN32;WIN32;NDEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX9_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;DEBUGFAST"
StringPooling="true"
RuntimeLibrary="0"
Expand Down Expand Up @@ -508,27 +434,11 @@
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib winmm.lib vfw32.lib wxbase28u.lib wxmsw28u_core.lib"
OutputFile="..\..\..\Binary\Win32\Plugins\Plugin_VideoDX9DF.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="../../../Externals/Cg;&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;"
GenerateManifest="false"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\$(TargetName).pdb"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary="$(PlatformName)\$(ConfigurationName)\$(TargetName).lib"
TargetMachine="1"
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
Expand All @@ -538,9 +448,6 @@
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
Expand All @@ -549,7 +456,7 @@
Name="DebugFast|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
Expand Down Expand Up @@ -586,7 +493,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="false"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
AdditionalIncludeDirectories="../../../Externals;../../PluginSpecs;../../Core/Common/Src;../../Core/Core/Src;../../Core/VideoCommon/Src;../../Core/VideoUICommon/Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;VIDEO_DIRECTX9_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;;DEBUGFAST"
StringPooling="true"
ExceptionHandling="1"
Expand Down Expand Up @@ -619,26 +526,11 @@
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib winmm.lib vfw32.lib rpcrt4.lib wxbase28u.lib wxmsw28u_core.lib"
OutputFile="..\..\..\Binary\x64\Plugins\Plugin_VideoDX9DF.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\Externals\Cg64;&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;"
GenerateManifest="false"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\$(TargetName).pdb"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary="$(PlatformName)\$(ConfigurationName)\$(TargetName).lib"
TargetMachine="17"
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
Expand All @@ -648,9 +540,6 @@
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
Expand Down