Compare commits

...

6 Commits

Author SHA1 Message Date
Joe Wagner 0157b7fae9
Merge 6f7416425a into 5486eed151 2024-09-19 02:27:10 +00:00
Joe Wagner 6f7416425a
change uint8_t to u8 for consistency 2024-09-18 19:27:07 -07:00
lightningterror 5486eed151 GS/HW: Merge blend ad a mask separate conditions in to one.
Duplicate code.
2024-09-19 00:19:05 +02:00
Ty Lamontagne d1721360ff
DebugInterface: Fix formatting 2024-09-18 16:57:20 -04:00
Joe Wagner f8f8049fd3
fix for formatting 2024-09-18 09:25:33 -07:00
Joe Wagner 0d37ea42f9
Update QtKeyCodes.cpp
This addresses an issue present in EQOA where SHIFT only worked on alpha characters. SHIFT now is detected and works to produce symbols as well.
2024-09-18 08:44:59 -07:00
3 changed files with 58 additions and 9 deletions

View File

@ -13,6 +13,53 @@
#include <QtGui/QKeyEvent> #include <QtGui/QKeyEvent>
u8 map_text_to_keycode(const QString& text)
{
if (text == "!")
return Qt::Key_1;
if (text == "@")
return Qt::Key_2;
if (text == "#")
return Qt::Key_3;
if (text == "$")
return Qt::Key_4;
if (text == "%")
return Qt::Key_5;
if (text == "^")
return Qt::Key_6;
if (text == "&")
return Qt::Key_7;
if (text == "*")
return Qt::Key_8;
if (text == "(")
return Qt::Key_9;
if (text == ")")
return Qt::Key_0;
if (text == "_")
return Qt::Key_Minus;
if (text == "+")
return Qt::Key_Equal;
if (text == "?")
return Qt::Key_Slash;
if (text == ":")
return Qt::Key_Semicolon;
if (text == "\"")
return Qt::Key_Apostrophe;
if (text == "~")
return Qt::Key_QuoteLeft;
if (text == "<")
return Qt::Key_Comma;
if (text == ">")
return Qt::Key_Period;
if (text == "|")
return Qt::Key_Backslash;
if (text == "{")
return Qt::Key_BracketLeft;
if (text == "}")
return Qt::Key_BracketRight;
return 0; // No remapping
}
struct KeyCodeName struct KeyCodeName
{ {
int code; int code;
@ -519,7 +566,15 @@ const char* InputManager::ConvertHostKeyboardCodeToIcon(u32 code)
u32 QtUtils::KeyEventToCode(const QKeyEvent* ev) u32 QtUtils::KeyEventToCode(const QKeyEvent* ev)
{ {
QString text = ev->text();
u8 keycode = map_text_to_keycode(text); // Map special text symbols to keycodes
int key = ev->key(); int key = ev->key();
if (keycode != 0)
{
key = keycode; // Override key if mapped
}
Qt::KeyboardModifiers modifiers = ev->modifiers(); Qt::KeyboardModifiers modifiers = ev->modifiers();
#ifdef __APPLE__ #ifdef __APPLE__

View File

@ -829,7 +829,7 @@ bool R5900DebugInterface::isValidAddress(u32 addr)
break; break;
case 8: case 8:
case 0xA: case 0xA:
if(lopart <= 0xFFFFF) if (lopart <= 0xFFFFF)
return true; return true;
break; break;
case 9: case 9:

View File

@ -4208,14 +4208,8 @@ void GSRendererHW::EmulateBlending(int rt_alpha_min, int rt_alpha_max, const boo
const bool alpha_mask = (m_cached_ctx.FRAME.FBMSK & 0xFF000000) == 0xFF000000; const bool alpha_mask = (m_cached_ctx.FRAME.FBMSK & 0xFF000000) == 0xFF000000;
bool blend_ad_alpha_masked = blend_ad && alpha_mask; bool blend_ad_alpha_masked = blend_ad && alpha_mask;
const bool is_basic_blend = GSConfig.AccurateBlendingUnit >= AccBlendLevel::Basic; const bool is_basic_blend = GSConfig.AccurateBlendingUnit >= AccBlendLevel::Basic;
if ((is_basic_blend || (COLCLAMP.CLAMP == 0)) && features.texture_barrier && blend_ad_alpha_masked) if (blend_ad_alpha_masked && (((is_basic_blend || (COLCLAMP.CLAMP == 0)) && features.texture_barrier)
{ || ((GSConfig.AccurateBlendingUnit >= AccBlendLevel::Medium) || m_conf.require_one_barrier)))
// Swap Ad with As for hw blend.
m_conf.ps.a_masked = 1;
m_conf.ps.blend_c = 0;
m_conf.require_one_barrier |= true;
}
else if (((GSConfig.AccurateBlendingUnit >= AccBlendLevel::Medium) || m_conf.require_one_barrier) && blend_ad_alpha_masked)
{ {
// Swap Ad with As for hw blend. // Swap Ad with As for hw blend.
m_conf.ps.a_masked = 1; m_conf.ps.a_masked = 1;