From 14050c7302faecf90bfcbd4d42b496313cce67ca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alexandro=20S=C3=A1nchez=20Bach?= <alexaltea123@gmail.com>
Date: Fri, 11 Jul 2014 18:18:12 +0200
Subject: [PATCH] Removed: "Ignore R/W memory errors" option

Very small commit to take care of one thing missing in #409.

Reasons for that change:
<Nekoteki>AlexAltea: it's fatal error that shouldn't be ignored
<Nekoteki>AlexAltea: the second reason, ps3 can handle page faults by
itself
---
 rpcs3/Emu/SysCalls/Modules/cellResc.cpp | 4 ++--
 rpcs3/Gui/MainFrame.cpp                 | 4 ----
 rpcs3/Ini.h                             | 4 ----
 3 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/rpcs3/Emu/SysCalls/Modules/cellResc.cpp b/rpcs3/Emu/SysCalls/Modules/cellResc.cpp
index 4618e9f94b..60cd6fde8b 100644
--- a/rpcs3/Emu/SysCalls/Modules/cellResc.cpp
+++ b/rpcs3/Emu/SysCalls/Modules/cellResc.cpp
@@ -1135,8 +1135,8 @@ int cellRescSetBufferAddress(mem32_t colorBuffers, mem32_t vertexArray, mem32_t
 
 	if(colorBuffers.GetAddr() % COLOR_BUFFER_ALIGNMENT || vertexArray.GetAddr() % VERTEX_BUFFER_ALIGNMENT || fragmentShader.GetAddr() % FRAGMENT_SHADER_ALIGNMENT)
 	{
-		cellResc->Error("cellRescSetBufferAddress : CELL_RESC_ERROR_BAD_ARGUMENT (alignment)");
-		return CELL_RESC_ERROR_BAD_ARGUMENT;
+		cellResc->Error("cellRescSetBufferAddress : CELL_RESC_ERROR_BAD_ALIGNMENT");
+		return CELL_RESC_ERROR_BAD_ALIGNMENT;
 	}
 
 	s_rescInternalInstance->m_colorBuffersEA  = colorBuffers.GetAddr();
diff --git a/rpcs3/Gui/MainFrame.cpp b/rpcs3/Gui/MainFrame.cpp
index d0bb8d6daf..6938bc2f89 100644
--- a/rpcs3/Gui/MainFrame.cpp
+++ b/rpcs3/Gui/MainFrame.cpp
@@ -412,7 +412,6 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
 	wxComboBox* cbox_hle_loglvl       = new wxComboBox(p_hle, wxID_ANY);
 	wxComboBox* cbox_sys_lang         = new wxComboBox(p_system, wxID_ANY);
 
-	wxCheckBox* chbox_cpu_ignore_rwerrors = new wxCheckBox(p_cpu, wxID_ANY, "Ignore Read/Write errors");
 	wxCheckBox* chbox_gs_log_prog         = new wxCheckBox(p_graphics, wxID_ANY, "Log vertex/fragment programs");
 	wxCheckBox* chbox_gs_dump_depth       = new wxCheckBox(p_graphics, wxID_ANY, "Write Depth Buffer");
 	wxCheckBox* chbox_gs_dump_color       = new wxCheckBox(p_graphics, wxID_ANY, "Write Color Buffers");
@@ -489,7 +488,6 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
 
 
 	// Get values from .ini
-	chbox_cpu_ignore_rwerrors->SetValue(Ini.CPUIgnoreRWErrors.GetValue());
 	chbox_gs_log_prog        ->SetValue(Ini.GSLogPrograms.GetValue());
 	chbox_gs_dump_depth      ->SetValue(Ini.GSDumpDepthBuffer.GetValue());
 	chbox_gs_dump_color      ->SetValue(Ini.GSDumpColorBuffers.GetValue());
@@ -541,7 +539,6 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
 
 	// Core
 	s_subpanel_cpu->Add(s_round_cpu_decoder, wxSizerFlags().Border(wxALL, 5).Expand());
-	s_round_cpu_decoder->Add(chbox_cpu_ignore_rwerrors, wxSizerFlags().Border(wxALL, 5).Expand());
 	s_subpanel_cpu->Add(s_round_spu_decoder, wxSizerFlags().Border(wxALL, 5).Expand());
 
 	// Graphics
@@ -593,7 +590,6 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
 	if(diag.ShowModal() == wxID_OK)
 	{
 		Ini.CPUDecoderMode.SetValue(cbox_cpu_decoder->GetSelection() + 1);
-		Ini.CPUIgnoreRWErrors.SetValue(chbox_cpu_ignore_rwerrors->GetValue());
 		Ini.SPUDecoderMode.SetValue(cbox_spu_decoder->GetSelection() + 1);
 		Ini.GSRenderMode.SetValue(cbox_gs_render->GetSelection());
 		Ini.GSResolution.SetValue(ResolutionNumToId(cbox_gs_resolution->GetSelection() + 1));
diff --git a/rpcs3/Ini.h b/rpcs3/Ini.h
index 8abdfec5ea..523f107c98 100644
--- a/rpcs3/Ini.h
+++ b/rpcs3/Ini.h
@@ -100,7 +100,6 @@ public:
 	// Core
 	IniEntry<u8> CPUDecoderMode;
 	IniEntry<u8> SPUDecoderMode;
-	IniEntry<bool> CPUIgnoreRWErrors;
 
 	// Graphics
 	IniEntry<u8> GSRenderMode;
@@ -165,7 +164,6 @@ public:
 
 		// Core
 		CPUDecoderMode.Init("CPU_DecoderMode", path);
-		CPUIgnoreRWErrors.Init("CPU_IgnoreRWErrors", path);
 		SPUDecoderMode.Init("CPU_SPUDecoderMode", path);
 
 		// Graphics
@@ -227,7 +225,6 @@ public:
 	{
 		// Core
 		CPUDecoderMode.Load(2);
-		CPUIgnoreRWErrors.Load(true);
 		SPUDecoderMode.Load(1);
 
 		// Graphics
@@ -290,7 +287,6 @@ public:
 	{
 		// CPU/SPU
 		CPUDecoderMode.Save();
-		CPUIgnoreRWErrors.Save();
 		SPUDecoderMode.Save();
 
 		// Graphics
