mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-01-31 01:15:24 +01:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
10b264b9ec | ||
|
|
dc741e95bd | ||
|
|
a1ca0a9a02 | ||
|
|
c076c50b68 | ||
|
|
c688db8f08 | ||
|
|
469053de9b | ||
|
|
185b85f86a | ||
|
|
11096a520e | ||
|
|
07fd035aa2 | ||
|
|
6bedcd768f | ||
|
|
0c949db506 | ||
|
|
4c5253c0f5 | ||
|
|
325133e54c | ||
|
|
4113ac574d | ||
|
|
2d6c687913 | ||
|
|
f9fbecc783 | ||
|
|
c5ceba35b6 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -119,3 +119,4 @@ oprofile_data/
|
||||
CMakeSettings.json
|
||||
/ci-artifacts/
|
||||
/out/
|
||||
/.cache/
|
||||
|
||||
2
3rdparty/imgui/include/imconfig.h
vendored
2
3rdparty/imgui/include/imconfig.h
vendored
@@ -28,7 +28,7 @@
|
||||
//#define IMGUI_API __attribute__((visibility("default"))) // GCC/Clang: override visibility when set is hidden
|
||||
|
||||
//---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to clean your code of obsolete function/names.
|
||||
//#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
//#define IMGUI_DISABLE_OBSOLETE_KEYIO // 1.87+ disable legacy io.KeyMap[]+io.KeysDown[] in favor io.AddKeyEvent(). This is automatically done by IMGUI_DISABLE_OBSOLETE_FUNCTIONS.
|
||||
|
||||
//---- Disable all of Dear ImGui or don't implement standard windows/tools.
|
||||
|
||||
4
3rdparty/imgui/include/imgui_internal.h
vendored
4
3rdparty/imgui/include/imgui_internal.h
vendored
@@ -1357,8 +1357,8 @@ typedef ImBitArray<ImGuiKey_NamedKey_COUNT, -ImGuiKey_NamedKey_BEGIN> ImBitAr
|
||||
#define ImGuiKey_NavKeyboardTweakFast ImGuiMod_Shift
|
||||
#define ImGuiKey_NavGamepadTweakSlow ImGuiKey_GamepadL1
|
||||
#define ImGuiKey_NavGamepadTweakFast ImGuiKey_GamepadR1
|
||||
#define ImGuiKey_NavGamepadActivate ImGuiKey_GamepadFaceDown
|
||||
#define ImGuiKey_NavGamepadCancel ImGuiKey_GamepadFaceRight
|
||||
#define ImGuiKey_NavGamepadActivate (g.IO.ConfigNavSwapGamepadButtons ? ImGuiKey_GamepadFaceRight : ImGuiKey_GamepadFaceDown)
|
||||
#define ImGuiKey_NavGamepadCancel (g.IO.ConfigNavSwapGamepadButtons ? ImGuiKey_GamepadFaceDown : ImGuiKey_GamepadFaceRight)
|
||||
#define ImGuiKey_NavGamepadMenu ImGuiKey_GamepadFaceLeft
|
||||
#define ImGuiKey_NavGamepadInput ImGuiKey_GamepadFaceUp
|
||||
|
||||
|
||||
5
3rdparty/imgui/src/imgui.cpp
vendored
5
3rdparty/imgui/src/imgui.cpp
vendored
@@ -13005,6 +13005,9 @@ static void ImGui::NavUpdateWindowing()
|
||||
const bool nav_keyboard_active = (io.ConfigFlags & ImGuiConfigFlags_NavEnableKeyboard) != 0;
|
||||
const bool keyboard_next_window = allow_windowing && g.ConfigNavWindowingKeyNext && Shortcut(g.ConfigNavWindowingKeyNext, ImGuiInputFlags_Repeat | ImGuiInputFlags_RouteAlways, owner_id);
|
||||
const bool keyboard_prev_window = allow_windowing && g.ConfigNavWindowingKeyPrev && Shortcut(g.ConfigNavWindowingKeyPrev, ImGuiInputFlags_Repeat | ImGuiInputFlags_RouteAlways, owner_id);
|
||||
/*
|
||||
Why do we need to patch ImGui to disable the nav menu...
|
||||
|
||||
const bool start_windowing_with_gamepad = allow_windowing && nav_gamepad_active && !g.NavWindowingTarget && IsKeyPressed(ImGuiKey_NavGamepadMenu, ImGuiInputFlags_None);
|
||||
const bool start_windowing_with_keyboard = allow_windowing && !g.NavWindowingTarget && (keyboard_next_window || keyboard_prev_window); // Note: enabled even without NavEnableKeyboard!
|
||||
if (start_windowing_with_gamepad || start_windowing_with_keyboard)
|
||||
@@ -13020,7 +13023,7 @@ static void ImGui::NavUpdateWindowing()
|
||||
if (keyboard_next_window || keyboard_prev_window)
|
||||
SetKeyOwnersForKeyChord((g.ConfigNavWindowingKeyNext | g.ConfigNavWindowingKeyPrev) & ImGuiMod_Mask_, owner_id);
|
||||
}
|
||||
|
||||
*/
|
||||
// Gamepad update
|
||||
g.NavWindowingTimer += io.DeltaTime;
|
||||
if (g.NavWindowingTarget && g.NavInputSource == ImGuiInputSource_Gamepad)
|
||||
|
||||
@@ -7169,6 +7169,12 @@ SCKA-20087:
|
||||
nativeScaling: 2 # Fixes post processing smoothness and position.
|
||||
memcardFilters:
|
||||
- "SCKA-20086"
|
||||
SCKA-20088:
|
||||
name: "모두의 테니스"
|
||||
name-en: "Everybody's Tennis"
|
||||
region: "NTSC-K"
|
||||
roundModes:
|
||||
vu1RoundMode: 1 # Fixes the display of scores and text ingame.
|
||||
SCKA-20089:
|
||||
name: "BioHazard 4"
|
||||
region: "NTSC-K"
|
||||
@@ -10406,6 +10412,8 @@ SCUS-97211:
|
||||
name: "ATV Offroad Fury 2"
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
bilinearUpscale: 2 # Fixes broken textures.
|
||||
SCUS-97212:
|
||||
name: "My Street"
|
||||
region: "NTSC-U"
|
||||
@@ -10523,6 +10531,8 @@ SCUS-97236:
|
||||
SCUS-97238:
|
||||
name: "ATV Offroad Fury 2 [Demo]"
|
||||
region: "NTSC-U"
|
||||
gsHWFixes:
|
||||
bilinearUpscale: 2 # Fixes broken textures.
|
||||
SCUS-97239:
|
||||
name: "Jet X2O [Demo]"
|
||||
region: "NTSC-U"
|
||||
@@ -10929,6 +10939,8 @@ SCUS-97369:
|
||||
name: "ATV Offroad Fury 2"
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
bilinearUpscale: 2 # Fixes broken textures.
|
||||
SCUS-97370:
|
||||
name: "NCAA Final Four 2004"
|
||||
region: "NTSC-U"
|
||||
@@ -11571,6 +11583,8 @@ SCUS-97509:
|
||||
SCUS-97510:
|
||||
name: "ATV Offroad Fury 2 [Greatest Hits]"
|
||||
region: "NTSC-U"
|
||||
gsHWFixes:
|
||||
bilinearUpscale: 2 # Fixes broken textures.
|
||||
SCUS-97511:
|
||||
name: "SOCOM II - U.S. Navy SEALs [Greatest Hits]"
|
||||
region: "NTSC-U"
|
||||
@@ -17359,6 +17373,8 @@ SLES-51813:
|
||||
SLES-51814:
|
||||
name: "ATV Offroad Fury 2"
|
||||
region: "PAL-E"
|
||||
gsHWFixes:
|
||||
bilinearUpscale: 2 # Fixes broken textures.
|
||||
SLES-51815:
|
||||
name: "Final Fantasy X-2"
|
||||
region: "PAL-E"
|
||||
@@ -67117,6 +67133,8 @@ SLUS-21638:
|
||||
compat: 5
|
||||
clampModes:
|
||||
vuClampMode: 3 # Missing geometry with microVU.
|
||||
memcardFilters:
|
||||
- "SLUS-21620"
|
||||
SLUS-21639:
|
||||
name: "NASCAR 08"
|
||||
region: "NTSC-U"
|
||||
|
||||
@@ -1172,7 +1172,6 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
05000000a00500003232000001000000,8BitDo Zero,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Linux,
|
||||
05000000a00500003232000008010000,8BitDo Zero,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000c82d00001890000011010000,8BitDo Zero 2,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux,
|
||||
050000005e040000e002000030110000,8BitDo Zero 2,a:b0,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Linux,
|
||||
05000000c82d00003032000000010000,8BitDo Zero 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
|
||||
03000000c01100000355000011010000,Acrux Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
030000006f0e00008801000011010000,Afterglow Deluxe Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
@@ -1694,7 +1693,6 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
050000005e040000220b000013050000,Xbox One Elite 2 Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
050000005e040000050b000002090000,Xbox One Elite Series 2,a:b0,b:b1,back:b136,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a6,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
030000005e040000ea02000011050000,Xbox One S Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
050082795e040000e002000003090000,Xbox One S Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
060000005e040000ea0200000b050000,Xbox One S Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
060000005e040000ea0200000d050000,Xbox One S Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000005e040000120b000001050000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
|
||||
@@ -772,17 +772,17 @@ float4 ps_color(PS_INPUT input)
|
||||
uint4 denorm_c_before = uint4(T);
|
||||
if (PS_PROCESS_BA & SHUFFLE_READ)
|
||||
{
|
||||
T.r = float((denorm_c_before.b << 3) & 0xF8);
|
||||
T.g = float(((denorm_c_before.b >> 2) & 0x38) | ((denorm_c_before.a << 6) & 0xC0));
|
||||
T.b = float((denorm_c_before.a << 1) & 0xF8);
|
||||
T.a = float(denorm_c_before.a & 0x80);
|
||||
T.r = float((denorm_c_before.b << 3) & 0xF8u);
|
||||
T.g = float(((denorm_c_before.b >> 2) & 0x38u) | ((denorm_c_before.a << 6) & 0xC0u));
|
||||
T.b = float((denorm_c_before.a << 1) & 0xF8u);
|
||||
T.a = float(denorm_c_before.a & 0x80u);
|
||||
}
|
||||
else
|
||||
{
|
||||
T.r = float((denorm_c_before.r << 3) & 0xF8);
|
||||
T.g = float(((denorm_c_before.r >> 2) & 0x38) | ((denorm_c_before.g << 6) & 0xC0));
|
||||
T.b = float((denorm_c_before.g << 1) & 0xF8);
|
||||
T.a = float(denorm_c_before.g & 0x80);
|
||||
T.r = float((denorm_c_before.r << 3) & 0xF8u);
|
||||
T.g = float(((denorm_c_before.r >> 2) & 0x38u) | ((denorm_c_before.g << 6) & 0xC0u));
|
||||
T.b = float((denorm_c_before.g << 1) & 0xF8u);
|
||||
T.a = float(denorm_c_before.g & 0x80u);
|
||||
}
|
||||
|
||||
T.a = (T.a >= 127.5f ? TA.y : !PS_AEM || any(int3(T.rgb) & 0xF8) ? TA.x : 0) * 255.0f;
|
||||
@@ -874,17 +874,17 @@ void ps_blend(inout float4 Color, inout float4 As_rgba, float2 pos_xy)
|
||||
uint4 denorm_rt = uint4(RT);
|
||||
if (PS_PROCESS_BA & SHUFFLE_WRITE)
|
||||
{
|
||||
RT.r = float((denorm_rt.b << 3) & 0xF8);
|
||||
RT.g = float(((denorm_rt.b >> 2) & 0x38) | ((denorm_rt.a << 6) & 0xC0));
|
||||
RT.b = float((denorm_rt.a << 1) & 0xF8);
|
||||
RT.a = float(denorm_rt.a & 0x80);
|
||||
RT.r = float((denorm_rt.b << 3) & 0xF8u);
|
||||
RT.g = float(((denorm_rt.b >> 2) & 0x38u) | ((denorm_rt.a << 6) & 0xC0u));
|
||||
RT.b = float((denorm_rt.a << 1) & 0xF8u);
|
||||
RT.a = float(denorm_rt.a & 0x80u);
|
||||
}
|
||||
else
|
||||
{
|
||||
RT.r = float((denorm_rt.r << 3) & 0xF8);
|
||||
RT.g = float(((denorm_rt.r >> 2) & 0x38) | ((denorm_rt.g << 6) & 0xC0));
|
||||
RT.b = float((denorm_rt.g << 1) & 0xF8);
|
||||
RT.a = float(denorm_rt.g & 0x80);
|
||||
RT.r = float((denorm_rt.r << 3) & 0xF8u);
|
||||
RT.g = float(((denorm_rt.r >> 2) & 0x38u) | ((denorm_rt.g << 6) & 0xC0u));
|
||||
RT.b = float((denorm_rt.g << 1) & 0xF8u);
|
||||
RT.a = float(denorm_rt.g & 0x80u);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1067,13 +1067,13 @@ PS_OUTPUT ps_main(PS_INPUT input)
|
||||
uint4 denorm_c_after = uint4(C);
|
||||
if (PS_PROCESS_BA & SHUFFLE_READ)
|
||||
{
|
||||
C.b = float(((denorm_c_after.r >> 3) & 0x1F) | ((denorm_c_after.g << 2) & 0xE0));
|
||||
C.a = float(((denorm_c_after.g >> 6) & 0x3) | ((denorm_c_after.b >> 1) & 0x7C) | (denorm_c_after.a & 0x80));
|
||||
C.b = float(((denorm_c_after.r >> 3) & 0x1Fu) | ((denorm_c_after.g << 2) & 0xE0u));
|
||||
C.a = float(((denorm_c_after.g >> 6) & 0x3u) | ((denorm_c_after.b >> 1) & 0x7Cu) | (denorm_c_after.a & 0x80u));
|
||||
}
|
||||
else
|
||||
{
|
||||
C.r = float(((denorm_c_after.r >> 3) & 0x1F) | ((denorm_c_after.g << 2) & 0xE0));
|
||||
C.g = float(((denorm_c_after.g >> 6) & 0x3) | ((denorm_c_after.b >> 1) & 0x7C) | (denorm_c_after.a & 0x80));
|
||||
C.r = float(((denorm_c_after.r >> 3) & 0x1Fu) | ((denorm_c_after.g << 2) & 0xE0u));
|
||||
C.g = float(((denorm_c_after.g >> 6) & 0x3u) | ((denorm_c_after.b >> 1) & 0x7Cu) | (denorm_c_after.a & 0x80u));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -681,15 +681,15 @@ vec4 ps_color()
|
||||
#if PS_SHUFFLE && !PS_READ16_SRC && !PS_SHUFFLE_SAME
|
||||
uvec4 denorm_c_before = uvec4(T);
|
||||
#if (PS_PROCESS_BA & SHUFFLE_READ)
|
||||
T.r = float((denorm_c_before.b << 3) & 0xF8);
|
||||
T.g = float(((denorm_c_before.b >> 2) & 0x38) | ((denorm_c_before.a << 6) & 0xC0));
|
||||
T.b = float((denorm_c_before.a << 1) & 0xF8);
|
||||
T.a = float(denorm_c_before.a & 0x80);
|
||||
T.r = float((denorm_c_before.b << 3) & 0xF8u);
|
||||
T.g = float(((denorm_c_before.b >> 2) & 0x38u) | ((denorm_c_before.a << 6) & 0xC0u));
|
||||
T.b = float((denorm_c_before.a << 1) & 0xF8u);
|
||||
T.a = float(denorm_c_before.a & 0x80u);
|
||||
#else
|
||||
T.r = float((denorm_c_before.r << 3) & 0xF8);
|
||||
T.g = float(((denorm_c_before.r >> 2) & 0x38) | ((denorm_c_before.g << 6) & 0xC0));
|
||||
T.b = float((denorm_c_before.g << 1) & 0xF8);
|
||||
T.a = float(denorm_c_before.g & 0x80);
|
||||
T.r = float((denorm_c_before.r << 3) & 0xF8u);
|
||||
T.g = float(((denorm_c_before.r >> 2) & 0x38u) | ((denorm_c_before.g << 6) & 0xC0u));
|
||||
T.b = float((denorm_c_before.g << 1) & 0xF8u);
|
||||
T.a = float(denorm_c_before.g & 0x80u);
|
||||
#endif
|
||||
|
||||
T.a = ((T.a >= 127.5f) ? TA.y : ((PS_AEM == 0 || any(bvec3(ivec3(T.rgb) & ivec3(0xF8)))) ? TA.x : 0.0f)) * 255.0f;
|
||||
@@ -804,15 +804,15 @@ float As = As_rgba.a;
|
||||
#if PS_SHUFFLE && SW_BLEND_NEEDS_RT
|
||||
uvec4 denorm_rt = uvec4(RT);
|
||||
#if (PS_PROCESS_BA & SHUFFLE_WRITE)
|
||||
RT.r = float((denorm_rt.b << 3) & 0xF8);
|
||||
RT.g = float(((denorm_rt.b >> 2) & 0x38) | ((denorm_rt.a << 6) & 0xC0));
|
||||
RT.b = float((denorm_rt.a << 1) & 0xF8);
|
||||
RT.a = float(denorm_rt.a & 0x80);
|
||||
RT.r = float((denorm_rt.b << 3) & 0xF8u);
|
||||
RT.g = float(((denorm_rt.b >> 2) & 0x38u) | ((denorm_rt.a << 6) & 0xC0u));
|
||||
RT.b = float((denorm_rt.a << 1) & 0xF8u);
|
||||
RT.a = float(denorm_rt.a & 0x80u);
|
||||
#else
|
||||
RT.r = float((denorm_rt.r << 3) & 0xF8);
|
||||
RT.g = float(((denorm_rt.r >> 2) & 0x38) | ((denorm_rt.g << 6) & 0xC0));
|
||||
RT.b = float((denorm_rt.g << 1) & 0xF8);
|
||||
RT.a = float(denorm_rt.g & 0x80);
|
||||
RT.r = float((denorm_rt.r << 3) & 0xF8u);
|
||||
RT.g = float(((denorm_rt.r >> 2) & 0x38u) | ((denorm_rt.g << 6) & 0xC0u));
|
||||
RT.b = float((denorm_rt.g << 1) & 0xF8u);
|
||||
RT.a = float(denorm_rt.g & 0x80u);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1046,11 +1046,11 @@ void ps_main()
|
||||
#if !PS_READ16_SRC && !PS_SHUFFLE_SAME
|
||||
uvec4 denorm_c_after = uvec4(C);
|
||||
#if (PS_PROCESS_BA & SHUFFLE_READ)
|
||||
C.b = float(((denorm_c_after.r >> 3) & 0x1F) | ((denorm_c_after.g << 2) & 0xE0));
|
||||
C.a = float(((denorm_c_after.g >> 6) & 0x3) | ((denorm_c_after.b >> 1) & 0x7C) | (denorm_c_after.a & 0x80));
|
||||
C.b = float(((denorm_c_after.r >> 3) & 0x1Fu) | ((denorm_c_after.g << 2) & 0xE0u));
|
||||
C.a = float(((denorm_c_after.g >> 6) & 0x3u) | ((denorm_c_after.b >> 1) & 0x7Cu) | (denorm_c_after.a & 0x80u));
|
||||
#else
|
||||
C.r = float(((denorm_c_after.r >> 3) & 0x1F) | ((denorm_c_after.g << 2) & 0xE0));
|
||||
C.g = float(((denorm_c_after.g >> 6) & 0x3) | ((denorm_c_after.b >> 1) & 0x7C) | (denorm_c_after.a & 0x80));
|
||||
C.r = float(((denorm_c_after.r >> 3) & 0x1Fu) | ((denorm_c_after.g << 2) & 0xE0u));
|
||||
C.g = float(((denorm_c_after.g >> 6) & 0x3u) | ((denorm_c_after.b >> 1) & 0x7Cu) | (denorm_c_after.a & 0x80u));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -948,15 +948,15 @@ vec4 ps_color()
|
||||
#if PS_SHUFFLE && !PS_READ16_SRC && !PS_SHUFFLE_SAME
|
||||
uvec4 denorm_c_before = uvec4(T);
|
||||
#if (PS_PROCESS_BA & SHUFFLE_READ)
|
||||
T.r = float((denorm_c_before.b << 3) & 0xF8);
|
||||
T.g = float(((denorm_c_before.b >> 2) & 0x38) | ((denorm_c_before.a << 6) & 0xC0));
|
||||
T.b = float((denorm_c_before.a << 1) & 0xF8);
|
||||
T.a = float(denorm_c_before.a & 0x80);
|
||||
T.r = float((denorm_c_before.b << 3) & 0xF8u);
|
||||
T.g = float(((denorm_c_before.b >> 2) & 0x38u) | ((denorm_c_before.a << 6) & 0xC0u));
|
||||
T.b = float((denorm_c_before.a << 1) & 0xF8u);
|
||||
T.a = float(denorm_c_before.a & 0x80u);
|
||||
#else
|
||||
T.r = float((denorm_c_before.r << 3) & 0xF8);
|
||||
T.g = float(((denorm_c_before.r >> 2) & 0x38) | ((denorm_c_before.g << 6) & 0xC0));
|
||||
T.b = float((denorm_c_before.g << 1) & 0xF8);
|
||||
T.a = float(denorm_c_before.g & 0x80);
|
||||
T.r = float((denorm_c_before.r << 3) & 0xF8u);
|
||||
T.g = float(((denorm_c_before.r >> 2) & 0x38) | ((denorm_c_before.g << 6) & 0xC0u));
|
||||
T.b = float((denorm_c_before.g << 1) & 0xF8u);
|
||||
T.a = float(denorm_c_before.g & 0x80u);
|
||||
#endif
|
||||
|
||||
T.a = ((T.a >= 127.5f) ? TA.y : ((PS_AEM == 0 || any(bvec3(ivec3(T.rgb) & ivec3(0xF8)))) ? TA.x : 0.0f)) * 255.0f;
|
||||
@@ -1071,15 +1071,15 @@ void ps_blend(inout vec4 Color, inout vec4 As_rgba)
|
||||
#if PS_SHUFFLE && PS_FEEDBACK_LOOP_IS_NEEDED
|
||||
uvec4 denorm_rt = uvec4(RT);
|
||||
#if (PS_PROCESS_BA & SHUFFLE_WRITE)
|
||||
RT.r = float((denorm_rt.b << 3) & 0xF8);
|
||||
RT.g = float(((denorm_rt.b >> 2) & 0x38) | ((denorm_rt.a << 6) & 0xC0));
|
||||
RT.b = float((denorm_rt.a << 1) & 0xF8);
|
||||
RT.a = float(denorm_rt.a & 0x80);
|
||||
RT.r = float((denorm_rt.b << 3) & 0xF8u);
|
||||
RT.g = float(((denorm_rt.b >> 2) & 0x38u) | ((denorm_rt.a << 6) & 0xC0u));
|
||||
RT.b = float((denorm_rt.a << 1) & 0xF8u);
|
||||
RT.a = float(denorm_rt.a & 0x80u);
|
||||
#else
|
||||
RT.r = float((denorm_rt.r << 3) & 0xF8);
|
||||
RT.g = float(((denorm_rt.r >> 2) & 0x38) | ((denorm_rt.g << 6) & 0xC0));
|
||||
RT.b = float((denorm_rt.g << 1) & 0xF8);
|
||||
RT.a = float(denorm_rt.g & 0x80);
|
||||
RT.r = float((denorm_rt.r << 3) & 0xF8u);
|
||||
RT.g = float(((denorm_rt.r >> 2) & 0x38u) | ((denorm_rt.g << 6) & 0xC0u));
|
||||
RT.b = float((denorm_rt.g << 1) & 0xF8u);
|
||||
RT.a = float(denorm_rt.g & 0x80u);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1312,11 +1312,11 @@ void main()
|
||||
#if !PS_READ16_SRC && !PS_SHUFFLE_SAME
|
||||
uvec4 denorm_c_after = uvec4(C);
|
||||
#if (PS_PROCESS_BA & SHUFFLE_READ)
|
||||
C.b = float(((denorm_c_after.r >> 3) & 0x1F) | ((denorm_c_after.g << 2) & 0xE0));
|
||||
C.a = float(((denorm_c_after.g >> 6) & 0x3) | ((denorm_c_after.b >> 1) & 0x7C) | (denorm_c_after.a & 0x80));
|
||||
C.b = float(((denorm_c_after.r >> 3) & 0x1Fu) | ((denorm_c_after.g << 2) & 0xE0u));
|
||||
C.a = float(((denorm_c_after.g >> 6) & 0x3u) | ((denorm_c_after.b >> 1) & 0x7Cu) | (denorm_c_after.a & 0x80u));
|
||||
#else
|
||||
C.r = float(((denorm_c_after.r >> 3) & 0x1F) | ((denorm_c_after.g << 2) & 0xE0));
|
||||
C.g = float(((denorm_c_after.g >> 6) & 0x3) | ((denorm_c_after.b >> 1) & 0x7C) | (denorm_c_after.a & 0x80));
|
||||
C.r = float(((denorm_c_after.r >> 3) & 0x1Fu) | ((denorm_c_after.g << 2) & 0xE0u));
|
||||
C.g = float(((denorm_c_after.g >> 6) & 0x3u) | ((denorm_c_after.b >> 1) & 0x7Cu) | (denorm_c_after.a & 0x80u));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# Extra preprocessor definitions that will be added to all pcsx2 builds
|
||||
set(PCSX2_DEFS "")
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Misc option
|
||||
#-------------------------------------------------------------------------------
|
||||
@@ -8,6 +10,7 @@ option(ENABLE_TESTS "Enables building the unit tests" ON)
|
||||
option(ENABLE_GSRUNNER "Enables building the GSRunner" OFF)
|
||||
option(LTO_PCSX2_CORE "Enable LTO/IPO/LTCG on the subset of pcsx2 that benefits most from it but not anything else")
|
||||
option(USE_VTUNE "Plug VTUNE to profile GS JIT.")
|
||||
option(PACKAGE_MODE "Use this option to ease packaging of PCSX2 (developer/distribution option)")
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Graphical option
|
||||
@@ -199,6 +202,15 @@ if(MSVC)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(PACKAGE_MODE)
|
||||
file(RELATIVE_PATH relative_datadir ${CMAKE_INSTALL_FULL_BINDIR} ${CMAKE_INSTALL_FULL_DATADIR}/PCSX2)
|
||||
|
||||
# Compile all source codes with those defines
|
||||
list(APPEND PCSX2_DEFS
|
||||
PCSX2_APP_DATADIR="${relative_datadir}")
|
||||
endif()
|
||||
|
||||
|
||||
if(USE_VTUNE)
|
||||
list(APPEND PCSX2_DEFS ENABLE_VTUNE)
|
||||
endif()
|
||||
|
||||
@@ -509,10 +509,18 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
|
||||
m_ui.mipmapping, tr("Mipmapping"), tr("Checked"), tr("Enables mipmapping, which some games require to render correctly."));
|
||||
|
||||
dialog->registerWidgetHelp(
|
||||
m_ui.textureFiltering, tr("Texture Filtering"), tr("Bilinear (PS2)"), tr("Control the texture filtering of the emulation."));
|
||||
m_ui.textureFiltering, tr("Texture Filtering"), tr("Bilinear (PS2)"),
|
||||
tr("Changes what filtering algorithm is used to map textures to surfaces.<br> "
|
||||
"Nearest: Makes no attempt to blend colors.<br> "
|
||||
"Bilinear (Forced): Will blend colors together to remove harsh edges between different colored pixels even if the game told the PS2 not to.<br> "
|
||||
"Bilinear (PS2): Will apply filtering to all surfaces that a game instructs the PS2 to filter.<br> "
|
||||
"Bilinear (Forced Excluding Sprites): Will apply filtering to all surfaces, even if the game told the PS2 not to, except sprites."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.trilinearFiltering, tr("Trilinear Filtering"), tr("Automatic (Default)"),
|
||||
tr("Control the texture's trilinear filtering of the emulation."));
|
||||
tr("Reduces blurriness of large textures applied to small, steeply angled surfaces by sampling colors from the two nearest Mipmaps. Requires Mipmapping to be 'on'.<br> "
|
||||
"Off: Disables the feature.<br> "
|
||||
"Trilinear (PS2): Applies Trilinear filtering to all surfaces that a game instructs the PS2 to.<br> "
|
||||
"Trilinear (Forced): Applies Trilinear filtering to all surfaces, even if the game told the PS2 not to."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.anisotropicFiltering, tr("Anisotropic Filtering"), tr("Off (Default)"),
|
||||
tr("Reduces texture aliasing at extreme viewing angles."));
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1282,6 +1282,16 @@ function(setup_main_executable target)
|
||||
install(CODE "file(WRITE \"${CMAKE_SOURCE_DIR}/bin/qt.conf\" \"[Paths]\\nPlugins = ./QtPlugins\")")
|
||||
endif()
|
||||
|
||||
|
||||
if (UNIX AND NOT APPLE)
|
||||
if (PACKAGE_MODE)
|
||||
install(TARGETS pcsx2-qt DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
|
||||
install(DIRECTORY ${CMAKE_SOURCE_DIR}/bin/resources DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/PCSX2)
|
||||
else()
|
||||
install(TARGETS pcsx2-qt DESTINATION ${CMAKE_SOURCE_DIR}/bin)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
if(CMAKE_GENERATOR MATCHES "Xcode")
|
||||
# If we're generating an xcode project, you can just add the shaders to the main pcsx2 target and xcode will deal with them properly
|
||||
|
||||
@@ -715,16 +715,16 @@ struct alignas(16) GSHWDrawConfig
|
||||
|
||||
AlphaPass alpha_second_pass;
|
||||
|
||||
struct BlendPass
|
||||
struct BlendMultiPass
|
||||
{
|
||||
BlendState blend;
|
||||
u8 blend_hw;
|
||||
u8 dither;
|
||||
bool enable;
|
||||
};
|
||||
static_assert(sizeof(BlendPass) == 8, "blend pass is 8 bytes");
|
||||
static_assert(sizeof(BlendMultiPass) == 8, "blend multi pass is 8 bytes");
|
||||
|
||||
BlendPass blend_second_pass;
|
||||
BlendMultiPass blend_multi_pass;
|
||||
|
||||
VSConstantBuffer cb_vs;
|
||||
PSConstantBuffer cb_ps;
|
||||
|
||||
@@ -1603,7 +1603,7 @@ void GSDevice11::DoMerge(GSTexture* sTex[3], GSVector4* sRect, GSTexture* dTex,
|
||||
|
||||
if (feedback_write_1)
|
||||
{
|
||||
StretchRect(sTex[0], full_r, sTex[2], dRect[2], m_convert.ps[static_cast<int>(ShaderConvert::YUV)].get(),
|
||||
StretchRect(dTex, full_r, sTex[2], dRect[2], m_convert.ps[static_cast<int>(ShaderConvert::YUV)].get(),
|
||||
m_merge.cb.get(), nullptr, linear);
|
||||
}
|
||||
}
|
||||
@@ -2000,9 +2000,9 @@ bool GSDevice11::CreateImGuiResources()
|
||||
// clang-format off
|
||||
static constexpr D3D11_INPUT_ELEMENT_DESC layout[] =
|
||||
{
|
||||
{ "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)IM_OFFSETOF(ImDrawVert, pos), D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)IM_OFFSETOF(ImDrawVert, uv), D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, (UINT)IM_OFFSETOF(ImDrawVert, col), D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)offsetof(ImDrawVert, pos), D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)offsetof(ImDrawVert, uv), D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, (UINT)offsetof(ImDrawVert, col), D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
@@ -2653,12 +2653,12 @@ void GSDevice11::RenderHW(GSHWDrawConfig& config)
|
||||
OMSetRenderTargets(hdr_rt ? hdr_rt : config.rt, config.ds, &config.scissor);
|
||||
DrawIndexedPrimitive();
|
||||
|
||||
if (config.blend_second_pass.enable)
|
||||
if (config.blend_multi_pass.enable)
|
||||
{
|
||||
config.ps.blend_hw = config.blend_second_pass.blend_hw;
|
||||
config.ps.dither = config.blend_second_pass.dither;
|
||||
config.ps.blend_hw = config.blend_multi_pass.blend_hw;
|
||||
config.ps.dither = config.blend_multi_pass.dither;
|
||||
SetupPS(config.ps, &config.cb_ps, config.sampler);
|
||||
SetupOM(config.depth, OMBlendSelector(config.colormask, config.blend_second_pass.blend), config.blend_second_pass.blend.constant);
|
||||
SetupOM(config.depth, OMBlendSelector(config.colormask, config.blend_multi_pass.blend), config.blend_multi_pass.blend.constant);
|
||||
DrawIndexedPrimitive();
|
||||
}
|
||||
|
||||
|
||||
@@ -3980,14 +3980,14 @@ void GSDevice12::RenderHW(GSHWDrawConfig& config)
|
||||
DrawIndexedPrimitive();
|
||||
|
||||
// blend second pass
|
||||
if (config.blend_second_pass.enable)
|
||||
if (config.blend_multi_pass.enable)
|
||||
{
|
||||
if (config.blend_second_pass.blend.constant_enable)
|
||||
SetBlendConstants(config.blend_second_pass.blend.constant);
|
||||
if (config.blend_multi_pass.blend.constant_enable)
|
||||
SetBlendConstants(config.blend_multi_pass.blend.constant);
|
||||
|
||||
pipe.bs = config.blend_second_pass.blend;
|
||||
pipe.ps.blend_hw = config.blend_second_pass.blend_hw;
|
||||
pipe.ps.dither = config.blend_second_pass.dither;
|
||||
pipe.bs = config.blend_multi_pass.blend;
|
||||
pipe.ps.blend_hw = config.blend_multi_pass.blend_hw;
|
||||
pipe.ps.dither = config.blend_multi_pass.dither;
|
||||
if (BindDrawPipeline(pipe))
|
||||
DrawIndexedPrimitive();
|
||||
}
|
||||
|
||||
@@ -4258,8 +4258,8 @@ void GSRendererHW::EmulateBlending(int rt_alpha_min, int rt_alpha_max, const boo
|
||||
// HW blend can be done in multiple passes when there's no overlap.
|
||||
// Blend second pass is only useful when texture barriers aren't supported.
|
||||
// Speed wise Texture barriers > blend second pass > texture copies.
|
||||
const bool blend_second_pass_support = !features.texture_barrier && no_prim_overlap && is_basic_blend;
|
||||
const bool bmix1_second_pass = blend_second_pass_support && blend_mix1 && (alpha_c0_high_max_one || alpha_c2_high_one) && m_conf.ps.blend_d == 2;
|
||||
const bool blend_multi_pass_support = !features.texture_barrier && no_prim_overlap && is_basic_blend;
|
||||
const bool bmix1_second_pass = blend_multi_pass_support && blend_mix1 && (alpha_c0_high_max_one || alpha_c2_high_one) && m_conf.ps.blend_d == 2;
|
||||
// We don't want to enable blend mix if we are doing a second pass, it's useless.
|
||||
blend_mix &= !bmix1_second_pass;
|
||||
|
||||
@@ -4323,7 +4323,7 @@ void GSRendererHW::EmulateBlending(int rt_alpha_min, int rt_alpha_max, const boo
|
||||
}
|
||||
else
|
||||
{
|
||||
const bool ad_second_pass = blend_second_pass_support && alpha_c1_high_no_rta_correct && COLCLAMP.CLAMP &&
|
||||
const bool ad_second_pass = blend_multi_pass_support && alpha_c1_high_no_rta_correct && COLCLAMP.CLAMP &&
|
||||
(blend_flag & (BLEND_HW3 | BLEND_HW5 | BLEND_HW6 | BLEND_HW7 | BLEND_HW9));
|
||||
|
||||
switch (GSConfig.AccurateBlendingUnit)
|
||||
@@ -4619,9 +4619,9 @@ void GSRendererHW::EmulateBlending(int rt_alpha_min, int rt_alpha_max, const boo
|
||||
m_conf.ps.rta_correction = rt->m_rt_alpha_scale;
|
||||
}
|
||||
|
||||
if (blend_second_pass_support)
|
||||
if (blend_multi_pass_support)
|
||||
{
|
||||
const HWBlend blend_second_pass = GSDevice::GetBlend(blend_index);
|
||||
const HWBlend blend_multi_pass = GSDevice::GetBlend(blend_index);
|
||||
if (bmix1_second_pass)
|
||||
{
|
||||
// Alpha = As or Af.
|
||||
@@ -4630,9 +4630,9 @@ void GSRendererHW::EmulateBlending(int rt_alpha_min, int rt_alpha_max, const boo
|
||||
blend.src = GSDevice::CONST_ONE;
|
||||
blend.dst = GSDevice::CONST_ONE;
|
||||
// Render pass 2: Blend the result (Cd) from render pass 1 with alpha range of 0-2.
|
||||
m_conf.blend_second_pass.enable = true;
|
||||
m_conf.blend_second_pass.blend_hw = static_cast<u8>(HWBlendType::SRC_ALPHA_DST_FACTOR);
|
||||
m_conf.blend_second_pass.blend = {true, GSDevice::DST_COLOR, (m_conf.ps.blend_c == 2) ? GSDevice::CONST_COLOR : GSDevice::SRC1_COLOR, GSDevice::OP_ADD, GSDevice::CONST_ONE, GSDevice::CONST_ZERO, m_conf.ps.blend_c == 2, AFIX};
|
||||
m_conf.blend_multi_pass.enable = true;
|
||||
m_conf.blend_multi_pass.blend_hw = static_cast<u8>(HWBlendType::SRC_ALPHA_DST_FACTOR);
|
||||
m_conf.blend_multi_pass.blend = {true, GSDevice::DST_COLOR, (m_conf.ps.blend_c == 2) ? GSDevice::CONST_COLOR : GSDevice::SRC1_COLOR, GSDevice::OP_ADD, GSDevice::CONST_ONE, GSDevice::CONST_ZERO, m_conf.ps.blend_c == 2, AFIX};
|
||||
}
|
||||
else if ((alpha_c0_high_max_one || alpha_c1_high_no_rta_correct || alpha_c2_high_one) && (blend_flag & BLEND_HW1))
|
||||
{
|
||||
@@ -4642,9 +4642,9 @@ void GSRendererHW::EmulateBlending(int rt_alpha_min, int rt_alpha_max, const boo
|
||||
m_conf.ps.blend_hw = static_cast<u8>(HWBlendType::SRC_HALF_ONE_DST_FACTOR);
|
||||
blend.dst = (m_conf.ps.blend_c == 1) ? GSDevice::DST_ALPHA : GSDevice::SRC1_COLOR;
|
||||
// Render pass 2: Take result (Cd) from render pass 1 and double it.
|
||||
m_conf.blend_second_pass.enable = true;
|
||||
m_conf.blend_second_pass.blend_hw = static_cast<u8>(HWBlendType::SRC_ONE_DST_FACTOR);
|
||||
m_conf.blend_second_pass.blend = {true, blend_second_pass.src, GSDevice::CONST_ONE, blend_second_pass.op, GSDevice::CONST_ONE, GSDevice::CONST_ZERO, false, 0};
|
||||
m_conf.blend_multi_pass.enable = true;
|
||||
m_conf.blend_multi_pass.blend_hw = static_cast<u8>(HWBlendType::SRC_ONE_DST_FACTOR);
|
||||
m_conf.blend_multi_pass.blend = {true, blend_multi_pass.src, GSDevice::CONST_ONE, blend_multi_pass.op, GSDevice::CONST_ONE, GSDevice::CONST_ZERO, false, 0};
|
||||
}
|
||||
else if (alpha_c1_high_no_rta_correct && (blend_flag & BLEND_HW3))
|
||||
{
|
||||
@@ -4652,8 +4652,8 @@ void GSRendererHW::EmulateBlending(int rt_alpha_min, int rt_alpha_max, const boo
|
||||
// Cs*Alpha, Cs*Alpha + Cd, Cd - Cs*Alpha.
|
||||
// Render pass 1: Do Cs*Alpha, Cs*Alpha + Cd or Cd - Cs*Alpha on first pass.
|
||||
// Render pass 2: Take result (Cd) from render pass 1 and either add or rev subtract Cs*Alpha based on the blend operation.
|
||||
m_conf.blend_second_pass.enable = true;
|
||||
m_conf.blend_second_pass.blend = {true, blend_second_pass.src, GSDevice::CONST_ONE, blend_second_pass.op, GSDevice::CONST_ONE, GSDevice::CONST_ZERO, false, 0};
|
||||
m_conf.blend_multi_pass.enable = true;
|
||||
m_conf.blend_multi_pass.blend = {true, blend_multi_pass.src, GSDevice::CONST_ONE, blend_multi_pass.op, GSDevice::CONST_ONE, GSDevice::CONST_ZERO, false, 0};
|
||||
}
|
||||
else if ((alpha_c0_high_max_one || alpha_c2_high_one) && (blend_flag & BLEND_HW4))
|
||||
{
|
||||
@@ -4667,9 +4667,9 @@ void GSRendererHW::EmulateBlending(int rt_alpha_min, int rt_alpha_max, const boo
|
||||
blend.dst = (m_conf.ps.blend_c == 2) ? GSDevice::CONST_COLOR : GSDevice::SRC1_COLOR;
|
||||
blend.op = GSDevice::OP_ADD;
|
||||
// Render pass 2: Add or subtract result of render pass 1(Cd) from Cs.
|
||||
m_conf.blend_second_pass.enable = true;
|
||||
m_conf.blend_second_pass.dither = dither * GSConfig.Dithering;
|
||||
m_conf.blend_second_pass.blend = {true, blend_second_pass.src, GSDevice::CONST_ONE, blend_second_pass.op, GSDevice::CONST_ONE, GSDevice::CONST_ZERO, false, 0};
|
||||
m_conf.blend_multi_pass.enable = true;
|
||||
m_conf.blend_multi_pass.dither = dither * GSConfig.Dithering;
|
||||
m_conf.blend_multi_pass.blend = {true, blend_multi_pass.src, GSDevice::CONST_ONE, blend_multi_pass.op, GSDevice::CONST_ONE, GSDevice::CONST_ZERO, false, 0};
|
||||
}
|
||||
else if (alpha_c1_high_no_rta_correct && (blend_flag & BLEND_HW5))
|
||||
{
|
||||
@@ -4677,9 +4677,9 @@ void GSRendererHW::EmulateBlending(int rt_alpha_min, int rt_alpha_max, const boo
|
||||
// Cd*Alpha - Cs*Alpha, Cs*Alpha - Cd*Alpha.
|
||||
// Render pass 1: Do (Cd - Cs)*Alpha, (Cs - Cd)*Alpha or Cd*Alpha on first pass.
|
||||
// Render pass 2: Take result (Cd) from render pass 1 and double it.
|
||||
m_conf.blend_second_pass.enable = true;
|
||||
m_conf.blend_second_pass.blend_hw = static_cast<u8>(HWBlendType::SRC_ONE_DST_FACTOR);
|
||||
m_conf.blend_second_pass.blend = {true, GSDevice::DST_COLOR, GSDevice::CONST_ONE, GSDevice::OP_ADD, GSDevice::CONST_ONE, GSDevice::CONST_ZERO, false, 0};
|
||||
m_conf.blend_multi_pass.enable = true;
|
||||
m_conf.blend_multi_pass.blend_hw = static_cast<u8>(HWBlendType::SRC_ONE_DST_FACTOR);
|
||||
m_conf.blend_multi_pass.blend = {true, GSDevice::DST_COLOR, GSDevice::CONST_ONE, GSDevice::OP_ADD, GSDevice::CONST_ONE, GSDevice::CONST_ZERO, false, 0};
|
||||
}
|
||||
else if (alpha_c1_high_no_rta_correct && (blend_flag & BLEND_HW6))
|
||||
{
|
||||
@@ -4690,9 +4690,9 @@ void GSRendererHW::EmulateBlending(int rt_alpha_min, int rt_alpha_max, const boo
|
||||
AFIX = 64;
|
||||
blend.src = GSDevice::CONST_COLOR;
|
||||
// Render pass 2: Take result (Cd) from render pass 1 and double it.
|
||||
m_conf.blend_second_pass.enable = true;
|
||||
m_conf.blend_second_pass.blend_hw = static_cast<u8>(HWBlendType::SRC_ONE_DST_FACTOR);
|
||||
m_conf.blend_second_pass.blend = {true, GSDevice::DST_COLOR, GSDevice::CONST_ONE, GSDevice::OP_ADD, GSDevice::CONST_ONE, GSDevice::CONST_ZERO, false, 0};
|
||||
m_conf.blend_multi_pass.enable = true;
|
||||
m_conf.blend_multi_pass.blend_hw = static_cast<u8>(HWBlendType::SRC_ONE_DST_FACTOR);
|
||||
m_conf.blend_multi_pass.blend = {true, GSDevice::DST_COLOR, GSDevice::CONST_ONE, GSDevice::OP_ADD, GSDevice::CONST_ONE, GSDevice::CONST_ZERO, false, 0};
|
||||
}
|
||||
else if (alpha_c1_high_no_rta_correct && (blend_flag & BLEND_HW7))
|
||||
{
|
||||
@@ -4704,9 +4704,9 @@ void GSRendererHW::EmulateBlending(int rt_alpha_min, int rt_alpha_max, const boo
|
||||
blend.dst = GSDevice::DST_ALPHA;
|
||||
blend.op = GSDevice::OP_SUBTRACT;
|
||||
// Render pass 2: Take result (Cd) from render pass 1 and double it.
|
||||
m_conf.blend_second_pass.enable = true;
|
||||
m_conf.blend_second_pass.blend_hw = static_cast<u8>(HWBlendType::SRC_ONE_DST_FACTOR);
|
||||
m_conf.blend_second_pass.blend = {true, GSDevice::DST_COLOR, GSDevice::CONST_ONE, GSDevice::OP_ADD, GSDevice::CONST_ONE, GSDevice::CONST_ZERO, false, 0};
|
||||
m_conf.blend_multi_pass.enable = true;
|
||||
m_conf.blend_multi_pass.blend_hw = static_cast<u8>(HWBlendType::SRC_ONE_DST_FACTOR);
|
||||
m_conf.blend_multi_pass.blend = {true, GSDevice::DST_COLOR, GSDevice::CONST_ONE, GSDevice::OP_ADD, GSDevice::CONST_ONE, GSDevice::CONST_ZERO, false, 0};
|
||||
}
|
||||
else if (blend_flag & BLEND_HW8)
|
||||
{
|
||||
@@ -4714,9 +4714,9 @@ void GSRendererHW::EmulateBlending(int rt_alpha_min, int rt_alpha_max, const boo
|
||||
// Cs*(1 + Alpha).
|
||||
// Render pass 1: Do Cs.
|
||||
// Render pass 2: Try to double Cs, then take result (Cd) from render pass 1 and add Cs*Alpha to it.
|
||||
m_conf.blend_second_pass.enable = true;
|
||||
m_conf.blend_second_pass.blend_hw = static_cast<u8>(HWBlendType::SRC_DOUBLE);
|
||||
m_conf.blend_second_pass.blend = {true, GSDevice::DST_ALPHA, GSDevice::CONST_ONE, blend_second_pass.op, GSDevice::CONST_ONE, GSDevice::CONST_ZERO, false, 0};
|
||||
m_conf.blend_multi_pass.enable = true;
|
||||
m_conf.blend_multi_pass.blend_hw = static_cast<u8>(HWBlendType::SRC_DOUBLE);
|
||||
m_conf.blend_multi_pass.blend = {true, GSDevice::DST_ALPHA, GSDevice::CONST_ONE, blend_multi_pass.op, GSDevice::CONST_ONE, GSDevice::CONST_ZERO, false, 0};
|
||||
}
|
||||
else if (alpha_c1_high_no_rta_correct && (blend_flag & BLEND_HW9))
|
||||
{
|
||||
@@ -4724,12 +4724,12 @@ void GSRendererHW::EmulateBlending(int rt_alpha_min, int rt_alpha_max, const boo
|
||||
// Cs*(1 - Alpha).
|
||||
// Render pass 1: Do Cs*(1 - Alpha).
|
||||
// Render pass 2: Take result (Cd) from render pass 1 and subtract Cs*Alpha from it.
|
||||
m_conf.blend_second_pass.enable = true;
|
||||
m_conf.blend_second_pass.blend = {true, GSDevice::DST_ALPHA, GSDevice::CONST_ONE, GSDevice::OP_REV_SUBTRACT, GSDevice::CONST_ONE, GSDevice::CONST_ZERO, false, 0};
|
||||
m_conf.blend_multi_pass.enable = true;
|
||||
m_conf.blend_multi_pass.blend = {true, GSDevice::DST_ALPHA, GSDevice::CONST_ONE, GSDevice::OP_REV_SUBTRACT, GSDevice::CONST_ONE, GSDevice::CONST_ZERO, false, 0};
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_conf.blend_second_pass.enable && blend_flag & BLEND_HW1)
|
||||
if (!m_conf.blend_multi_pass.enable && blend_flag & BLEND_HW1)
|
||||
{
|
||||
m_conf.ps.blend_hw = static_cast<u8>(HWBlendType::SRC_ONE_DST_FACTOR);
|
||||
}
|
||||
@@ -4737,27 +4737,27 @@ void GSRendererHW::EmulateBlending(int rt_alpha_min, int rt_alpha_max, const boo
|
||||
{
|
||||
m_conf.ps.blend_hw = static_cast<u8>(HWBlendType::SRC_ALPHA_DST_FACTOR);
|
||||
}
|
||||
else if (!m_conf.blend_second_pass.enable && alpha_c1_high_no_rta_correct && (blend_flag & BLEND_HW3))
|
||||
else if (!m_conf.blend_multi_pass.enable && alpha_c1_high_no_rta_correct && (blend_flag & BLEND_HW3))
|
||||
{
|
||||
m_conf.ps.blend_hw = static_cast<u8>(HWBlendType::SRC_DOUBLE);
|
||||
}
|
||||
|
||||
if (m_conf.ps.blend_c == 2 && (m_conf.ps.blend_hw == static_cast<u8>(HWBlendType::SRC_ALPHA_DST_FACTOR)
|
||||
|| m_conf.ps.blend_hw == static_cast<u8>(HWBlendType::SRC_HALF_ONE_DST_FACTOR)
|
||||
|| m_conf.blend_second_pass.blend_hw == static_cast<u8>(HWBlendType::SRC_ALPHA_DST_FACTOR)))
|
||||
|| m_conf.blend_multi_pass.blend_hw == static_cast<u8>(HWBlendType::SRC_ALPHA_DST_FACTOR)))
|
||||
{
|
||||
m_conf.cb_ps.TA_MaxDepth_Af.a = static_cast<float>(AFIX) / 128.0f;
|
||||
}
|
||||
|
||||
const GSDevice::BlendFactor src_factor_alpha = m_conf.blend_second_pass.enable ? GSDevice::CONST_ZERO : GSDevice::CONST_ONE;
|
||||
const GSDevice::BlendFactor dst_factor_alpha = m_conf.blend_second_pass.enable ? GSDevice::CONST_ONE : GSDevice::CONST_ZERO;
|
||||
const GSDevice::BlendFactor src_factor_alpha = m_conf.blend_multi_pass.enable ? GSDevice::CONST_ZERO : GSDevice::CONST_ONE;
|
||||
const GSDevice::BlendFactor dst_factor_alpha = m_conf.blend_multi_pass.enable ? GSDevice::CONST_ONE : GSDevice::CONST_ZERO;
|
||||
m_conf.blend = {true, blend.src, blend.dst, blend.op, src_factor_alpha, dst_factor_alpha, m_conf.ps.blend_c == 2, AFIX};
|
||||
|
||||
// Remove second color output when unused. Works around bugs in some drivers (e.g. Intel).
|
||||
m_conf.ps.no_color1 = !GSDevice::IsDualSourceBlendFactor(m_conf.blend.src_factor) &&
|
||||
!GSDevice::IsDualSourceBlendFactor(m_conf.blend.dst_factor) &&
|
||||
!GSDevice::IsDualSourceBlendFactor(m_conf.blend_second_pass.blend.src_factor) &&
|
||||
!GSDevice::IsDualSourceBlendFactor(m_conf.blend_second_pass.blend.dst_factor);
|
||||
!GSDevice::IsDualSourceBlendFactor(m_conf.blend_multi_pass.blend.src_factor) &&
|
||||
!GSDevice::IsDualSourceBlendFactor(m_conf.blend_multi_pass.blend.dst_factor);
|
||||
}
|
||||
|
||||
// Notify the shader that it needs to invert rounding
|
||||
@@ -5959,10 +5959,10 @@ __ri void GSRendererHW::DrawPrims(GSTextureCache::Target* rt, GSTextureCache::Ta
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_conf.blend_second_pass.enable)
|
||||
if (m_conf.blend_multi_pass.enable)
|
||||
{
|
||||
m_conf.blend_second_pass.blend.src_factor_alpha = GSDevice::SRC1_ALPHA;
|
||||
m_conf.blend_second_pass.blend.dst_factor_alpha = GSDevice::INV_SRC1_ALPHA;
|
||||
m_conf.blend_multi_pass.blend.src_factor_alpha = GSDevice::SRC1_ALPHA;
|
||||
m_conf.blend_multi_pass.blend.dst_factor_alpha = GSDevice::INV_SRC1_ALPHA;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -6106,7 +6106,7 @@ __ri void GSRendererHW::DrawPrims(GSTextureCache::Target* rt, GSTextureCache::Ta
|
||||
|
||||
m_conf.ps.fba = m_context->FBA.FBA;
|
||||
|
||||
if (m_conf.ps.dither || m_conf.blend_second_pass.dither)
|
||||
if (m_conf.ps.dither || m_conf.blend_multi_pass.dither)
|
||||
{
|
||||
const GIFRegDIMX& DIMX = m_draw_env->DIMX;
|
||||
GL_DBG("DITHERING mode %d (%d)", (GSConfig.Dithering == 3) ? "Force 32bit" : ((GSConfig.Dithering == 0) ? "Disabled" : "Enabled"), GSConfig.Dithering);
|
||||
@@ -6122,7 +6122,7 @@ __ri void GSRendererHW::DrawPrims(GSTextureCache::Target* rt, GSTextureCache::Ta
|
||||
else if (GSConfig.Dithering > 2)
|
||||
{
|
||||
m_conf.ps.dither = GSConfig.Dithering;
|
||||
m_conf.blend_second_pass.dither = GSConfig.Dithering;
|
||||
m_conf.blend_multi_pass.dither = GSConfig.Dithering;
|
||||
}
|
||||
|
||||
if (PRIM->FGE)
|
||||
|
||||
@@ -6305,16 +6305,17 @@ void GSTextureCache::Target::Update(bool cannot_scale)
|
||||
m_rt_alpha_scale = true;
|
||||
}
|
||||
|
||||
ShaderConvert depth_shader = upscaled ? ShaderConvert::RGBA8_TO_FLOAT32_BILN : ShaderConvert::RGBA8_TO_FLOAT32;
|
||||
const bool linear = upscaled && GSConfig.UserHacks_BilinearHack != GSBilinearDirtyMode::ForceNearest;
|
||||
ShaderConvert depth_shader = linear ? ShaderConvert::RGBA8_TO_FLOAT32_BILN : ShaderConvert::RGBA8_TO_FLOAT32;
|
||||
if (m_type == DepthStencil && GSLocalMemory::m_psm[m_TEX0.PSM].trbpp != 32)
|
||||
{
|
||||
switch (GSLocalMemory::m_psm[m_TEX0.PSM].trbpp)
|
||||
{
|
||||
case 24:
|
||||
depth_shader = upscaled ? ShaderConvert::RGBA8_TO_FLOAT24_BILN : ShaderConvert::RGBA8_TO_FLOAT24;
|
||||
depth_shader = linear ? ShaderConvert::RGBA8_TO_FLOAT24_BILN : ShaderConvert::RGBA8_TO_FLOAT24;
|
||||
break;
|
||||
case 16:
|
||||
depth_shader = upscaled ? ShaderConvert::RGB5A1_TO_FLOAT16_BILN : ShaderConvert::RGB5A1_TO_FLOAT16;
|
||||
depth_shader = linear ? ShaderConvert::RGB5A1_TO_FLOAT16_BILN : ShaderConvert::RGB5A1_TO_FLOAT16;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -2088,9 +2088,9 @@ bool GSDeviceOGL::CreateImGuiProgram()
|
||||
glEnableVertexAttribArray(0);
|
||||
glEnableVertexAttribArray(1);
|
||||
glEnableVertexAttribArray(2);
|
||||
glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, sizeof(ImDrawVert), (GLvoid*)IM_OFFSETOF(ImDrawVert, pos));
|
||||
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, sizeof(ImDrawVert), (GLvoid*)IM_OFFSETOF(ImDrawVert, uv));
|
||||
glVertexAttribPointer(2, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(ImDrawVert), (GLvoid*)IM_OFFSETOF(ImDrawVert, col));
|
||||
glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, sizeof(ImDrawVert), (GLvoid*)offsetof(ImDrawVert, pos));
|
||||
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, sizeof(ImDrawVert), (GLvoid*)offsetof(ImDrawVert, uv));
|
||||
glVertexAttribPointer(2, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(ImDrawVert), (GLvoid*)offsetof(ImDrawVert, col));
|
||||
|
||||
glBindVertexArray(GLState::vao);
|
||||
return true;
|
||||
@@ -2612,21 +2612,21 @@ void GSDeviceOGL::RenderHW(GSHWDrawConfig& config)
|
||||
|
||||
SendHWDraw(config, psel.ps.IsFeedbackLoop());
|
||||
|
||||
if (config.blend_second_pass.enable)
|
||||
if (config.blend_multi_pass.enable)
|
||||
{
|
||||
if (config.blend.IsEffective(config.colormask))
|
||||
{
|
||||
OMSetBlendState(config.blend_second_pass.blend.enable, s_gl_blend_factors[config.blend_second_pass.blend.src_factor],
|
||||
s_gl_blend_factors[config.blend_second_pass.blend.dst_factor], s_gl_blend_ops[config.blend_second_pass.blend.op],
|
||||
s_gl_blend_factors[config.blend_second_pass.blend.src_factor_alpha], s_gl_blend_factors[config.blend_second_pass.blend.dst_factor_alpha],
|
||||
config.blend_second_pass.blend.constant_enable, config.blend_second_pass.blend.constant);
|
||||
OMSetBlendState(config.blend_multi_pass.blend.enable, s_gl_blend_factors[config.blend_multi_pass.blend.src_factor],
|
||||
s_gl_blend_factors[config.blend_multi_pass.blend.dst_factor], s_gl_blend_ops[config.blend_multi_pass.blend.op],
|
||||
s_gl_blend_factors[config.blend_multi_pass.blend.src_factor_alpha], s_gl_blend_factors[config.blend_multi_pass.blend.dst_factor_alpha],
|
||||
config.blend_multi_pass.blend.constant_enable, config.blend_multi_pass.blend.constant);
|
||||
}
|
||||
else
|
||||
{
|
||||
OMSetBlendState();
|
||||
}
|
||||
psel.ps.blend_hw = config.blend_second_pass.blend_hw;
|
||||
psel.ps.dither = config.blend_second_pass.dither;
|
||||
psel.ps.blend_hw = config.blend_multi_pass.blend_hw;
|
||||
psel.ps.dither = config.blend_multi_pass.dither;
|
||||
SetupPipeline(psel);
|
||||
SendHWDraw(config, psel.ps.IsFeedbackLoop());
|
||||
}
|
||||
|
||||
@@ -5826,14 +5826,14 @@ void GSDeviceVK::RenderHW(GSHWDrawConfig& config)
|
||||
SendHWDraw(config, draw_rt, config.require_one_barrier, config.require_full_barrier, skip_first_barrier);
|
||||
|
||||
// blend second pass
|
||||
if (config.blend_second_pass.enable)
|
||||
if (config.blend_multi_pass.enable)
|
||||
{
|
||||
if (config.blend_second_pass.blend.constant_enable)
|
||||
SetBlendConstants(config.blend_second_pass.blend.constant);
|
||||
if (config.blend_multi_pass.blend.constant_enable)
|
||||
SetBlendConstants(config.blend_multi_pass.blend.constant);
|
||||
|
||||
pipe.bs = config.blend_second_pass.blend;
|
||||
pipe.ps.blend_hw = config.blend_second_pass.blend_hw;
|
||||
pipe.ps.dither = config.blend_second_pass.dither;
|
||||
pipe.bs = config.blend_multi_pass.blend;
|
||||
pipe.ps.blend_hw = config.blend_multi_pass.blend_hw;
|
||||
pipe.ps.dither = config.blend_multi_pass.dither;
|
||||
if (BindDrawPipeline(pipe))
|
||||
{
|
||||
// TODO: This probably should have barriers, in case we want to use it conditionally.
|
||||
|
||||
@@ -5370,7 +5370,7 @@ void FullscreenUI::DrawSaveStateSelector(bool is_loading)
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_ChildBg, ModAlpha(UIPrimaryColor, 0.9f));
|
||||
|
||||
if (ImGui::BeginChild("state_titlebar", heading_size, false, ImGuiWindowFlags_NavFlattened))
|
||||
if (ImGui::BeginChild("state_titlebar", heading_size, ImGuiChildFlags_NavFlattened, 0))
|
||||
{
|
||||
BeginNavBar();
|
||||
if (NavButton(ICON_PF_BACKWARD, true, true))
|
||||
@@ -5391,7 +5391,7 @@ void FullscreenUI::DrawSaveStateSelector(bool is_loading)
|
||||
bool close_handled = false;
|
||||
if (s_save_state_selector_open &&
|
||||
ImGui::BeginChild("state_list", ImVec2(io.DisplaySize.x, io.DisplaySize.y - LayoutScale(LAYOUT_FOOTER_HEIGHT) - heading_size.y),
|
||||
false, ImGuiWindowFlags_NavFlattened))
|
||||
ImGuiChildFlags_NavFlattened, 0))
|
||||
{
|
||||
BeginMenuButtons();
|
||||
|
||||
|
||||
@@ -590,6 +590,9 @@ void ImGuiFullscreen::ForceKeyNavEnabled()
|
||||
|
||||
bool ImGuiFullscreen::WantsToCloseMenu()
|
||||
{
|
||||
// Used for the key macros below.
|
||||
ImGuiContext& g = *ImGui::GetCurrentContext();
|
||||
|
||||
// Wait for the Close button to be released, THEN pressed
|
||||
if (s_close_button_state == 0)
|
||||
{
|
||||
@@ -679,7 +682,7 @@ bool ImGuiFullscreen::BeginFullscreenColumnWindow(float start, float end, const
|
||||
|
||||
ImGui::SetCursorPos(pos);
|
||||
|
||||
return ImGui::BeginChild(name, size, false, ImGuiWindowFlags_NavFlattened);
|
||||
return ImGui::BeginChild(name, size, ImGuiChildFlags_NavFlattened, 0);
|
||||
}
|
||||
|
||||
void ImGuiFullscreen::EndFullscreenColumnWindow()
|
||||
|
||||
@@ -335,9 +335,9 @@ void ImGuiManager::SetStyle()
|
||||
colors[ImGuiCol_ResizeGripActive] = ImVec4(0.27f, 0.32f, 0.38f, 1.00f);
|
||||
colors[ImGuiCol_Tab] = ImVec4(0.11f, 0.15f, 0.17f, 1.00f);
|
||||
colors[ImGuiCol_TabHovered] = ImVec4(0.33f, 0.38f, 0.46f, 1.00f);
|
||||
colors[ImGuiCol_TabActive] = ImVec4(0.27f, 0.32f, 0.38f, 1.00f);
|
||||
colors[ImGuiCol_TabUnfocused] = ImVec4(0.11f, 0.15f, 0.17f, 1.00f);
|
||||
colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.11f, 0.15f, 0.17f, 1.00f);
|
||||
colors[ImGuiCol_TabSelected] = ImVec4(0.27f, 0.32f, 0.38f, 1.00f);
|
||||
colors[ImGuiCol_TabDimmed] = ImVec4(0.11f, 0.15f, 0.17f, 1.00f);
|
||||
colors[ImGuiCol_TabDimmedSelected] = ImVec4(0.11f, 0.15f, 0.17f, 1.00f);
|
||||
colors[ImGuiCol_PlotLines] = ImVec4(0.61f, 0.61f, 0.61f, 1.00f);
|
||||
colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
|
||||
colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2002-2024 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include "common/CocoaTools.h"
|
||||
#include "common/FileSystem.h"
|
||||
#include "common/Path.h"
|
||||
#include "common/SettingsInterface.h"
|
||||
@@ -1859,7 +1860,15 @@ void Pcsx2Config::ClearInvalidPerGameConfiguration(SettingsInterface* si)
|
||||
|
||||
void EmuFolders::SetAppRoot()
|
||||
{
|
||||
const std::string program_path = FileSystem::GetProgramPath();
|
||||
std::string program_path = FileSystem::GetProgramPath();
|
||||
#ifdef __APPLE__
|
||||
const auto bundle_path = CocoaTools::GetNonTranslocatedBundlePath();
|
||||
if (bundle_path.has_value())
|
||||
{
|
||||
// On macOS, override with the bundle path if launched from a bundle.
|
||||
program_path = bundle_path.value();
|
||||
}
|
||||
#endif
|
||||
Console.WriteLnFmt("Program Path: {}", program_path);
|
||||
|
||||
AppRoot = Path::Canonicalize(Path::GetDirectory(program_path));
|
||||
@@ -1870,12 +1879,17 @@ void EmuFolders::SetAppRoot()
|
||||
|
||||
bool EmuFolders::SetResourcesDirectory()
|
||||
{
|
||||
#ifndef __APPLE__
|
||||
// On Windows/Linux, these are in the binary directory.
|
||||
Resources = Path::Combine(AppRoot, "resources");
|
||||
#ifndef __APPLE__
|
||||
#ifndef PCSX2_APP_DATADIR
|
||||
// On Windows/Linux, these are in the binary directory.
|
||||
Resources = Path::Combine(AppRoot, "resources");
|
||||
#else
|
||||
Resources = Path::Canonicalize(Path::Combine(AppRoot, PCSX2_APP_DATADIR "/resources"));
|
||||
#endif
|
||||
#else
|
||||
// On macOS, this is in the bundle resources directory.
|
||||
Resources = Path::Canonicalize(Path::Combine(AppRoot, "../Resources"));
|
||||
const std::string program_path = FileSystem::GetProgramPath();
|
||||
Resources = Path::Canonicalize(Path::Combine(Path::GetDirectory(program_path), "../Resources"));
|
||||
#endif
|
||||
|
||||
Console.WriteLnFmt("Resources Directory: {}", Resources);
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
/// Version number for GS and other shaders. Increment whenever any of the contents of the
|
||||
/// shaders change, to invalidate the cache.
|
||||
static constexpr u32 SHADER_CACHE_VERSION = 54;
|
||||
static constexpr u32 SHADER_CACHE_VERSION = 55;
|
||||
|
||||
@@ -133,7 +133,8 @@ namespace usb_pad
|
||||
{
|
||||
case USB_DT_REPORT:
|
||||
ret = sizeof(hid_report_descriptor);
|
||||
memcpy(data, hid_report_descriptor, ret);
|
||||
std::memcpy(data, hid_report_descriptor, ret);
|
||||
p->actual_length = ret;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -166,7 +166,8 @@ namespace usb_pad
|
||||
{
|
||||
case USB_DT_REPORT:
|
||||
ret = sizeof(hid_report_descriptor);
|
||||
memcpy(data, hid_report_descriptor, ret);
|
||||
std::memcpy(data, hid_report_descriptor, ret);
|
||||
p->actual_length = ret;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -216,7 +216,8 @@ namespace usb_pad
|
||||
{
|
||||
case USB_DT_REPORT:
|
||||
ret = sizeof(hid_report_descriptor);
|
||||
memcpy(data, hid_report_descriptor, ret);
|
||||
std::memcpy(data, hid_report_descriptor, ret);
|
||||
p->actual_length = ret;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -296,7 +296,7 @@ namespace usb_pad
|
||||
{
|
||||
case USB_DT_REPORT:
|
||||
ret = sizeof(hid_report_descriptor);
|
||||
memcpy(data, hid_report_descriptor, ret);
|
||||
std::memcpy(data, hid_report_descriptor, ret);
|
||||
p->actual_length = ret;
|
||||
break;
|
||||
default:
|
||||
@@ -308,7 +308,6 @@ namespace usb_pad
|
||||
if (length > 0)
|
||||
{
|
||||
p->actual_length = 0;
|
||||
//p->status = USB_RET_SUCCESS;
|
||||
}
|
||||
break;
|
||||
case SET_IDLE:
|
||||
|
||||
Reference in New Issue
Block a user