mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-08-10 08:04:52 +02:00
Compare commits
18
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e947ac730 | ||
|
|
1198000ff3 | ||
|
|
2855c0631d | ||
|
|
163edd643b | ||
|
|
624717dfad | ||
|
|
4055a19a1d | ||
|
|
7fd49498ab | ||
|
|
93f10864c1 | ||
|
|
4f58055e76 | ||
|
|
96c1307f30 | ||
|
|
77e6a0f870 | ||
|
|
2ce2cb6459 | ||
|
|
779d5c4339 | ||
|
|
fe55f87289 | ||
|
|
ab6bc30aec | ||
|
|
5793dbc1ef | ||
|
|
773f96a312 | ||
|
|
af9b61a9f7 |
@@ -12928,6 +12928,7 @@ SCUS-97584:
|
||||
autoFlush: 2
|
||||
preloadFrameData: 1
|
||||
nativeScaling: 2 # Fixes post-processing.
|
||||
halfPixelOffset: 4 # Aligns post bloom.
|
||||
SCUS-97589:
|
||||
name: "NBA '08 featuring The Life Vol.3"
|
||||
region: "NTSC-U"
|
||||
@@ -21923,6 +21924,7 @@ SLES-52940:
|
||||
region: "PAL-M3"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 5 # Fixes double image and aligns glow effects.
|
||||
nativeScaling: 1 # Fixes depth blur.
|
||||
SLES-52941:
|
||||
name: "Gungrave - Overdose"
|
||||
region: "PAL-M3"
|
||||
@@ -45830,6 +45832,7 @@ SLPM-65791:
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 5 # Fixes double image and aligns glow effects.
|
||||
nativeScaling: 1 # Fixes depth blur.
|
||||
SLPM-65793:
|
||||
name: "SSX3 [EA BEST HITS]"
|
||||
name-sort: "SSX3 [EA BEST HITS]"
|
||||
@@ -69376,6 +69379,7 @@ SLUS-20969:
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 5 # Fixes double image and aligns glow effects.
|
||||
nativeScaling: 1 # Fixes depth blur.
|
||||
SLUS-20970:
|
||||
name: "Rumble Roses"
|
||||
region: "NTSC-U"
|
||||
@@ -75906,6 +75910,7 @@ SLUS-29132:
|
||||
region: "NTSC-U"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 5 # Fixes double image and aligns glow effects.
|
||||
nativeScaling: 1 # Fixes depth blur.
|
||||
SLUS-29133:
|
||||
name: "Namco Transmission Demo Disc Vol.2"
|
||||
region: "NTSC-U"
|
||||
@@ -76708,6 +76713,7 @@ TLES-52940:
|
||||
region: "PAL-E"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 5 # Fixes double image and aligns glow effects.
|
||||
nativeScaling: 1 # Fixes depth blur.
|
||||
TLES-53544:
|
||||
name: "Pro Evolution Soccer 5 Beta Trial Code"
|
||||
region: "PAL-E"
|
||||
|
||||
@@ -428,7 +428,7 @@
|
||||
03000000380700008084000000000000,Mad Catz TE2 PS4 Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
|
||||
030000002a0600001024000000000000,Matricom,a:b0,b:b1,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:a3,righty:a4,start:b9,x:b2,y:b3,platform:Windows,
|
||||
030000009f000000adbb000000000000,MaxJoypad Virtual Controller,a:b1,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,
|
||||
030000008f0e00001330000000000000,Mayflash Adapter,a:b1,b:b2,back:b8,dpdown:h0.8,dpleft:h0.2,dpright:h0.1,dpup:h0.4,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a3~,righty:a2,start:b9,x:b0,y:b3,platform:Windows,
|
||||
030000008f0e00001330000000000000,Mayflash N64 Adapter,a:b1,b:b2,back:b8,dpdown:h0.8,dpleft:h0.2,dpright:h0.1,dpup:h0.4,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a3~,righty:a2,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000250900000128000000000000,Mayflash Arcade Stick,a:b1,b:b2,back:b8,leftshoulder:b0,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b3,righttrigger:b7,start:b9,x:b5,y:b6,platform:Windows,
|
||||
03000000242f00003700000000000000,Mayflash F101,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000790000003018000000000000,Mayflash F300 Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
|
||||
@@ -516,6 +516,7 @@
|
||||
030000006f0e00000901000000000000,PDP PS3 Versus Fighting,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
|
||||
030000006f0e00008901000000000000,PDP Realmz 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,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
030000008f0e00004100000000000000,PlaySega,a:b1,b:b0,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b5,righttrigger:b2,start:b8,x:b4,y:b3,platform:Windows,
|
||||
03000000d620000020a7000000000000,PowerA Advantage Nintendo Switch 2 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,misc2:b16,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000d620000011a7000000000000,PowerA Core 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:Windows,
|
||||
03000000dd62000015a7000000000000,PowerA Fusion Nintendo Switch Arcade Stick,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:Windows,
|
||||
03000000d620000012a7000000000000,PowerA Fusion Nintendo Switch Fight Pad,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:Windows,
|
||||
@@ -804,6 +805,8 @@
|
||||
030000006f0e00000302000000000000,Victrix PS4 Pro Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
|
||||
030000006f0e00000702000000000000,Victrix PS4 Pro Fightstick,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,rightshoulder:b5,righttrigger:b7,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
|
||||
0300000034120000adbe000000000000,vJoy Device,a:b0,b:b1,back:b15,dpdown:b6,dpleft:b7,dpright:b8,dpup:b5,guide:b16,leftshoulder:b9,leftstick:b13,lefttrigger:b11,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b14,righttrigger:b12,rightx:a3,righty:a4,start:b4,x:b2,y:b3,platform:Windows,
|
||||
03000000d23800001010000000000000,Void Genesis,a:b0,b:b1,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b2,leftstick:b9,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b18,misc2:b21,misc3:b20,paddle1:b22,paddle2:b15,paddle3:b23,paddle4:b17,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a5,start:b19,x:b3,y:b4,platform:Windows,
|
||||
03000000d23800001210000000000000,Void Genesis,a:b0,b:b1,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b2,leftstick:b9,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b18,misc2:b21,misc3:b20,paddle1:b22,paddle2:b15,paddle3:b23,paddle4:b17,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a5,start:b19,x:b3,y:b4,platform:Windows,
|
||||
03000000120c0000ab57000000000000,Warrior Joypad JS083,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
|
||||
030000007e0500003003000000000000,Wii U Pro,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,leftshoulder:b6,leftstick:b11,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b12,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Windows,
|
||||
0300000032150000030a000000000000,Wildcat,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
|
||||
@@ -587,7 +587,7 @@ void main()
|
||||
|
||||
#define PS_FEEDBACK_LOOP_IS_NEEDED_RT (PS_TEX_IS_FB == 1 || AFAIL_NEEDS_RT || PS_FBMASK || SW_BLEND_NEEDS_RT || SW_AD_TO_HW || (PS_DATE >= 5))
|
||||
#define PS_FEEDBACK_LOOP_IS_NEEDED_DEPTH (AFAIL_NEEDS_DEPTH || ZTST_NEEDS_DEPTH || AA1_NEEDS_DEPTH)
|
||||
#define ZWRITE (PS_ZCLAMP || PS_ZFLOOR || SW_DEPTH || PS_FEEDBACK_LOOP_IS_NEEDED_DEPTH)
|
||||
#define ZWRITE (PS_ZCLAMP || PS_ZFLOOR || PS_FEEDBACK_LOOP_IS_NEEDED_DEPTH)
|
||||
|
||||
#define PS_RETURN_COLOR_ROV (!PS_NO_COLOR && PS_ROV_COLOR)
|
||||
#define PS_RETURN_COLOR (!PS_NO_COLOR && !PS_ROV_COLOR)
|
||||
|
||||
+1198
-1193
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -163,7 +163,7 @@ static bool OpenGSDevice(GSRendererType renderer, bool clear_state_on_fail, bool
|
||||
|
||||
if (!g_gs_device->SetGPUTimingEnabled(true))
|
||||
GSConfig.OsdShowGPU = false;
|
||||
if (!g_gs_device->SetGPUPipelineStatisticsEnabled(true))
|
||||
if (GSConfig.OsdShowGPUStats && !g_gs_device->SetGPUPipelineStatisticsEnabled(true))
|
||||
GSConfig.OsdShowGPUStats = false;
|
||||
|
||||
Console.WriteLn(Color_StrongGreen, "%s Graphics Driver Info:", GSDevice::RenderAPIToString(new_api));
|
||||
|
||||
@@ -531,6 +531,7 @@ REG_END2
|
||||
__forceinline bool IsOpaque() const { return ((A == B || (C == 2 && FIX == 0)) && D == 0) || (A == 0 && B == D && C == 2 && FIX == 0x80); }
|
||||
__forceinline bool IsOpaque(int amin, int amax) const { return ((A == B || amax == 0) && D == 0) || (A == 0 && B == D && amin == 0x80 && amax == 0x80); }
|
||||
__forceinline bool IsCd() const { return (A == B) && (D == 1); }
|
||||
__forceinline bool IsAdditive() const { return (A == 0 && B == 2 && (C != 2 || FIX != 0) && D == 1); }
|
||||
|
||||
// output will be Cd, Cs is discarded
|
||||
__forceinline bool IsCdOutput() const { return (C == 2 && D != 1 && FIX == 0x00); }
|
||||
|
||||
@@ -603,7 +603,7 @@ bool GSDevice11::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
}
|
||||
|
||||
// 1x1 dummy texture.
|
||||
const GSTexture::Usage null_usage = m_uav_texture ? GSTexture::ShaderWriteTarget : GSTexture::Feedback;
|
||||
const GSTexture::Usage null_usage = m_uav_texture ? GSTexture::ShaderWriteTarget : GSTexture::FeedbackTarget;
|
||||
m_null_texture = CreateSurface(null_usage, 1, 1, 1, GSTexture::Format::Color);
|
||||
if (!m_null_texture)
|
||||
return false;
|
||||
@@ -1167,7 +1167,7 @@ void GSDevice11::DestroyTimestampQueries()
|
||||
m_read_timestamp_query = 0;
|
||||
m_write_timestamp_query = 0;
|
||||
m_waiting_timestamp_queries = 0;
|
||||
m_timestamp_query_started = 0;
|
||||
m_timestamp_query_started = false;
|
||||
}
|
||||
|
||||
void GSDevice11::PopTimestampQuery()
|
||||
@@ -1286,13 +1286,13 @@ void GSDevice11::DestroyPipelineStatisticsQueries()
|
||||
return;
|
||||
|
||||
if (m_pipeline_statistics_query_started)
|
||||
m_ctx->End(m_pipeline_statistics_queries[m_write_timestamp_query].get());
|
||||
m_ctx->End(m_pipeline_statistics_queries[m_write_pipeline_statistics_query].get());
|
||||
|
||||
m_timestamp_queries = {};
|
||||
m_read_timestamp_query = 0;
|
||||
m_write_timestamp_query = 0;
|
||||
m_waiting_timestamp_queries = 0;
|
||||
m_timestamp_query_started = 0;
|
||||
m_pipeline_statistics_queries = {};
|
||||
m_read_pipeline_statistics_query = 0;
|
||||
m_write_pipeline_statistics_query = 0;
|
||||
m_waiting_pipeline_statistics_queries = 0;
|
||||
m_pipeline_statistics_query_started = false;
|
||||
}
|
||||
|
||||
void GSDevice11::PopPipelineStatisticsQuery()
|
||||
|
||||
@@ -10709,8 +10709,10 @@ int GSRendererHW::IsScalingDraw(GSTextureCache::Source* src, bool no_gaps)
|
||||
IsMipMapDraw() || GSLocalMemory::m_psm[m_cached_ctx.TEX0.PSM].trbpp <= 8)
|
||||
return 0;
|
||||
|
||||
const bool is_smaller = draw_size.x <= (tex_size.x * 0.75f) && draw_size.y <= (tex_size.y * 0.75f);
|
||||
const bool is_smaller_and_writing_back = draw_size.x < tex_size.x && draw_size.y < tex_size.y && next_ctx.FRAME.Block() == m_cached_ctx.TEX0.TBP0 && next_ctx.TEX0.TBP0 == m_cached_ctx.FRAME.Block();
|
||||
// Should usually be 2x but some games like Monster House goes from 512x448 -> 128x128
|
||||
const bool is_downscale = m_cached_ctx.TEX0.TBW >= m_cached_ctx.FRAME.FBW && draw_size.x <= (tex_size.x * 0.75f) && draw_size.y <= (tex_size.y * 0.75f);
|
||||
const bool is_downscale = m_cached_ctx.TEX0.TBW >= m_cached_ctx.FRAME.FBW && (is_smaller || is_smaller_and_writing_back);
|
||||
// Check we're getting most of the texture and not just stenciling a part of it.
|
||||
// Only allow non-bilineared downscales if it's most of the target (misdetections of shadows in Naruto, Transformers etc), otherwise it's fine.
|
||||
const GSVector4i src_valid = src->m_from_target ? src->m_from_target->m_valid : src->m_valid_rect;
|
||||
@@ -10734,7 +10736,8 @@ int GSRendererHW::IsScalingDraw(GSTextureCache::Source* src, bool no_gaps)
|
||||
}
|
||||
|
||||
// Last ditched check if it's doing a lot of small draws exactly the same which could be recursive lighting bloom.
|
||||
if (m_vt.m_primclass == GS_SPRITE_CLASS && m_index->tail > 2 && !no_gaps_or_single_sprite && m_context->TEX1.MMAG == 1 && !m_context->ALPHA.IsOpaque())
|
||||
if (m_vt.m_primclass == GS_SPRITE_CLASS && m_index->tail > 2 && !no_gaps_or_single_sprite && m_context->TEX1.MMAG == 1 && is_target_src && (m_cached_ctx.TEST.ZTST == ZTST_ALWAYS || m_cached_ctx.TEST.ZTE == 0) &&
|
||||
!m_context->ALPHA.IsOpaque() && GSLocalMemory::m_psm[m_cached_ctx.FRAME.PSM].bpp == GSLocalMemory::m_psm[m_cached_ctx.TEX0.PSM].bpp)
|
||||
{
|
||||
GSVertex* v = &m_vertex->buff[0];
|
||||
float tw = 1 << src->m_TEX0.TW;
|
||||
@@ -10745,7 +10748,10 @@ int GSRendererHW::IsScalingDraw(GSTextureCache::Source* src, bool no_gaps)
|
||||
const int first_x = (v[1].XYZ.X - v[0].XYZ.X) >> 4;
|
||||
const int first_y = (v[1].XYZ.Y - v[0].XYZ.Y) >> 4;
|
||||
|
||||
if (first_x > first_u && first_y > first_v && !no_resize && std::abs(draw_size.x - first_x) <= 4 && std::abs(draw_size.y - first_y) <= 4)
|
||||
const u32 half_color_mask = (m_vt.m_min.c == GSVector4i(64, 64, 64, 64)).mask() & 0xfff;
|
||||
const bool possible_fake_bilinear = no_resize && PRIM->ABE && m_context->ALPHA.IsAdditive() && m_cached_ctx.TEX0.TFX == TFX_MODULATE && m_vt.m_eq.rgba && half_color_mask == 0xfff;
|
||||
|
||||
if (first_x >= first_u && first_y >= first_v && (!no_resize || possible_fake_bilinear) && ((draw_size.x != first_x && draw_size.y != first_y) || (tex_size.x != first_u && tex_size.y != first_v)) && std::abs(draw_size.x - first_x) <= 4 && std::abs(draw_size.y - first_y) <= 4)
|
||||
{
|
||||
for (u32 i = 2; i < m_index->tail; i += 2)
|
||||
{
|
||||
@@ -10754,14 +10760,14 @@ int GSRendererHW::IsScalingDraw(GSTextureCache::Source* src, bool no_gaps)
|
||||
const int next_x = (v[i + 1].XYZ.X - v[i].XYZ.X) >> 4;
|
||||
const int next_y = (v[i + 1].XYZ.Y - v[i].XYZ.Y) >> 4;
|
||||
|
||||
if (std::abs(draw_size.x - next_x) > 4 || std::abs(draw_size.y - next_y) > 4)
|
||||
if (std::abs(draw_size.x - next_x) > 4 || std::abs(draw_size.y - next_y) > 4 || (draw_size.x == next_x && tex_size.x == next_u) || (draw_size.y == next_y && tex_size.y == next_v))
|
||||
break;
|
||||
|
||||
if (next_u != first_u || next_v != first_v || next_x != first_x || next_y != first_y)
|
||||
break;
|
||||
|
||||
if (i + 2 >= m_index->tail)
|
||||
return 2;
|
||||
return (is_target_src && src->m_from_target->m_downscaled) ? -1 : 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1292,7 +1292,7 @@ bool GSDeviceOGL::SetGPUPipelineStatisticsEnabled(bool enabled)
|
||||
else
|
||||
DestroyPipelineStatisticsQueries();
|
||||
|
||||
return true;
|
||||
return (enabled == m_gpu_pipeline_statistics_enabled);
|
||||
}
|
||||
|
||||
void GSDeviceOGL::DrawPrimitive()
|
||||
|
||||
@@ -1150,7 +1150,7 @@ GPUPipelineStatistics GSDeviceVK::GetAndResetAccumulatedGPUPipelineStatistics()
|
||||
bool GSDeviceVK::SetGPUPipelineStatisticsEnabled(bool enabled)
|
||||
{
|
||||
m_gpu_pipeline_statistics_enabled = enabled && m_gpu_pipeline_statistics_supported;
|
||||
return true;
|
||||
return (enabled == m_gpu_pipeline_statistics_enabled);
|
||||
}
|
||||
|
||||
void GSDeviceVK::ScanForCommandBufferCompletion()
|
||||
@@ -5418,6 +5418,17 @@ void GSDeviceVK::PSSetROVs(GSTexture* rt, GSTexture* ds, bool write_rt, bool wri
|
||||
PSSetShaderResource(TFX_TEXTURE_DEPTH_ROV, nullptr, false);
|
||||
}
|
||||
|
||||
if (IsDeviceNVIDIA() && InRenderPass())
|
||||
{
|
||||
// Nvidia doesn't like switching ROV targets mid-render pass, doing so causes flickering or missing geometry.
|
||||
// End the render pass to avoid such issues.
|
||||
if (vkRt != oldVkRt || vkDs != oldVkDs)
|
||||
{
|
||||
GL_INS("VK: Ending render pass due to UAV switch");
|
||||
EndRenderPass();
|
||||
}
|
||||
}
|
||||
|
||||
if (GSConfig.HWROVBarriersVK)
|
||||
{
|
||||
// This is to fix issues with some systems that seem to require barriers even with FSI.
|
||||
|
||||
@@ -170,24 +170,12 @@ void FullscreenUI::ApplyLayoutSettings(const SettingsInterface* bsi)
|
||||
return InputLayout::Playstation;
|
||||
if (mode == "nintendo")
|
||||
return InputLayout::Nintendo;
|
||||
if (mode == "generic")
|
||||
return InputLayout::Generic;
|
||||
return InputLayout::Unknown;
|
||||
};
|
||||
|
||||
switch (parse_glyph_layout(glyph_mode))
|
||||
{
|
||||
case InputLayout::Xbox:
|
||||
InputManager::SetGamepadIconPreference(InputLayout::Xbox);
|
||||
break;
|
||||
case InputLayout::Playstation:
|
||||
InputManager::SetGamepadIconPreference(InputLayout::Playstation);
|
||||
break;
|
||||
case InputLayout::Nintendo:
|
||||
InputManager::SetGamepadIconPreference(InputLayout::Nintendo);
|
||||
break;
|
||||
default:
|
||||
InputManager::SetGamepadIconPreference(InputLayout::Unknown);
|
||||
break;
|
||||
}
|
||||
InputManager::SetGamepadIconPreference(parse_glyph_layout(glyph_mode));
|
||||
|
||||
const InputLayout layout = ImGuiFullscreen::GetGamepadLayout();
|
||||
|
||||
@@ -557,6 +545,7 @@ void FullscreenUI::Shutdown(bool clear_state)
|
||||
CloseCoverDownloaderWindow();
|
||||
s_cover_image_map.clear();
|
||||
s_game_list_sorted_entries = {};
|
||||
s_last_unsorted_entries = {};
|
||||
s_game_list_directories_cache = {};
|
||||
s_game_cheat_unlabelled_count = 0;
|
||||
s_enabled_game_cheat_cache = {};
|
||||
@@ -2467,7 +2456,6 @@ void FullscreenUI::PopulateGameListEntryList()
|
||||
static int s_last_sort = -1;
|
||||
static bool s_last_reverse = false;
|
||||
static bool s_last_prefer_eng = false;
|
||||
static std::vector<const GameList::Entry*> s_last_unsorted_entries;
|
||||
|
||||
// Sort can be expensive, try to avoid when possible
|
||||
const u32 count = GameList::GetEntryCount();
|
||||
|
||||
@@ -369,6 +369,9 @@ namespace FullscreenUI
|
||||
inline std::vector<const GameList::Entry*> s_game_list_sorted_entries;
|
||||
inline GameListView s_game_list_view = GameListView::Grid;
|
||||
|
||||
// Cached list of unsorted game list entries; used to detect changes and re-sort when needed
|
||||
inline std::vector<const GameList::Entry*> s_last_unsorted_entries;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Background
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -2296,12 +2296,14 @@ void FullscreenUI::DrawInterfaceSettingsPage()
|
||||
FSUI_NSTR("Xbox"),
|
||||
FSUI_NSTR("PlayStation"),
|
||||
FSUI_NSTR("Nintendo"),
|
||||
FSUI_NSTR("Generic"),
|
||||
};
|
||||
static constexpr const char* glyph_values[] = {
|
||||
"auto",
|
||||
"xbox",
|
||||
"playstation",
|
||||
"nintendo",
|
||||
"generic",
|
||||
};
|
||||
size_t glyph_index = std::size(glyph_values);
|
||||
for (size_t i = 0; i < std::size(glyph_values); i++)
|
||||
@@ -6322,6 +6324,7 @@ TRANSLATE_NOOP("FullscreenUI", "Tile");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Xbox");
|
||||
TRANSLATE_NOOP("FullscreenUI", "PlayStation");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Nintendo");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Generic");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enabled");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Disabled");
|
||||
TRANSLATE_NOOP("FullscreenUI", "2% [1 FPS (NTSC) / 1 FPS (PAL)]");
|
||||
|
||||
@@ -971,22 +971,10 @@ InputLayout ImGuiFullscreen::GetGamepadLayout()
|
||||
static InputLayout GetEffectiveGlyphLayout()
|
||||
{
|
||||
const InputLayout preferred_layout = InputManager::GetGamepadIconPreference();
|
||||
if (preferred_layout == InputLayout::Xbox || preferred_layout == InputLayout::Playstation || preferred_layout == InputLayout::Nintendo)
|
||||
if (preferred_layout != InputLayout::Unknown)
|
||||
return preferred_layout;
|
||||
|
||||
const InputLayout detected_layout = ImGuiFullscreen::GetGamepadLayout();
|
||||
switch (detected_layout)
|
||||
{
|
||||
case InputLayout::Playstation:
|
||||
return InputLayout::Playstation;
|
||||
case InputLayout::Xbox:
|
||||
return InputLayout::Xbox;
|
||||
case InputLayout::Nintendo:
|
||||
return InputLayout::Nintendo;
|
||||
case InputLayout::Unknown:
|
||||
default:
|
||||
return InputLayout::Playstation;
|
||||
}
|
||||
return ImGuiFullscreen::GetGamepadLayout();
|
||||
}
|
||||
|
||||
ImGuiFullscreen::GamepadGlyphs ImGuiFullscreen::GetGamepadGlyphs()
|
||||
@@ -994,16 +982,17 @@ ImGuiFullscreen::GamepadGlyphs ImGuiFullscreen::GetGamepadGlyphs()
|
||||
const InputLayout layout = GetEffectiveGlyphLayout();
|
||||
const bool xbox = (layout == InputLayout::Xbox);
|
||||
const bool nintendo = (layout == InputLayout::Nintendo);
|
||||
const bool unknown = (layout == InputLayout::Unknown || layout == InputLayout::Generic);
|
||||
return {
|
||||
nintendo ? ICON_PF_BUTTON_B : (xbox ? ICON_PF_BUTTON_A : ICON_PF_BUTTON_CROSS),
|
||||
nintendo ? ICON_PF_BUTTON_A : (xbox ? ICON_PF_BUTTON_B : ICON_PF_BUTTON_CIRCLE),
|
||||
nintendo ? ICON_PF_BUTTON_Y : (xbox ? ICON_PF_BUTTON_X : ICON_PF_BUTTON_SQUARE),
|
||||
nintendo ? ICON_PF_BUTTON_X : (xbox ? ICON_PF_BUTTON_Y : ICON_PF_BUTTON_TRIANGLE),
|
||||
unknown ? ICON_PF_BUTTON_DOWN_A : (nintendo ? ICON_PF_BUTTON_B : (xbox ? ICON_PF_BUTTON_A : ICON_PF_BUTTON_CROSS)),
|
||||
unknown ? ICON_PF_BUTTON_RIGHT_B : (nintendo ? ICON_PF_BUTTON_A : (xbox ? ICON_PF_BUTTON_B : ICON_PF_BUTTON_CIRCLE)),
|
||||
unknown ? ICON_PF_BUTTON_LEFT_X : (nintendo ? ICON_PF_BUTTON_Y : (xbox ? ICON_PF_BUTTON_X : ICON_PF_BUTTON_SQUARE)),
|
||||
unknown ? ICON_PF_BUTTON_UP_Y : (nintendo ? ICON_PF_BUTTON_X : (xbox ? ICON_PF_BUTTON_Y : ICON_PF_BUTTON_TRIANGLE)),
|
||||
xbox ? ICON_PF_XBOX_DPAD : ICON_PF_DPAD,
|
||||
xbox ? ICON_PF_XBOX_DPAD_LEFT_RIGHT : ICON_PF_DPAD_LEFT_RIGHT,
|
||||
xbox ? ICON_PF_XBOX_DPAD_UP_DOWN : ICON_PF_DPAD_UP_DOWN,
|
||||
nintendo ? ICON_PF_MINUS : (xbox ? ICON_PF_SHARE_CAPTURE : ICON_PF_SELECT_SHARE),
|
||||
nintendo ? ICON_PF_PLUS : (xbox ? ICON_PF_BURGER_MENU : ICON_PF_START),
|
||||
nintendo ? ICON_PF_MINUS : ((xbox || unknown) ? ICON_PF_SHARE_CAPTURE : ICON_PF_SELECT_SHARE),
|
||||
nintendo ? ICON_PF_PLUS : ((xbox || unknown) ? ICON_PF_BURGER_MENU : ICON_PF_START),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace InputManager
|
||||
static float ApplySingleBindingScale(float sensitivity, float deadzone, float value);
|
||||
|
||||
static void AddHotkeyBindings(SettingsInterface& si, bool is_profile);
|
||||
static void AddPadBindings(SettingsInterface& si, u32 pad, bool is_profile);
|
||||
static void AddPadBindings(SettingsInterface& si, u32 pad, bool is_profile, SettingsInterface* nav_si);
|
||||
static void AddUSBBindings(SettingsInterface& si, u32 port, bool is_profile);
|
||||
static void UpdateContinuedVibration();
|
||||
static void GenerateRelativeMouseEvents();
|
||||
@@ -874,7 +874,7 @@ void InputManager::AddHotkeyBindings(SettingsInterface& si, bool is_profile)
|
||||
}
|
||||
}
|
||||
|
||||
void InputManager::AddPadBindings(SettingsInterface& si, u32 pad_index, bool is_profile)
|
||||
void InputManager::AddPadBindings(SettingsInterface& si, u32 pad_index, bool is_profile, SettingsInterface* nav_si)
|
||||
{
|
||||
const Pad::ControllerType type = EmuConfig.Pad.Ports[pad_index].Type;
|
||||
|
||||
@@ -913,30 +913,30 @@ void InputManager::AddPadBindings(SettingsInterface& si, u32 pad_index, bool is_
|
||||
Pad::SetControllerState(pad_index, bind_index, ApplySingleBindingScale(sensitivity, deadzone, value));
|
||||
}},
|
||||
bi.bind_type, si, section.c_str(), bi.name, is_profile);
|
||||
}
|
||||
|
||||
// Build reverse maps for controller navigation; user bindings take priority over static defaults.
|
||||
if (bi.generic_mapping != GenericInputBinding::Unknown)
|
||||
// So per-game bindings never affect FullscreenUI navigation.
|
||||
if (nav_si && bi.generic_mapping != GenericInputBinding::Unknown)
|
||||
{
|
||||
for (const std::string& binding_str : nav_si->GetStringList(section.c_str(), bi.name))
|
||||
{
|
||||
for (const std::string& binding_str : bindings)
|
||||
{
|
||||
InputBindingKey bkey;
|
||||
InputSource* bsrc;
|
||||
if (!ParseBindingAndGetSource(binding_str, &bkey, &bsrc))
|
||||
continue;
|
||||
InputBindingKey bkey;
|
||||
InputSource* bsrc;
|
||||
if (!ParseBindingAndGetSource(binding_str, &bkey, &bsrc))
|
||||
continue;
|
||||
|
||||
if (bkey.source_subtype == InputSubclass::ControllerButton)
|
||||
{
|
||||
s_controller_button_generic_map.emplace(bkey.MaskDirection(), bi.generic_mapping);
|
||||
}
|
||||
else if (bkey.source_subtype == InputSubclass::ControllerAxis)
|
||||
{
|
||||
auto& entry = s_controller_axis_generic_map[bkey.MaskDirection()];
|
||||
// Negate modifier = negative half of axis (e.g. "-Axis0" → LeftStickLeft)
|
||||
if (bkey.modifier == InputModifier::Negate)
|
||||
entry[0] = bi.generic_mapping;
|
||||
else
|
||||
entry[1] = bi.generic_mapping;
|
||||
}
|
||||
if (bkey.source_subtype == InputSubclass::ControllerButton)
|
||||
{
|
||||
s_controller_button_generic_map.emplace(bkey.MaskDirection(), bi.generic_mapping);
|
||||
}
|
||||
else if (bkey.source_subtype == InputSubclass::ControllerAxis)
|
||||
{
|
||||
auto& entry = s_controller_axis_generic_map[bkey.MaskDirection()];
|
||||
// Negate modifier = negative half of axis (e.g. "-Axis0" → LeftStickLeft)
|
||||
if (bkey.modifier == InputModifier::Negate)
|
||||
entry[0] = bi.generic_mapping;
|
||||
else
|
||||
entry[1] = bi.generic_mapping;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1312,27 +1312,42 @@ bool InputManager::PreprocessEvent(InputBindingKey key, float value, GenericInpu
|
||||
}
|
||||
else if (key.source_subtype == InputSubclass::ControllerButton)
|
||||
{
|
||||
// User binding takes priority; fall back to the generic_key passed by the source (static table).
|
||||
const auto it = s_controller_button_generic_map.find(key.MaskDirection());
|
||||
const GenericInputBinding resolved = (it != s_controller_button_generic_map.end()) ? it->second : generic_key;
|
||||
// Static table takes priority; falls back to the Shared/global map only if the source has none (e.g. DInput).
|
||||
GenericInputBinding resolved = generic_key;
|
||||
if (resolved == GenericInputBinding::Unknown)
|
||||
{
|
||||
const auto it = s_controller_button_generic_map.find(key.MaskDirection());
|
||||
if (it != s_controller_button_generic_map.end())
|
||||
resolved = it->second;
|
||||
}
|
||||
if (resolved != GenericInputBinding::Unknown)
|
||||
{
|
||||
const u32 controller_id = (static_cast<u32>(key.source_type) << 8) | key.source_index;
|
||||
const InputLayout layout = s_input_sources[static_cast<u32>(InputSourceType::SDL)]->GetControllerLayout(key.source_index);
|
||||
const InputLayout layout = s_input_sources[static_cast<u32>(key.source_type)]->GetControllerLayout(key.source_index);
|
||||
if (ImGuiManager::ProcessGenericInputEvent(resolved, layout, value, controller_id) && value != 0.0f)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (key.source_subtype == InputSubclass::ControllerAxis)
|
||||
{
|
||||
// User binding takes priority; fall back to the neg/pos keys passed by the source (static table).
|
||||
const auto it = s_controller_axis_generic_map.find(key.MaskDirection());
|
||||
const GenericInputBinding neg = (it != s_controller_axis_generic_map.end()) ? it->second[0] : axis_neg_key;
|
||||
const GenericInputBinding pos = (it != s_controller_axis_generic_map.end()) ? it->second[1] : axis_pos_key;
|
||||
// Same priority as above; map only fills in directions the source couldn't resolve.
|
||||
GenericInputBinding neg = axis_neg_key;
|
||||
GenericInputBinding pos = axis_pos_key;
|
||||
if (neg == GenericInputBinding::Unknown || pos == GenericInputBinding::Unknown)
|
||||
{
|
||||
const auto it = s_controller_axis_generic_map.find(key.MaskDirection());
|
||||
if (it != s_controller_axis_generic_map.end())
|
||||
{
|
||||
if (neg == GenericInputBinding::Unknown)
|
||||
neg = it->second[0];
|
||||
if (pos == GenericInputBinding::Unknown)
|
||||
pos = it->second[1];
|
||||
}
|
||||
}
|
||||
if (neg != GenericInputBinding::Unknown || pos != GenericInputBinding::Unknown)
|
||||
{
|
||||
const u32 controller_id = (static_cast<u32>(key.source_type) << 8) | key.source_index;
|
||||
const InputLayout layout = s_input_sources[static_cast<u32>(InputSourceType::SDL)]->GetControllerLayout(key.source_index);
|
||||
const InputLayout layout = s_input_sources[static_cast<u32>(key.source_type)]->GetControllerLayout(key.source_index);
|
||||
ImGuiManager::ProcessGenericAxisEvent(neg, pos, layout, value, controller_id);
|
||||
}
|
||||
}
|
||||
@@ -1619,10 +1634,11 @@ void InputManager::ReloadBindings(SettingsInterface& si, SettingsInterface& bind
|
||||
// Hotkeys use the base configuration, except if the custom hotkeys option is enabled.
|
||||
AddHotkeyBindings(hotkey_binding_si, is_hotkey_profile);
|
||||
|
||||
// If there's an input profile, we load pad bindings from it alone, rather than
|
||||
// falling back to the base configuration.
|
||||
// nav_si is always the base config, so per-game profiles can't affect UI navigation.
|
||||
const LayeredSettingsInterface& lsi = static_cast<LayeredSettingsInterface&>(si);
|
||||
SettingsInterface* base_si = lsi.GetLayer(LayeredSettingsInterface::LAYER_BASE);
|
||||
for (u32 pad = 0; pad < Pad::NUM_CONTROLLER_PORTS; pad++)
|
||||
AddPadBindings(binding_si, pad, is_binding_profile);
|
||||
AddPadBindings(binding_si, pad, is_binding_profile, base_si);
|
||||
|
||||
constexpr float ui_ctrl_range = 100.0f;
|
||||
constexpr float pointer_sensitivity = 0.05f;
|
||||
|
||||
@@ -52,7 +52,8 @@ enum class InputLayout : u8
|
||||
Unknown,
|
||||
Xbox,
|
||||
Playstation,
|
||||
Nintendo
|
||||
Nintendo,
|
||||
Generic
|
||||
};
|
||||
|
||||
enum class InputModifier : u32
|
||||
|
||||
+105
-18
@@ -225,6 +225,38 @@ static constexpr const char* s_sdl_button_names[] = {
|
||||
"Misc 5", // SDL_GAMEPAD_BUTTON_MISC5
|
||||
"Misc 6", // SDL_GAMEPAD_BUTTON_MISC6
|
||||
};
|
||||
static constexpr const char* s_sdl_button_standard_names[] = {
|
||||
"A", // SDL_GAMEPAD_BUTTON_SOUTH
|
||||
"B", // SDL_GAMEPAD_BUTTON_EAST
|
||||
"X", // SDL_GAMEPAD_BUTTON_WEST
|
||||
"Y", // SDL_GAMEPAD_BUTTON_NORTH
|
||||
};
|
||||
static constexpr const char* s_sdl_button_xbox360_names[] = {
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_SOUTH
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_EAST
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_WEST
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_NORTH
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_BACK
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_GUIDE
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_START
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_LEFT_STICK
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_RIGHT_STICK
|
||||
"LB", // SDL_GAMEPAD_BUTTON_LEFT_SHOULDER
|
||||
"RB", // SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER
|
||||
};
|
||||
static constexpr const char* s_sdl_button_xboxone_names[] = {
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_SOUTH
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_EAST
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_WEST
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_NORTH
|
||||
"View", // SDL_GAMEPAD_BUTTON_BACK
|
||||
"Xbox", // SDL_GAMEPAD_BUTTON_GUIDE
|
||||
"Menu", // SDL_GAMEPAD_BUTTON_START
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_LEFT_STICK
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_RIGHT_STICK
|
||||
"LB", // SDL_GAMEPAD_BUTTON_LEFT_SHOULDER
|
||||
"RB", // SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER
|
||||
};
|
||||
static constexpr const char* s_sdl_button_ps3_names[] = {
|
||||
"Cross", // SDL_GAMEPAD_BUTTON_SOUTH
|
||||
"Circle", // SDL_GAMEPAD_BUTTON_EAST
|
||||
@@ -269,26 +301,39 @@ static constexpr const char* s_sdl_button_ps5_names[] = {
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_DPAD_RIGHT
|
||||
"Mute", // SDL_GAMEPAD_BUTTON_MISC1
|
||||
};
|
||||
static constexpr const char* s_sdl_button_nintendo_names[] = {
|
||||
"B", // SDL_GAMEPAD_BUTTON_SOUTH
|
||||
"A", // SDL_GAMEPAD_BUTTON_EAST
|
||||
"Y", // SDL_GAMEPAD_BUTTON_WEST
|
||||
"X", // SDL_GAMEPAD_BUTTON_NORTH
|
||||
"Minus", // SDL_GAMEPAD_BUTTON_BACK
|
||||
"Home", // SDL_GAMEPAD_BUTTON_GUIDE
|
||||
"Plus", // SDL_GAMEPAD_BUTTON_START
|
||||
"Left Stick", // SDL_GAMEPAD_BUTTON_LEFT_STICK
|
||||
"Right Stick", // SDL_GAMEPAD_BUTTON_RIGHT_STICK
|
||||
"L", // SDL_GAMEPAD_BUTTON_LEFT_SHOULDER
|
||||
"R", // SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER
|
||||
};
|
||||
|
||||
static constexpr const char* const* s_sdl_button_names_list[] = {
|
||||
s_sdl_button_names, // SDL_GAMEPAD_TYPE_UNKNOWN
|
||||
s_sdl_button_names, // SDL_GAMEPAD_TYPE_STANDARD
|
||||
s_sdl_button_names, // SDL_GAMEPAD_TYPE_XBOX360
|
||||
s_sdl_button_names, // SDL_GAMEPAD_TYPE_XBOXONE
|
||||
s_sdl_button_standard_names, // SDL_GAMEPAD_TYPE_STANDARD
|
||||
s_sdl_button_xbox360_names, // SDL_GAMEPAD_TYPE_XBOX360
|
||||
s_sdl_button_xboxone_names, // SDL_GAMEPAD_TYPE_XBOXONE
|
||||
s_sdl_button_ps3_names, // SDL_GAMEPAD_TYPE_PS3
|
||||
s_sdl_button_ps4_names, // SDL_GAMEPAD_TYPE_PS4
|
||||
s_sdl_button_ps5_names, // SDL_GAMEPAD_TYPE_PS5
|
||||
// Switch
|
||||
s_sdl_button_nintendo_names, // SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO
|
||||
};
|
||||
static constexpr size_t s_sdl_button_namesize_list[] = {
|
||||
std::size(s_sdl_button_names), // SDL_GAMEPAD_TYPE_UNKNOWN
|
||||
std::size(s_sdl_button_names), // SDL_GAMEPAD_TYPE_STANDARD
|
||||
std::size(s_sdl_button_names), // SDL_GAMEPAD_TYPE_XBOX360
|
||||
std::size(s_sdl_button_names), // SDL_GAMEPAD_TYPE_XBOXONE
|
||||
std::size(s_sdl_button_standard_names), // SDL_GAMEPAD_TYPE_STANDARD
|
||||
std::size(s_sdl_button_xbox360_names), // SDL_GAMEPAD_TYPE_XBOX360
|
||||
std::size(s_sdl_button_xboxone_names), // SDL_GAMEPAD_TYPE_XBOXONE
|
||||
std::size(s_sdl_button_ps3_names), // SDL_GAMEPAD_TYPE_PS3
|
||||
std::size(s_sdl_button_ps4_names), // SDL_GAMEPAD_TYPE_PS4
|
||||
std::size(s_sdl_button_ps5_names), // SDL_GAMEPAD_TYPE_PS5
|
||||
// Switch
|
||||
std::size(s_sdl_button_nintendo_names), // SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO
|
||||
};
|
||||
|
||||
static constexpr const char* s_sdl_face_button_icons[] = {
|
||||
@@ -308,12 +353,52 @@ static constexpr const char* s_sdl_button_icons[] = {
|
||||
ICON_PF_BUTTON_LEFT_X, // SDL_GAMEPAD_BUTTON_WEST
|
||||
ICON_PF_BUTTON_UP_Y, // SDL_GAMEPAD_BUTTON_NORTH
|
||||
ICON_PF_SHARE_CAPTURE, // SDL_GAMEPAD_BUTTON_BACK
|
||||
ICON_PF_XBOX, // SDL_GAMEPAD_BUTTON_GUIDE
|
||||
ICON_PF_HOME_MENU, // SDL_GAMEPAD_BUTTON_GUIDE
|
||||
ICON_PF_BURGER_MENU, // SDL_GAMEPAD_BUTTON_START
|
||||
ICON_PF_LEFT_ANALOG_CLICK, // SDL_GAMEPAD_BUTTON_LEFT_STICK
|
||||
ICON_PF_RIGHT_ANALOG_CLICK, // SDL_GAMEPAD_BUTTON_RIGHT_STICK
|
||||
ICON_PF_LEFT_SHOULDER_LB, // SDL_GAMEPAD_BUTTON_LEFT_SHOULDER
|
||||
ICON_PF_RIGHT_SHOULDER_RB, // SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER
|
||||
ICON_PF_DPAD_UP, // SDL_GAMEPAD_BUTTON_DPAD_UP
|
||||
ICON_PF_DPAD_DOWN, // SDL_GAMEPAD_BUTTON_DPAD_DOWN
|
||||
ICON_PF_DPAD_LEFT, // SDL_GAMEPAD_BUTTON_DPAD_LEFT
|
||||
ICON_PF_DPAD_RIGHT, // SDL_GAMEPAD_BUTTON_DPAD_RIGHT
|
||||
};
|
||||
static constexpr const char* s_sdl_button_standard_icons[] = {
|
||||
ICON_PF_BUTTON_A, // SDL_GAMEPAD_BUTTON_SOUTH
|
||||
ICON_PF_BUTTON_B, // SDL_GAMEPAD_BUTTON_EAST
|
||||
ICON_PF_BUTTON_X, // SDL_GAMEPAD_BUTTON_WEST
|
||||
ICON_PF_BUTTON_Y, // SDL_GAMEPAD_BUTTON_NORTH
|
||||
};
|
||||
static constexpr const char* s_sdl_button_xbox360_icons[] = {
|
||||
ICON_PF_BUTTON_A, // SDL_GAMEPAD_BUTTON_SOUTH
|
||||
ICON_PF_BUTTON_B, // SDL_GAMEPAD_BUTTON_EAST
|
||||
ICON_PF_BUTTON_X, // SDL_GAMEPAD_BUTTON_WEST
|
||||
ICON_PF_BUTTON_Y, // SDL_GAMEPAD_BUTTON_NORTH
|
||||
ICON_PF_JOYCON_DPAD_LEFT, // SDL_GAMEPAD_BUTTON_BACK
|
||||
ICON_PF_XBOX, // SDL_GAMEPAD_BUTTON_GUIDE
|
||||
ICON_PF_JOYCON_DPAD_RIGHT, // SDL_GAMEPAD_BUTTON_START
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_LEFT_STICK
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_RIGHT_STICK
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_LEFT_SHOULDER
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER
|
||||
ICON_PF_XBOX_DPAD_UP, // SDL_GAMEPAD_BUTTON_DPAD_UP
|
||||
ICON_PF_XBOX_DPAD_DOWN, // SDL_GAMEPAD_BUTTON_DPAD_DOWN
|
||||
ICON_PF_XBOX_DPAD_LEFT, // SDL_GAMEPAD_BUTTON_DPAD_LEFT
|
||||
ICON_PF_XBOX_DPAD_RIGHT, // SDL_GAMEPAD_BUTTON_DPAD_RIGHT
|
||||
};
|
||||
static constexpr const char* s_sdl_button_xboxone_icons[] = {
|
||||
ICON_PF_BUTTON_A, // SDL_GAMEPAD_BUTTON_SOUTH
|
||||
ICON_PF_BUTTON_B, // SDL_GAMEPAD_BUTTON_EAST
|
||||
ICON_PF_BUTTON_X, // SDL_GAMEPAD_BUTTON_WEST
|
||||
ICON_PF_BUTTON_Y, // SDL_GAMEPAD_BUTTON_NORTH
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_BACK
|
||||
ICON_PF_XBOX, // SDL_GAMEPAD_BUTTON_GUIDE
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_START
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_LEFT_STICK
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_RIGHT_STICK
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_LEFT_SHOULDER
|
||||
nullptr, // SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER
|
||||
ICON_PF_XBOX_DPAD_UP, // SDL_GAMEPAD_BUTTON_DPAD_UP
|
||||
ICON_PF_XBOX_DPAD_DOWN, // SDL_GAMEPAD_BUTTON_DPAD_DOWN
|
||||
ICON_PF_XBOX_DPAD_LEFT, // SDL_GAMEPAD_BUTTON_DPAD_LEFT
|
||||
@@ -402,9 +487,9 @@ static constexpr const char* s_sdl_button_nintendo_icons[] = {
|
||||
};
|
||||
static constexpr const char* const* s_sdl_button_icons_list[] = {
|
||||
s_sdl_button_icons, // SDL_GAMEPAD_TYPE_UNKNOWN
|
||||
s_sdl_button_icons, // SDL_GAMEPAD_TYPE_STANDARD
|
||||
s_sdl_button_icons, // SDL_GAMEPAD_TYPE_XBOX360
|
||||
s_sdl_button_icons, // SDL_GAMEPAD_TYPE_XBOXONE
|
||||
s_sdl_button_standard_icons, // SDL_GAMEPAD_TYPE_STANDARD
|
||||
s_sdl_button_xbox360_icons, // SDL_GAMEPAD_TYPE_XBOX360
|
||||
s_sdl_button_xboxone_icons, // SDL_GAMEPAD_TYPE_XBOXONE
|
||||
s_sdl_button_ps3_icons, // SDL_GAMEPAD_TYPE_PS3
|
||||
s_sdl_button_ps4_icons, // SDL_GAMEPAD_TYPE_PS4
|
||||
s_sdl_button_ps5_icons, // SDL_GAMEPAD_TYPE_PS5
|
||||
@@ -412,9 +497,9 @@ static constexpr const char* const* s_sdl_button_icons_list[] = {
|
||||
};
|
||||
static constexpr size_t s_sdl_button_iconsize_list[] = {
|
||||
std::size(s_sdl_button_icons), // SDL_GAMEPAD_TYPE_UNKNOWN
|
||||
std::size(s_sdl_button_icons), // SDL_GAMEPAD_TYPE_STANDARD
|
||||
std::size(s_sdl_button_icons), // SDL_GAMEPAD_TYPE_XBOX360
|
||||
std::size(s_sdl_button_icons), // SDL_GAMEPAD_TYPE_XBOXONE
|
||||
std::size(s_sdl_button_standard_icons), // SDL_GAMEPAD_TYPE_STANDARD
|
||||
std::size(s_sdl_button_xbox360_icons), // SDL_GAMEPAD_TYPE_XBOX360
|
||||
std::size(s_sdl_button_xboxone_icons), // SDL_GAMEPAD_TYPE_XBOXONE
|
||||
std::size(s_sdl_button_ps3_icons), // SDL_GAMEPAD_TYPE_PS3
|
||||
std::size(s_sdl_button_ps4_icons), // SDL_GAMEPAD_TYPE_PS4
|
||||
std::size(s_sdl_button_ps5_icons), // SDL_GAMEPAD_TYPE_PS5
|
||||
@@ -1034,7 +1119,7 @@ TinyString SDLInputSource::ConvertKeyToString(InputBindingKey key, bool display,
|
||||
if (it != m_controllers.end())
|
||||
type = SDL_GetRealGamepadType(it->gamepad);
|
||||
|
||||
if (type > SDL_GAMEPAD_TYPE_STANDARD && type < std::size(s_sdl_button_names_list) &&
|
||||
if (type > SDL_GAMEPAD_TYPE_UNKNOWN && type < std::size(s_sdl_button_names_list) &&
|
||||
key.data < s_sdl_button_namesize_list[type] && s_sdl_button_names_list[type][key.data] != nullptr)
|
||||
{
|
||||
ret.format("SDL-{} {}", static_cast<u32>(key.source_index), s_sdl_button_names_list[type][key.data]);
|
||||
@@ -1111,6 +1196,8 @@ TinyString SDLInputSource::ConvertKeyToIcon(InputBindingKey key)
|
||||
type = SDL_GAMEPAD_TYPE_PS5;
|
||||
else if (glyph_preference == InputLayout::Nintendo)
|
||||
type = SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO;
|
||||
else if (glyph_preference == InputLayout::Generic)
|
||||
type = SDL_GAMEPAD_TYPE_UNKNOWN;
|
||||
|
||||
if (key.source_subtype == InputSubclass::ControllerAxis)
|
||||
{
|
||||
@@ -1141,7 +1228,7 @@ TinyString SDLInputSource::ConvertKeyToIcon(InputBindingKey key)
|
||||
}
|
||||
else if (key.source_subtype == InputSubclass::ControllerButton)
|
||||
{
|
||||
if (type > SDL_GAMEPAD_TYPE_STANDARD && type < std::size(s_sdl_button_icons_list) &&
|
||||
if (type > SDL_GAMEPAD_TYPE_UNKNOWN && type < std::size(s_sdl_button_icons_list) &&
|
||||
key.data < s_sdl_button_iconsize_list[type] && s_sdl_button_icons_list[type][key.data] != nullptr)
|
||||
{
|
||||
ret.format("SDL-{} {}", static_cast<u32>(key.source_index), s_sdl_button_icons_list[type][key.data]);
|
||||
@@ -1149,7 +1236,7 @@ TinyString SDLInputSource::ConvertKeyToIcon(InputBindingKey key)
|
||||
else if (key.data < 4)
|
||||
{
|
||||
SDL_GamepadButtonLabel label = SDL_GAMEPAD_BUTTON_LABEL_UNKNOWN;
|
||||
if (it != m_controllers.end() && it->gamepad)
|
||||
if (glyph_preference != InputLayout::Generic && it != m_controllers.end() && it->gamepad)
|
||||
label = SDL_GetGamepadButtonLabel(it->gamepad, static_cast<SDL_GamepadButton>(key.data));
|
||||
|
||||
if (label > SDL_GAMEPAD_BUTTON_LABEL_UNKNOWN && label < std::size(s_sdl_face_button_icons))
|
||||
|
||||
@@ -79,7 +79,7 @@ static const char* s_button_names[XInputSource::NUM_BUTTONS] = {
|
||||
"B", // XINPUT_GAMEPAD_B
|
||||
"X", // XINPUT_GAMEPAD_X
|
||||
"Y", // XINPUT_GAMEPAD_Y
|
||||
"Guide", // XINPUT_GAMEPAD_GUIDE
|
||||
"Xbox", // XINPUT_GAMEPAD_GUIDE
|
||||
};
|
||||
|
||||
static const u16 s_button_masks[XInputSource::NUM_BUTTONS] = {
|
||||
@@ -387,7 +387,7 @@ TinyString XInputSource::ConvertKeyToIcon(InputBindingKey key)
|
||||
{
|
||||
TinyString ret;
|
||||
|
||||
if (key.source_type == InputSourceType::SDL)
|
||||
if (key.source_type == InputSourceType::XInput)
|
||||
{
|
||||
if (key.source_subtype == InputSubclass::ControllerAxis)
|
||||
{
|
||||
|
||||
@@ -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 = 108; // Last changed in PR 14688
|
||||
static constexpr u32 SHADER_CACHE_VERSION = 109; // Last changed in PR 14795
|
||||
|
||||
Reference in New Issue
Block a user