From 1f1c9132a6bd69a94e6f4c280bd2e4cddb3dbf37 Mon Sep 17 00:00:00 2001 From: Rodolfo Osvaldo Bogado Date: Tue, 8 Feb 2011 14:51:53 +0000 Subject: [PATCH] revert some some of the soren changes to make dolphin compile in vs2008 again until sw plugin is completely fixed. some correction to dlist caching git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7117 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/VideoBackendBase.cpp | 7 +++++-- Source/Core/VideoCommon/Src/DLCache.cpp | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Source/Core/Common/Src/VideoBackendBase.cpp b/Source/Core/Common/Src/VideoBackendBase.cpp index 090875d89b..b1074fe2f5 100644 --- a/Source/Core/Common/Src/VideoBackendBase.cpp +++ b/Source/Core/Common/Src/VideoBackendBase.cpp @@ -23,8 +23,9 @@ #include "../../../Plugins/Plugin_VideoDX11/Src/VideoBackend.h" #endif #include "../../../Plugins/Plugin_VideoOGL/Src/VideoBackend.h" +#ifndef _WIN32 #include "../../../Plugins/Plugin_VideoSoftware/Src/VideoBackend.h" - +#endif std::vector g_available_video_backends; VideoBackend* g_video_backend = NULL; @@ -36,9 +37,11 @@ void VideoBackend::PopulateList() g_available_video_backends.push_back(new DX11::VideoBackend); #endif g_available_video_backends.push_back(new OGL::VideoBackend); +#ifndef _WIN32 g_available_video_backends.push_back(new SW::VideoBackend); - +#endif g_video_backend = g_available_video_backends.front(); + } void VideoBackend::ClearList() diff --git a/Source/Core/VideoCommon/Src/DLCache.cpp b/Source/Core/VideoCommon/Src/DLCache.cpp index 9f8df67951..d780045fb2 100644 --- a/Source/Core/VideoCommon/Src/DLCache.cpp +++ b/Source/Core/VideoCommon/Src/DLCache.cpp @@ -65,7 +65,7 @@ struct ReferencedDataRegion NextRegion(NULL), size(0), MustClean(0), - ReferencedArray(-1), + ReferencedArray(0xFFFFFFFF), ReferencedArrayStride(0) {} u64 hash; @@ -184,7 +184,10 @@ struct CachedDisplayList { if(Current->hash) { - if(cached_arraybases[Current->ReferencedArray] != Current->start_address || arraystrides[Current->ReferencedArray] != Current->ReferencedArrayStride) + //this test is here to grant that the referenced arrays by the dlist dont change + // in the current implementation is not necesary as the id of the dlist is calculated based on the arrays it refers + // but i let this test for extra safety + if(Current->ReferencedArray != 0xFFFFFFFF && (cached_arraybases[Current->ReferencedArray] != Current->start_address || arraystrides[Current->ReferencedArray] != Current->ReferencedArrayStride)) { return false; }