lets retry that change from omega but this time keep the projection hacks >_>
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2527 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
10e027b48b
commit
4cb7f2f490
|
@ -34,7 +34,7 @@
|
|||
it will not be used when we Start and Stop games. With these exceptions:
|
||||
1. Video plugin: If FreeLibrary() is not called between Stop and Start it will fail for
|
||||
several games on the next Start, but not for all games.
|
||||
2. Sond plugin: If FreeLibrary() is not called between Stop and Start I got the "Tried to
|
||||
2. Sound plugin: If FreeLibrary() is not called between Stop and Start I got the "Tried to
|
||||
"get pointer for unknown address ffffffff" message for all games I tried.
|
||||
|
||||
Currently this holds if the 'SETUP_FREE_PLUGIN_ON_BOOT' option is used
|
||||
|
@ -276,6 +276,10 @@ void CPluginManager::GetPluginInfo(CPluginInfo *&info, std::string Filename)
|
|||
if (m_PluginInfos.at(i).GetFilename() == Filename)
|
||||
{
|
||||
info = &m_PluginInfos.at(i);
|
||||
if (info == NULL)
|
||||
{
|
||||
PanicAlert("error reading info from dll");
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -291,12 +295,18 @@ void *CPluginManager::LoadPlugin(const char *_rFilename, int Number)
|
|||
/* Avoid calling LoadLibrary() again and instead point to the plugin info that we found when
|
||||
Dolphin was started */
|
||||
CPluginInfo *info = NULL;
|
||||
if (!Filename.empty()){
|
||||
GetPluginInfo(info, Filename);
|
||||
if (info == NULL)
|
||||
{
|
||||
PanicAlert("Can't open %s, it's missing", _rFilename);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
else{
|
||||
PanicAlert("error with dll Filename (its NULL)");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
PLUGIN_TYPE type = info->GetPluginInfo().Type;
|
||||
Common::CPlugin *plugin = NULL;
|
||||
|
|
|
@ -203,12 +203,12 @@ void VertexShaderManager::SetConstants(bool proj_hax_1, bool proj_hax_2)
|
|||
g_fProjectionMatrix[0] = xfregs.rawProjection[0];
|
||||
g_fProjectionMatrix[1] = 0.0f;
|
||||
g_fProjectionMatrix[2] = xfregs.rawProjection[1];
|
||||
g_fProjectionMatrix[3] = 0;
|
||||
g_fProjectionMatrix[3] = 0.0f;
|
||||
|
||||
g_fProjectionMatrix[4] = 0.0f;
|
||||
g_fProjectionMatrix[5] = xfregs.rawProjection[2];
|
||||
g_fProjectionMatrix[6] = xfregs.rawProjection[3];
|
||||
g_fProjectionMatrix[7] = 0;
|
||||
g_fProjectionMatrix[7] = 0.0f;
|
||||
|
||||
g_fProjectionMatrix[8] = 0.0f;
|
||||
g_fProjectionMatrix[9] = 0.0f;
|
||||
|
@ -217,7 +217,7 @@ void VertexShaderManager::SetConstants(bool proj_hax_1, bool proj_hax_2)
|
|||
//---------Projection[11]---------
|
||||
// No hacks
|
||||
if ((!proj_hax_1 && !proj_hax_2) || (proj_hax_1 && proj_hax_2))
|
||||
g_fProjectionMatrix[11] = -(0.0f - xfregs.rawProjection[5]);
|
||||
g_fProjectionMatrix[11] = xfregs.rawProjection[5];
|
||||
|
||||
// Before R945 Hack
|
||||
if (proj_hax_1 && !proj_hax_2)
|
||||
|
@ -270,7 +270,7 @@ void VertexShaderManager::SetConstants(bool proj_hax_1, bool proj_hax_2)
|
|||
//---------Projection[11]---------
|
||||
// No hacks
|
||||
if ((!proj_hax_1 && !proj_hax_2) || (proj_hax_1 && proj_hax_2))
|
||||
g_fProjectionMatrix[11] = -(-0.5f - xfregs.rawProjection[5]);
|
||||
g_fProjectionMatrix[11] = xfregs.rawProjection[5] + 0.1f;
|
||||
|
||||
// Before R945 Hack
|
||||
if (proj_hax_1 && !proj_hax_2)
|
||||
|
@ -303,8 +303,6 @@ void VertexShaderManager::SetConstants(bool proj_hax_1, bool proj_hax_2)
|
|||
SETSTAT_FT(stats.g2proj_13, g_fProjectionMatrix[13]);
|
||||
SETSTAT_FT(stats.g2proj_14, g_fProjectionMatrix[14]);
|
||||
SETSTAT_FT(stats.g2proj_15, g_fProjectionMatrix[15]);
|
||||
}
|
||||
|
||||
SETSTAT_FT(stats.proj_0, xfregs.rawProjection[0]);
|
||||
SETSTAT_FT(stats.proj_1, xfregs.rawProjection[1]);
|
||||
SETSTAT_FT(stats.proj_2, xfregs.rawProjection[2]);
|
||||
|
@ -312,6 +310,7 @@ void VertexShaderManager::SetConstants(bool proj_hax_1, bool proj_hax_2)
|
|||
SETSTAT_FT(stats.proj_4, xfregs.rawProjection[4]);
|
||||
SETSTAT_FT(stats.proj_5, xfregs.rawProjection[5]);
|
||||
SETSTAT_FT(stats.proj_6, xfregs.rawProjection[6]);
|
||||
}
|
||||
|
||||
PRIM_LOG("Projection: %f %f %f %f %f %f\n", xfregs.rawProjection[0], xfregs.rawProjection[1], xfregs.rawProjection[2], xfregs.rawProjection[3], xfregs.rawProjection[4], xfregs.rawProjection[5]);
|
||||
SetVSConstant4fv(C_PROJECTION, &g_fProjectionMatrix[0]);
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "CPMemory.h"
|
||||
#include "NativeVertexWriter.h"
|
||||
#include "VertexShaderManager.h"
|
||||
#include "PixelShaderManager.h"
|
||||
|
||||
// LoadXFReg 0x10
|
||||
void LoadXFReg(u32 transferSize, u32 baseAddress, u32 *pData)
|
||||
|
@ -154,6 +155,7 @@ void LoadXFReg(u32 transferSize, u32 baseAddress, u32 *pData)
|
|||
case 0x101a:
|
||||
VertexManager::Flush();
|
||||
VertexShaderManager::SetViewport((float*)&pData[i]);
|
||||
PixelShaderManager::SetViewport((float*)&pData[i]);
|
||||
i += 6;
|
||||
break;
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ void Flush()
|
|||
VertexShaderCache::SetShader(g_nativeVertexFmt->m_components); // TODO(ector): only do this if shader has changed
|
||||
|
||||
// set global constants
|
||||
VertexShaderManager::SetConstants();
|
||||
VertexShaderManager::SetConstants(false,false);
|
||||
PixelShaderManager::SetConstants();
|
||||
|
||||
int stride = g_nativeVertexFmt->GetVertexStride();
|
||||
|
|
|
@ -232,6 +232,8 @@ void ConfigDialog::CreateGUIControls()
|
|||
wxString tmp;
|
||||
tmp << g_Config.iMultisampleMode;
|
||||
m_AliasModeCB->SetValue(tmp);
|
||||
AAText->Hide();
|
||||
m_AliasModeCB->Hide();
|
||||
|
||||
// Usage: The wxGBPosition() must have a column and row
|
||||
sGeneral = new wxBoxSizer(wxVERTICAL);
|
||||
|
@ -262,8 +264,8 @@ void ConfigDialog::CreateGUIControls()
|
|||
sEnhancements->Add(m_ForceFiltering, wxGBPosition(0, 0), wxGBSpan(1, 2), wxALL, 5);
|
||||
sEnhancements->Add(AnisoText, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||
sEnhancements->Add(m_MaxAnisotropyCB, wxGBPosition(1, 1), wxGBSpan(1, 2), wxALL, 5);
|
||||
sEnhancements->Add(AAText, wxGBPosition(2, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||
sEnhancements->Add(m_AliasModeCB, wxGBPosition(2, 1), wxGBSpan(1, 2), wxALL, 5);
|
||||
//sEnhancements->Add(AAText, wxGBPosition(2, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||
//sEnhancements->Add(m_AliasModeCB, wxGBPosition(2, 1), wxGBSpan(1, 2), wxALL, 5);
|
||||
sbEnhancements->Add(sEnhancements);
|
||||
sGeneral->Add(sbEnhancements, 0, wxEXPAND|wxALL, 5);
|
||||
m_PageGeneral->SetSizer(sGeneral);
|
||||
|
|
Loading…
Reference in New Issue