mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
more uninteresting cleanup, fixed a minor race condition when toggling efb copy mode
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4261 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -23,8 +23,6 @@ namespace
|
||||
static bool g_ProjHack0;
|
||||
static ProjectionHack g_ProjHack1;
|
||||
static ProjectionHack g_ProjHack2;
|
||||
static bool g_FreeLook;
|
||||
static bool g_Widescreen;
|
||||
} // Namespace
|
||||
|
||||
|
||||
@ -43,16 +41,6 @@ void Projection_SetHack2(ProjectionHack value)
|
||||
g_ProjHack2 = value;
|
||||
}
|
||||
|
||||
void Projection_SetFreeLook(bool enabled)
|
||||
{
|
||||
g_FreeLook = enabled;
|
||||
}
|
||||
|
||||
void Projection_SetWidescreen(bool enabled)
|
||||
{
|
||||
g_Widescreen = enabled;
|
||||
}
|
||||
|
||||
bool Projection_GetHack0()
|
||||
{
|
||||
return g_ProjHack0;
|
||||
@ -68,17 +56,6 @@ ProjectionHack Projection_GetHack2()
|
||||
return g_ProjHack2;
|
||||
}
|
||||
|
||||
bool Projection_GetFreeLook()
|
||||
{
|
||||
return g_FreeLook;
|
||||
}
|
||||
|
||||
bool Projection_GetWidescreen()
|
||||
{
|
||||
return g_Widescreen;
|
||||
}
|
||||
|
||||
|
||||
void UpdateProjectionHack(int iPhackvalue)
|
||||
{
|
||||
bool bProjHack1=0, bPhackvalue1=0, bPhackvalue2=0;
|
||||
|
@ -56,13 +56,9 @@ struct ProjectionHack
|
||||
void Projection_SetHack0(bool value);
|
||||
void Projection_SetHack1(ProjectionHack value);
|
||||
void Projection_SetHack2(ProjectionHack value);
|
||||
void Projection_SetFreeLook(bool enabled);
|
||||
void Projection_SetWidescreen(bool enabled);
|
||||
|
||||
bool Projection_GetHack0();
|
||||
ProjectionHack Projection_GetHack1();
|
||||
ProjectionHack Projection_GetHack2();
|
||||
bool Projection_GetFreeLook();
|
||||
bool Projection_GetWidescreen();
|
||||
|
||||
void UpdateProjectionHack(int hackIdx);
|
||||
|
@ -88,4 +88,6 @@ public:
|
||||
static void Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight);
|
||||
};
|
||||
|
||||
void UpdateViewport();
|
||||
|
||||
#endif // _COMMON_RENDER_H_
|
||||
|
@ -16,6 +16,7 @@
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "Common.h"
|
||||
#include "VideoConfig.h"
|
||||
#include "MathUtil.h"
|
||||
#include "Profiler.h"
|
||||
|
||||
@ -216,9 +217,8 @@ void VertexShaderManager::SetConstants()
|
||||
|
||||
if (xfregs.rawProjection[6] == 0)
|
||||
{
|
||||
bool bWidescreenHack = Projection_GetWidescreen();
|
||||
// Perspective
|
||||
g_fProjectionMatrix[0] = (bWidescreenHack ? xfregs.rawProjection[0]*0.75f : xfregs.rawProjection[0]);
|
||||
g_fProjectionMatrix[0] = (g_ActiveConfig.bWidescreenHack ? xfregs.rawProjection[0]*0.75f : xfregs.rawProjection[0]);
|
||||
g_fProjectionMatrix[1] = 0.0f;
|
||||
g_fProjectionMatrix[2] = xfregs.rawProjection[1];
|
||||
g_fProjectionMatrix[3] = 0.0f;
|
||||
@ -313,7 +313,7 @@ void VertexShaderManager::SetConstants()
|
||||
|
||||
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]);
|
||||
|
||||
if (Projection_GetFreeLook())
|
||||
if (g_ActiveConfig.bFreeLook)
|
||||
{
|
||||
Matrix44 mtxA;
|
||||
Matrix44 mtxB;
|
||||
|
@ -22,20 +22,20 @@
|
||||
#include "VideoConfig.h"
|
||||
#include "VideoCommon.h"
|
||||
|
||||
Config g_Config;
|
||||
Config g_ActiveConfig;
|
||||
VideoConfig g_Config;
|
||||
VideoConfig g_ActiveConfig;
|
||||
|
||||
void UpdateActiveConfig()
|
||||
{
|
||||
g_ActiveConfig = g_Config;
|
||||
}
|
||||
|
||||
Config::Config()
|
||||
VideoConfig::VideoConfig()
|
||||
{
|
||||
bRunning = false;
|
||||
}
|
||||
|
||||
void Config::Load(const char *ini_file)
|
||||
void VideoConfig::Load(const char *ini_file)
|
||||
{
|
||||
std::string temp;
|
||||
IniFile iniFile;
|
||||
@ -105,7 +105,7 @@ void Config::Load(const char *ini_file)
|
||||
SetEnableAlert(bTmp);
|
||||
}
|
||||
|
||||
void Config::GameIniLoad(const char *ini_file)
|
||||
void VideoConfig::GameIniLoad(const char *ini_file)
|
||||
{
|
||||
IniFile iniFile;
|
||||
iniFile.Load(ini_file);
|
||||
@ -121,7 +121,7 @@ void Config::GameIniLoad(const char *ini_file)
|
||||
iniFile.Get("Video", "ProjectionHack", &iPhackvalue, 0);
|
||||
}
|
||||
|
||||
void Config::Save(const char *ini_file)
|
||||
void VideoConfig::Save(const char *ini_file)
|
||||
{
|
||||
IniFile iniFile;
|
||||
iniFile.Load(ini_file);
|
||||
|
@ -51,9 +51,9 @@ enum MultisampleMode {
|
||||
class IniFile;
|
||||
|
||||
// NEVER inherit from this class.
|
||||
struct Config
|
||||
struct VideoConfig
|
||||
{
|
||||
Config();
|
||||
VideoConfig();
|
||||
void Load(const char *ini_file);
|
||||
void GameIniLoad(const char *ini_file);
|
||||
void Save(const char *ini_file);
|
||||
@ -128,12 +128,16 @@ struct Config
|
||||
|
||||
bool bVsync;
|
||||
|
||||
// With this enabled, the plugin renders directly to the backbuffer. Many features are
|
||||
// disabled but it might be faster on really old GPUs.
|
||||
bool bSimpleFB;
|
||||
|
||||
// Runtime detection config
|
||||
bool bOldCard;
|
||||
};
|
||||
|
||||
extern Config g_Config;
|
||||
extern Config g_ActiveConfig;
|
||||
extern VideoConfig g_Config;
|
||||
extern VideoConfig g_ActiveConfig;
|
||||
|
||||
// Called every frame.
|
||||
void UpdateActiveConfig();
|
||||
|
Reference in New Issue
Block a user