From 517952ec632ad261024a22cec1e62b97f487dc23 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sun, 4 Jul 2021 20:47:04 +0200 Subject: [PATCH] Add AlignmentExceptions setting --- Source/Core/Core/Config/MainSettings.cpp | 1 + Source/Core/Core/Config/MainSettings.h | 1 + Source/Core/Core/ConfigLoaders/NetPlayConfigLoader.cpp | 1 + Source/Core/Core/NetPlayClient.cpp | 1 + Source/Core/Core/NetPlayProto.h | 1 + Source/Core/Core/NetPlayServer.cpp | 2 ++ 6 files changed, 7 insertions(+) diff --git a/Source/Core/Core/Config/MainSettings.cpp b/Source/Core/Core/Config/MainSettings.cpp index 21c453b6c775..b44e0a94a7fd 100644 --- a/Source/Core/Core/Config/MainSettings.cpp +++ b/Source/Core/Core/Config/MainSettings.cpp @@ -198,6 +198,7 @@ const Info MAIN_LOW_DCBZ_HACK{{System::Main, "Core", "LowDCBZHack"}, false const Info MAIN_FLOAT_EXCEPTIONS{{System::Main, "Core", "FloatExceptions"}, false}; const Info MAIN_DIVIDE_BY_ZERO_EXCEPTIONS{{System::Main, "Core", "DivByZeroExceptions"}, false}; +const Info MAIN_ALIGNMENT_EXCEPTIONS{{System::Main, "Core", "AlignmentExceptions"}, false}; const Info MAIN_FPRF{{System::Main, "Core", "FPRF"}, false}; const Info MAIN_ACCURATE_NANS{{System::Main, "Core", "AccurateNaNs"}, false}; const Info MAIN_DISABLE_ICACHE{{System::Main, "Core", "DisableICache"}, false}; diff --git a/Source/Core/Core/Config/MainSettings.h b/Source/Core/Core/Config/MainSettings.h index dddda8ae7a3b..e8961703a924 100644 --- a/Source/Core/Core/Config/MainSettings.h +++ b/Source/Core/Core/Config/MainSettings.h @@ -117,6 +117,7 @@ extern const Info MAIN_FAST_DISC_SPEED; extern const Info MAIN_LOW_DCBZ_HACK; extern const Info MAIN_FLOAT_EXCEPTIONS; extern const Info MAIN_DIVIDE_BY_ZERO_EXCEPTIONS; +extern const Info MAIN_ALIGNMENT_EXCEPTIONS; extern const Info MAIN_FPRF; extern const Info MAIN_ACCURATE_NANS; extern const Info MAIN_DISABLE_ICACHE; diff --git a/Source/Core/Core/ConfigLoaders/NetPlayConfigLoader.cpp b/Source/Core/Core/ConfigLoaders/NetPlayConfigLoader.cpp index 75b1bda45419..5d494733e53e 100644 --- a/Source/Core/Core/ConfigLoaders/NetPlayConfigLoader.cpp +++ b/Source/Core/Core/ConfigLoaders/NetPlayConfigLoader.cpp @@ -72,6 +72,7 @@ class NetPlayConfigLayerLoader final : public Config::ConfigLayerLoader layer->Set(Config::GFX_PERF_QUERIES_ENABLE, m_settings.perf_queries_enable); layer->Set(Config::MAIN_FLOAT_EXCEPTIONS, m_settings.float_exceptions); layer->Set(Config::MAIN_DIVIDE_BY_ZERO_EXCEPTIONS, m_settings.divide_by_zero_exceptions); + layer->Set(Config::MAIN_ALIGNMENT_EXCEPTIONS, m_settings.alignment_exceptions); layer->Set(Config::MAIN_FPRF, m_settings.fprf); layer->Set(Config::MAIN_ACCURATE_NANS, m_settings.accurate_nans); layer->Set(Config::MAIN_DISABLE_ICACHE, m_settings.disable_icache); diff --git a/Source/Core/Core/NetPlayClient.cpp b/Source/Core/Core/NetPlayClient.cpp index c40b122a7029..49ac1fc082eb 100644 --- a/Source/Core/Core/NetPlayClient.cpp +++ b/Source/Core/Core/NetPlayClient.cpp @@ -879,6 +879,7 @@ void NetPlayClient::OnStartGame(sf::Packet& packet) packet >> m_net_settings.perf_queries_enable; packet >> m_net_settings.float_exceptions; packet >> m_net_settings.divide_by_zero_exceptions; + packet >> m_net_settings.alignment_exceptions; packet >> m_net_settings.fprf; packet >> m_net_settings.accurate_nans; packet >> m_net_settings.disable_icache; diff --git a/Source/Core/Core/NetPlayProto.h b/Source/Core/Core/NetPlayProto.h index a20aee39ce5e..bda52a9af558 100644 --- a/Source/Core/Core/NetPlayProto.h +++ b/Source/Core/Core/NetPlayProto.h @@ -63,6 +63,7 @@ struct NetSettings bool perf_queries_enable = false; bool float_exceptions = false; bool divide_by_zero_exceptions = false; + bool alignment_exceptions = false; bool fprf = false; bool accurate_nans = false; bool disable_icache = false; diff --git a/Source/Core/Core/NetPlayServer.cpp b/Source/Core/Core/NetPlayServer.cpp index 0705e4d2a7df..81650cc9b0d4 100644 --- a/Source/Core/Core/NetPlayServer.cpp +++ b/Source/Core/Core/NetPlayServer.cpp @@ -1409,6 +1409,7 @@ bool NetPlayServer::SetupNetSettings() settings.perf_queries_enable = Config::Get(Config::GFX_PERF_QUERIES_ENABLE); settings.float_exceptions = Config::Get(Config::MAIN_FLOAT_EXCEPTIONS); settings.divide_by_zero_exceptions = Config::Get(Config::MAIN_DIVIDE_BY_ZERO_EXCEPTIONS); + settings.alignment_exceptions = Config::Get(Config::MAIN_ALIGNMENT_EXCEPTIONS); settings.fprf = Config::Get(Config::MAIN_FPRF); settings.accurate_nans = Config::Get(Config::MAIN_ACCURATE_NANS); settings.disable_icache = Config::Get(Config::MAIN_DISABLE_ICACHE); @@ -1617,6 +1618,7 @@ bool NetPlayServer::StartGame() spac << m_settings.perf_queries_enable; spac << m_settings.float_exceptions; spac << m_settings.divide_by_zero_exceptions; + spac << m_settings.alignment_exceptions; spac << m_settings.fprf; spac << m_settings.accurate_nans; spac << m_settings.disable_icache;