mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Merge remote-tracking branch 'remotes/origin/master' into new-shadercache-uids
This commit is contained in:
@ -46,7 +46,7 @@
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugFast|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
@ -57,7 +57,6 @@
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugFast|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
|
@ -60,6 +60,7 @@
|
||||
#include "Core.h"
|
||||
#include "Movie.h"
|
||||
#include "Host.h"
|
||||
#include "BPFunctions.h"
|
||||
|
||||
#include "main.h" // Local
|
||||
#ifdef _WIN32
|
||||
@ -642,49 +643,9 @@ TargetRectangle Renderer::ConvertEFBRectangle(const EFBRectangle& rc)
|
||||
// Renderer::GetTargetHeight() = the fixed ini file setting
|
||||
// donkopunchstania - it appears scissorBR is the bottom right pixel inside the scissor box
|
||||
// therefore the width and height are (scissorBR + 1) - scissorTL
|
||||
bool Renderer::SetScissorRect()
|
||||
void Renderer::SetScissorRect(const TargetRectangle& rc)
|
||||
{
|
||||
MathUtil::Rectangle<float> rc;
|
||||
GetScissorRect(rc);
|
||||
|
||||
if (rc.left < 0) rc.left = 0;
|
||||
if (rc.top < 0) rc.top = 0;
|
||||
if (rc.right > EFB_WIDTH) rc.right = EFB_WIDTH;
|
||||
if (rc.bottom > EFB_HEIGHT) rc.bottom = EFB_HEIGHT;
|
||||
|
||||
if (rc.left > rc.right)
|
||||
{
|
||||
int temp = rc.right;
|
||||
rc.right = rc.left;
|
||||
rc.left = temp;
|
||||
}
|
||||
if (rc.top > rc.bottom)
|
||||
{
|
||||
int temp = rc.bottom;
|
||||
rc.bottom = rc.top;
|
||||
rc.top = temp;
|
||||
}
|
||||
|
||||
// Check that the coordinates are good
|
||||
if (rc.right != rc.left && rc.bottom != rc.top)
|
||||
{
|
||||
glScissor(
|
||||
EFBToScaledX(rc.left), // x = 0 for example
|
||||
EFBToScaledY(EFB_HEIGHT - rc.bottom), // y = 0 for example
|
||||
EFBToScaledX(rc.right - rc.left), // width = 640 for example
|
||||
EFBToScaledY(rc.bottom - rc.top)); // height = 480 for example
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
glScissor(
|
||||
0,
|
||||
0,
|
||||
Renderer::GetTargetWidth(),
|
||||
Renderer::GetTargetHeight()
|
||||
);
|
||||
}
|
||||
return false;
|
||||
glScissor(rc.left, rc.bottom, rc.GetWidth(), rc.GetHeight());
|
||||
}
|
||||
|
||||
void Renderer::SetColorMask()
|
||||
@ -1432,7 +1393,7 @@ void Renderer::RestoreAPIState()
|
||||
// Gets us back into a more game-like state.
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
SetGenerationMode();
|
||||
SetScissorRect();
|
||||
BPFunctions::SetScissor();
|
||||
SetColorMask();
|
||||
SetDepthMode();
|
||||
SetBlendMode(true);
|
||||
|
@ -15,7 +15,7 @@ public:
|
||||
|
||||
void SetColorMask();
|
||||
void SetBlendMode(bool forceUpdate);
|
||||
bool SetScissorRect();
|
||||
void SetScissorRect(const TargetRectangle& rc);
|
||||
void SetGenerationMode();
|
||||
void SetDepthMode();
|
||||
void SetLogicOpMode();
|
||||
|
Reference in New Issue
Block a user