mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
D3D: Eliminate black borders, add 4:3 and 16:9 settings, and the widescreen hack. Unfortunately this temporarily breaks MSAA (in d3d only) until I have time to fix it.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4263 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -218,7 +218,7 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
|
||||
PanicAlert("Cant read from DVD_Plugin - DVD-Interface: Fatal Error");
|
||||
}
|
||||
|
||||
FileMon::CheckFile(std::string(pFilename), m_pFileSystem->GetFileSize(pFilename));
|
||||
FileMon::CheckFile(std::string(pFilename), (int)m_pFileSystem->GetFileSize(pFilename));
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -46,7 +46,6 @@ void SetDitherMode(const BPCmd &bp);
|
||||
void SetLogicOpMode(const BPCmd &bp);
|
||||
void SetColorMask(const BPCmd &bp);
|
||||
void CopyEFB(const BPCmd &bp, const EFBRectangle &rc, const u32 &address, const bool &fromZBuffer, const bool &isIntensityFmt, const u32 ©fmt, const int &scaleByHalf);
|
||||
void RenderToXFB(const BPCmd &bp, const EFBRectangle &rc, const float &yScale, const float &xfbLines, u32 xfbAddr, const u32 &dstWidth, const u32 &dstHeight);
|
||||
void ClearScreen(const BPCmd &bp, const EFBRectangle &rc);
|
||||
void RestoreRenderState(const BPCmd &bp);
|
||||
u8 *GetPointer(const u32 &address);
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "Profiler.h"
|
||||
#include "Statistics.h"
|
||||
#include "Render.h"
|
||||
#include "VideoCommon.h"
|
||||
#include "PixelShaderManager.h"
|
||||
#include "BPFunctions.h"
|
||||
@ -40,6 +41,12 @@ void BPInit()
|
||||
bpmem.bpMask = 0xFFFFFF;
|
||||
}
|
||||
|
||||
|
||||
void RenderToXFB(const BPCmd &bp, const EFBRectangle &rc, float yScale, float xfbLines, u32 xfbAddr, const u32 dstWidth, const u32 dstHeight)
|
||||
{
|
||||
Renderer::RenderToXFB(xfbAddr, dstWidth, dstHeight, rc);
|
||||
}
|
||||
|
||||
void BPWritten(const BPCmd& bp)
|
||||
{
|
||||
/*
|
||||
|
@ -67,8 +67,8 @@ void GetPixelShaderId(PIXELSHADERUID &uid, u32 texturemask, u32 dstAlphaEnable)
|
||||
TevStageCombiner::ColorCombiner &cc = bpmem.combiners[i].colorC;
|
||||
TevStageCombiner::AlphaCombiner &ac = bpmem.combiners[i].alphaC;
|
||||
|
||||
u32 val0 = cc.hex&0xffffff;
|
||||
u32 val1 = ac.hex&0xffffff;
|
||||
u32 val0 = cc.hex & 0xffffff;
|
||||
u32 val1 = ac.hex & 0xffffff;
|
||||
val0 |= bpmem.tevksel[i / 2].getKC(i & 1) << 24;
|
||||
val1 |= bpmem.tevksel[i / 2].getKA(i & 1) << 24;
|
||||
pcurvalue[0] = val0;
|
||||
|
@ -15,7 +15,6 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------------------------
|
||||
// GC graphics pipeline
|
||||
// ---------------------------------------------------------------------------------------------
|
||||
@ -33,9 +32,13 @@
|
||||
#include "MathUtil.h"
|
||||
#include "pluginspecs_video.h"
|
||||
|
||||
// TODO: Move these out of here.
|
||||
extern int frameCount;
|
||||
extern int OSDChoice, OSDTime, OSDInternalW, OSDInternalH;
|
||||
|
||||
// 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
|
||||
// more sense.
|
||||
class Renderer
|
||||
{
|
||||
public:
|
||||
@ -48,8 +51,6 @@ public:
|
||||
|
||||
static void ReinitView();
|
||||
|
||||
static void SwapBuffers();
|
||||
|
||||
static void SetColorMask();
|
||||
static void SetBlendMode(bool forceUpdate);
|
||||
static bool SetScissorRect();
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "CommonTypes.h"
|
||||
#include "VideoCommon.h"
|
||||
#include "Render.h" // for EFBRectangle.h, unfortunately.
|
||||
#include <vector>
|
||||
|
||||
#ifndef _STATISTICS_H
|
||||
|
@ -97,6 +97,7 @@ void VideoConfig::Load(const char *ini_file)
|
||||
iniFile.Get("Hardware", "WindowedRes", &iWindowedRes, 0);
|
||||
iniFile.Get("Hardware", "VSync", &bVsync, 0);
|
||||
iniFile.Get("Hardware", "FullscreenRes", &iFSResolution, 0);
|
||||
iniFile.Get("Hardware", "SimpleFB", &bSimpleFB, false);
|
||||
|
||||
// Load common settings
|
||||
iniFile.Load(CONFIG_FILE);
|
||||
@ -175,12 +176,11 @@ void VideoConfig::Save(const char *ini_file)
|
||||
iniFile.Set("Hardware", "WindowedRes", iWindowedRes);
|
||||
iniFile.Set("Hardware", "VSync", bVsync);
|
||||
iniFile.Set("Hardware", "FullscreenRes", iFSResolution);
|
||||
iniFile.Set("Hardware", "SimpleFB", bSimpleFB);
|
||||
|
||||
iniFile.Save(ini_file);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// TODO: Figure out a better place for this function.
|
||||
void ComputeDrawRectangle(int backbuffer_width, int backbuffer_height, bool flip, TargetRectangle *rc)
|
||||
{
|
||||
@ -198,8 +198,8 @@ void ComputeDrawRectangle(int backbuffer_width, int backbuffer_height, bool flip
|
||||
{
|
||||
// The rendering window aspect ratio as a proportion of the 4:3 or 16:9 ratio
|
||||
float Ratio = (WinWidth / WinHeight) / (g_Config.bKeepAR43 ? (4.0f / 3.0f) : (16.0f / 9.0f));
|
||||
// Check if height or width is the limiting factor. If ratio > 1 the picture is to wide and have to limit the width.
|
||||
if (Ratio > 1)
|
||||
// Check if height or width is the limiting factor. If ratio > 1 the picture is too wide and have to limit the width.
|
||||
if (Ratio > 1.0f)
|
||||
{
|
||||
// Scale down and center in the X direction.
|
||||
FloatGLWidth /= Ratio;
|
||||
@ -230,12 +230,8 @@ void ComputeDrawRectangle(int backbuffer_width, int backbuffer_height, bool flip
|
||||
// Adjust the X and Y offset
|
||||
FloatXOffset = FloatXOffset - (IncreasedWidth * 0.5f);
|
||||
FloatYOffset = FloatYOffset - (IncreasedHeight * 0.5f);
|
||||
//NOTICE_LOG(OSREPORT, "Crop Ratio:%1.2f IncreasedHeight:%3.0f YOffset:%3.0f", Ratio, IncreasedHeight, FloatYOffset);
|
||||
//NOTICE_LOG(OSREPORT, "Crop FloatGLWidth:%1.2f FloatGLHeight:%3.0f", (float)FloatGLWidth, (float)FloatGLHeight);
|
||||
//NOTICE_LOG(OSREPORT, "");
|
||||
}
|
||||
|
||||
// round(float) = floor(float + 0.5)
|
||||
int XOffset = (int)(FloatXOffset + 0.5f);
|
||||
int YOffset = (int)(FloatYOffset + 0.5f);
|
||||
rc->left = XOffset;
|
||||
|
@ -131,9 +131,6 @@ struct VideoConfig
|
||||
// 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 VideoConfig g_Config;
|
||||
|
Reference in New Issue
Block a user