summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Data/Sys/GameSettings/GFP.ini5
-rw-r--r--Source/Core/Common/DirectIOFile.cpp7
-rw-r--r--Source/Core/Core/HW/GBACore.cpp16
-rw-r--r--Source/Core/Core/PowerPC/Jit64/Jit.cpp1
-rw-r--r--Source/Core/Core/PowerPC/Jit64/Jit.h1
-rw-r--r--Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp19
-rw-r--r--Source/Core/DolphinQt/Config/HardcoreWarningWidget.cpp20
-rw-r--r--Source/Core/DolphinQt/Config/HardcoreWarningWidget.h1
8 files changed, 45 insertions, 25 deletions
diff --git a/Data/Sys/GameSettings/GFP.ini b/Data/Sys/GameSettings/GFP.ini
new file mode 100644
index 0000000000..0da029b41d
--- /dev/null
+++ b/Data/Sys/GameSettings/GFP.ini
@@ -0,0 +1,5 @@
+# GFPEA4 - Frogger: Ancient Shadow
+
+[Video_Hacks]
+# Fixes dark graphical artifacts and pixel wide gap at the top and left edges of the screen.
+VertexRounding = True
diff --git a/Source/Core/Common/DirectIOFile.cpp b/Source/Core/Common/DirectIOFile.cpp
index d72e98fa3b..bfe598dc48 100644
--- a/Source/Core/Common/DirectIOFile.cpp
+++ b/Source/Core/Common/DirectIOFile.cpp
@@ -86,8 +86,11 @@ bool DirectIOFile::Open(const std::string& path, AccessMode access_mode, OpenMod
else if (access_mode == AccessMode::Write)
desired_access = GENERIC_WRITE;
- // Allow deleting and renaming through our handle.
- desired_access |= DELETE;
+ if (access_mode != AccessMode::Read)
+ {
+ // Allow deleting and renaming through our handle.
+ desired_access |= DELETE;
+ }
// All sharing is allowed to more closely match default behavior on other OSes.
constexpr DWORD share_mode = FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE;
diff --git a/Source/Core/Core/HW/GBACore.cpp b/Source/Core/Core/HW/GBACore.cpp
index 272b458fc5..c0dc6de0aa 100644
--- a/Source/Core/Core/HW/GBACore.cpp
+++ b/Source/Core/Core/HW/GBACore.cpp
@@ -387,16 +387,18 @@ void Core::SetSIODriver()
return;
m_sio_driver.core = this;
- m_sio_driver.init = [](GBASIODriver* driver) {
- static_cast<SIODriver*>(driver)->core->m_link_enabled = true;
- return true;
- };
- m_sio_driver.handlesMode = [](GBASIODriver* driver, GBASIOMode mode) {
- return mode == GBA_SIO_JOYBUS;
- };
+ m_sio_driver.init = [](GBASIODriver*) { return true; };
m_sio_driver.deinit = [](GBASIODriver* driver) {
static_cast<SIODriver*>(driver)->core->m_link_enabled = false;
};
+ m_sio_driver.reset = [](GBASIODriver* driver) {
+ static_cast<SIODriver*>(driver)->core->m_link_enabled = false;
+ };
+ m_sio_driver.setMode = [](GBASIODriver* driver, GBASIOMode mode) {
+ static_cast<SIODriver*>(driver)->core->m_link_enabled = mode == GBA_SIO_JOYBUS;
+ };
+ m_sio_driver.handlesMode = [](GBASIODriver*, GBASIOMode mode) { return mode == GBA_SIO_JOYBUS; };
+ m_sio_driver.connectedDevices = [](GBASIODriver*) { return 1; };
GBASIOSetDriver(&static_cast<::GBA*>(m_core->board)->sio, &m_sio_driver);
}
diff --git a/Source/Core/Core/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/PowerPC/Jit64/Jit.cpp
index 6cee5b971e..1cdaf8c55a 100644
--- a/Source/Core/Core/PowerPC/Jit64/Jit.cpp
+++ b/Source/Core/Core/PowerPC/Jit64/Jit.cpp
@@ -351,6 +351,7 @@ void Jit64::Shutdown()
void Jit64::FallBackToInterpreter(UGeckoInstruction inst)
{
+ FlushCarry();
gpr.Flush(BitSet32(0xFFFFFFFF), RegCache::IgnoreDiscardedRegisters::Yes);
fpr.Flush(BitSet32(0xFFFFFFFF), RegCache::IgnoreDiscardedRegisters::Yes);
diff --git a/Source/Core/Core/PowerPC/Jit64/Jit.h b/Source/Core/Core/PowerPC/Jit64/Jit.h
index 8b96fda107..ad5db1fa10 100644
--- a/Source/Core/Core/PowerPC/Jit64/Jit.h
+++ b/Source/Core/Core/PowerPC/Jit64/Jit.h
@@ -124,6 +124,7 @@ public:
void FinalizeCarryOverflow(bool oe, bool inv = false);
void FinalizeCarry(Gen::CCFlags cond);
void FinalizeCarry(bool ca);
+ void FlushCarry();
void ComputeRC(preg_t preg, bool needs_test = true, bool needs_sext = true);
void FinalizeImmediateRC(s32 value);
diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp
index 03bf2fc786..8ce73201f0 100644
--- a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp
+++ b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp
@@ -137,6 +137,25 @@ void Jit64::FinalizeCarryOverflow(bool oe, bool inv)
FinalizeCarry(inv ? CC_NC : CC_C);
}
+void Jit64::FlushCarry()
+{
+ switch (js.carryFlag)
+ {
+ case CarryFlag::InPPCState:
+ break;
+ case CarryFlag::InHostCarry:
+ JitSetCAIf(CC_C);
+ UnlockFlags();
+ break;
+ case CarryFlag::InHostCarryInverted:
+ JitSetCAIf(CC_NC);
+ UnlockFlags();
+ break;
+ }
+
+ js.carryFlag = CarryFlag::InPPCState;
+}
+
// Be careful; only set needs_test to false if we can be absolutely sure flags don't need
// to be recalculated and haven't been clobbered. Keep in mind not all instructions set
// sufficient flags -- for example, the flags from SHL/SHR are *not* sufficient for LT/GT
diff --git a/Source/Core/DolphinQt/Config/HardcoreWarningWidget.cpp b/Source/Core/DolphinQt/Config/HardcoreWarningWidget.cpp
index 257a43c366..2244aa6a0b 100644
--- a/Source/Core/DolphinQt/Config/HardcoreWarningWidget.cpp
+++ b/Source/Core/DolphinQt/Config/HardcoreWarningWidget.cpp
@@ -6,14 +6,12 @@
#include <QHBoxLayout>
#include <QLabel>
-#include <QPixmap>
#include <QPushButton>
#include <QStyle>
#include "Core/AchievementManager.h"
-#include "Core/ConfigManager.h"
-#include "Core/Core.h"
+#include "DolphinQt/QtUtils/QtUtils.h"
#include "DolphinQt/Settings.h"
HardcoreWarningWidget::HardcoreWarningWidget(QWidget* parent) : QWidget(parent)
@@ -28,25 +26,17 @@ HardcoreWarningWidget::HardcoreWarningWidget(QWidget* parent) : QWidget(parent)
void HardcoreWarningWidget::CreateWidgets()
{
- const auto size = 1.5 * QFontMetrics(font()).height();
+ auto* const text = new QLabel(tr("Only approved codes will be applied in hardcore mode."));
+ auto* const icon_warning = QtUtils::CreateIconWarning(this, QStyle::SP_MessageBoxWarning, text);
- QPixmap warning_icon = style()->standardIcon(QStyle::SP_MessageBoxWarning).pixmap(size, size);
-
- auto* icon = new QLabel;
- icon->setPixmap(warning_icon);
-
- m_text = new QLabel(tr("Only approved codes will be applied in hardcore mode."));
m_settings_button = new QPushButton(tr("Achievement Settings"));
- auto* layout = new QHBoxLayout;
+ auto* const layout = new QHBoxLayout{this};
- layout->addWidget(icon);
- layout->addWidget(m_text, 1);
+ layout->addWidget(icon_warning, 1);
layout->addWidget(m_settings_button);
layout->setContentsMargins(0, 0, 0, 0);
-
- setLayout(layout);
}
void HardcoreWarningWidget::ConnectWidgets()
diff --git a/Source/Core/DolphinQt/Config/HardcoreWarningWidget.h b/Source/Core/DolphinQt/Config/HardcoreWarningWidget.h
index c4a20eba96..4b7db7f675 100644
--- a/Source/Core/DolphinQt/Config/HardcoreWarningWidget.h
+++ b/Source/Core/DolphinQt/Config/HardcoreWarningWidget.h
@@ -24,7 +24,6 @@ private:
void Update();
- QLabel* m_text;
QPushButton* m_settings_button;
};
#endif // USE_RETRO_ACHIEVEMENTS