[dolphin-emu] 01/03: Imported Upstream version 5.0~rc33+dfsg

James Cowgill jcowgill-guest at moszumanska.debian.org
Thu Oct 1 11:36:35 UTC 2015


This is an automated email from the git hooks/post-receive script.

jcowgill-guest pushed a commit to branch experimental
in repository dolphin-emu.

commit 03c1ca60618ed580a82c8c51de32589976f1772f
Author: James Cowgill <james410 at cowgill.org.uk>
Date:   Thu Oct 1 11:47:39 2015 +0100

    Imported Upstream version 5.0~rc33+dfsg
---
 Data/Sys/GameSettings/FB2.ini                     |  29 ++++
 Data/Sys/GameSettings/FFY.ini                     |  29 ++++
 Data/Sys/Themes/Boomy/README.txt                  |   1 -
 Data/Sys/Themes/Boomy/audio.png                   | Bin 1877 -> 0 bytes
 Data/Sys/Themes/Boomy/browse.png                  | Bin 1708 -> 0 bytes
 Data/Sys/Themes/Boomy/classic.png                 | Bin 1616 -> 0 bytes
 Data/Sys/Themes/Boomy/config.png                  | Bin 1735 -> 0 bytes
 Data/Sys/Themes/Boomy/fullscreen.png              | Bin 1387 -> 0 bytes
 Data/Sys/Themes/Boomy/gcpad.png                   | Bin 1604 -> 0 bytes
 Data/Sys/Themes/Boomy/graphics.png                | Bin 1800 -> 0 bytes
 Data/Sys/Themes/Boomy/help.png                    | Bin 1808 -> 0 bytes
 Data/Sys/Themes/Boomy/nobanner.png                | Bin 321 -> 0 bytes
 Data/Sys/Themes/Boomy/open.png                    | Bin 1493 -> 0 bytes
 Data/Sys/Themes/Boomy/pause.png                   | Bin 1750 -> 0 bytes
 Data/Sys/Themes/Boomy/play.png                    | Bin 1743 -> 0 bytes
 Data/Sys/Themes/Boomy/refresh.png                 | Bin 1761 -> 0 bytes
 Data/Sys/Themes/Boomy/screenshot.png              | Bin 1387 -> 0 bytes
 Data/Sys/Themes/Boomy/stop.png                    | Bin 1677 -> 0 bytes
 Data/Sys/Themes/Boomy/toolbar_add_breakpoint.png  | Bin 3647 -> 0 bytes
 Data/Sys/Themes/Boomy/toolbar_add_memorycheck.png | Bin 2842 -> 0 bytes
 Data/Sys/Themes/Boomy/toolbar_debugger_delete.png | Bin 2904 -> 0 bytes
 Data/Sys/Themes/Boomy/wiimote.png                 | Bin 1616 -> 0 bytes
 Source/Core/Common/CodeBlock.h                    |   4 +-
 Source/Core/DiscIO/Volume.h                       |   2 +-
 Source/Core/DiscIO/VolumeDirectory.cpp            |   2 +-
 Source/Core/DiscIO/VolumeDirectory.h              |   2 +-
 Source/Core/DiscIO/VolumeGC.cpp                   |   2 +-
 Source/Core/DiscIO/VolumeGC.h                     |   2 +-
 Source/Core/DiscIO/VolumeWad.h                    |   2 +-
 Source/Core/DiscIO/VolumeWiiCrypted.cpp           |   4 +-
 Source/Core/DiscIO/VolumeWiiCrypted.h             |   2 +-
 Source/Core/DolphinWX/ISOProperties.cpp           |   4 +-
 Source/Core/DolphinWX/TASInputDlg.cpp             | 156 +++++++++++++---------
 Source/Core/DolphinWX/TASInputDlg.h               |   8 +-
 Source/Core/VideoBackends/OGL/GLInterface/AGL.cpp |   4 +-
 Source/Core/VideoBackends/OGL/GLInterface/AGL.h   |   2 +-
 Source/Core/VideoBackends/OGL/GLInterface/EGL.cpp |   2 +-
 Source/Core/VideoBackends/OGL/GLInterface/EGL.h   |   2 +-
 Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp |  15 ++-
 Source/Core/VideoBackends/OGL/GLInterface/GLX.h   |   2 +-
 Source/Core/VideoBackends/OGL/GLInterface/WGL.cpp |   2 +-
 Source/Core/VideoBackends/OGL/GLInterface/WGL.h   |   2 +-
 Source/Core/VideoBackends/OGL/GLInterfaceBase.h   |   2 +-
 Source/Core/VideoBackends/Software/SWmain.cpp     |   2 +-
 Source/Core/VideoCommon/VertexLoaderX64.cpp       |   2 +-
 45 files changed, 193 insertions(+), 93 deletions(-)

diff --git a/Data/Sys/GameSettings/FB2.ini b/Data/Sys/GameSettings/FB2.ini
new file mode 100644
index 0000000..ee42a85
--- /dev/null
+++ b/Data/Sys/GameSettings/FB2.ini
@@ -0,0 +1,29 @@
+# FB2E01, FB2P01 - Super Mario Bros. The Lost Levels
+
+[Core]
+# Values set here will override the main Dolphin settings.
+
+[EmuState]
+# The Emulation State. 1 is worst, 5 is best, 0 is not set.
+EmulationStateId = 4
+EmulationIssues = Texture filtering will cause glitches.
+
+[OnLoad]
+# Add memory patches to be loaded once on boot here.
+
+[OnFrame]
+# Add memory patches to be applied every frame here.
+
+[ActionReplay]
+# Add action replay cheats here.
+
+[Video_Settings]
+SafeTextureCacheColorSamples = 0
+EFBScale = 2
+
+[Video_Hacks]
+EFBToTextureEnable = False
+
+[Video_Enhancements]
+MaxAnisotropy = 0
+ForceFiltering = False
diff --git a/Data/Sys/GameSettings/FFY.ini b/Data/Sys/GameSettings/FFY.ini
new file mode 100644
index 0000000..12c0b16
--- /dev/null
+++ b/Data/Sys/GameSettings/FFY.ini
@@ -0,0 +1,29 @@
+# FFYE01, FFYJ01, FFYP01 - Mega Man 5
+
+[Core]
+# Values set here will override the main Dolphin settings.
+
+[EmuState]
+# The Emulation State. 1 is worst, 5 is best, 0 is not set.
+EmulationIssues = Texture filtering will cause glitches.
+EmulationStateId = 4
+
+[OnLoad]
+# Add memory patches to be loaded once on boot here.
+
+[OnFrame]
+# Add memory patches to be applied every frame here.
+
+[ActionReplay]
+# Add action replay cheats here.
+
+[Video_Settings]
+SafeTextureCacheColorSamples = 0
+EFBScale = 2
+
+[Video_Hacks]
+EFBToTextureEnable = False
+
+[Video_Enhancements]
+MaxAnisotropy = 0
+ForceFiltering = False
diff --git a/Data/Sys/Themes/Boomy/README.txt b/Data/Sys/Themes/Boomy/README.txt
deleted file mode 100644
index 97a5aec..0000000
--- a/Data/Sys/Themes/Boomy/README.txt
+++ /dev/null
@@ -1 +0,0 @@
-Boomy: Milosz Wlazlo [miloszwl at miloszwl.com]
diff --git a/Data/Sys/Themes/Boomy/audio.png b/Data/Sys/Themes/Boomy/audio.png
deleted file mode 100644
index 22752cd..0000000
Binary files a/Data/Sys/Themes/Boomy/audio.png and /dev/null differ
diff --git a/Data/Sys/Themes/Boomy/browse.png b/Data/Sys/Themes/Boomy/browse.png
deleted file mode 100644
index 3b3c527..0000000
Binary files a/Data/Sys/Themes/Boomy/browse.png and /dev/null differ
diff --git a/Data/Sys/Themes/Boomy/classic.png b/Data/Sys/Themes/Boomy/classic.png
deleted file mode 100644
index 56cd873..0000000
Binary files a/Data/Sys/Themes/Boomy/classic.png and /dev/null differ
diff --git a/Data/Sys/Themes/Boomy/config.png b/Data/Sys/Themes/Boomy/config.png
deleted file mode 100644
index 8e421b5..0000000
Binary files a/Data/Sys/Themes/Boomy/config.png and /dev/null differ
diff --git a/Data/Sys/Themes/Boomy/fullscreen.png b/Data/Sys/Themes/Boomy/fullscreen.png
deleted file mode 100644
index 1a8f7f8..0000000
Binary files a/Data/Sys/Themes/Boomy/fullscreen.png and /dev/null differ
diff --git a/Data/Sys/Themes/Boomy/gcpad.png b/Data/Sys/Themes/Boomy/gcpad.png
deleted file mode 100644
index a951d8c..0000000
Binary files a/Data/Sys/Themes/Boomy/gcpad.png and /dev/null differ
diff --git a/Data/Sys/Themes/Boomy/graphics.png b/Data/Sys/Themes/Boomy/graphics.png
deleted file mode 100644
index 408593c..0000000
Binary files a/Data/Sys/Themes/Boomy/graphics.png and /dev/null differ
diff --git a/Data/Sys/Themes/Boomy/help.png b/Data/Sys/Themes/Boomy/help.png
deleted file mode 100644
index e2cfe65..0000000
Binary files a/Data/Sys/Themes/Boomy/help.png and /dev/null differ
diff --git a/Data/Sys/Themes/Boomy/nobanner.png b/Data/Sys/Themes/Boomy/nobanner.png
deleted file mode 100644
index 08a3088..0000000
Binary files a/Data/Sys/Themes/Boomy/nobanner.png and /dev/null differ
diff --git a/Data/Sys/Themes/Boomy/open.png b/Data/Sys/Themes/Boomy/open.png
deleted file mode 100644
index 4d12dcc..0000000
Binary files a/Data/Sys/Themes/Boomy/open.png and /dev/null differ
diff --git a/Data/Sys/Themes/Boomy/pause.png b/Data/Sys/Themes/Boomy/pause.png
deleted file mode 100644
index 4615a2e..0000000
Binary files a/Data/Sys/Themes/Boomy/pause.png and /dev/null differ
diff --git a/Data/Sys/Themes/Boomy/play.png b/Data/Sys/Themes/Boomy/play.png
deleted file mode 100644
index 782e9ad..0000000
Binary files a/Data/Sys/Themes/Boomy/play.png and /dev/null differ
diff --git a/Data/Sys/Themes/Boomy/refresh.png b/Data/Sys/Themes/Boomy/refresh.png
deleted file mode 100644
index 35f3c92..0000000
Binary files a/Data/Sys/Themes/Boomy/refresh.png and /dev/null differ
diff --git a/Data/Sys/Themes/Boomy/screenshot.png b/Data/Sys/Themes/Boomy/screenshot.png
deleted file mode 100644
index 1a8f7f8..0000000
Binary files a/Data/Sys/Themes/Boomy/screenshot.png and /dev/null differ
diff --git a/Data/Sys/Themes/Boomy/stop.png b/Data/Sys/Themes/Boomy/stop.png
deleted file mode 100644
index da61561..0000000
Binary files a/Data/Sys/Themes/Boomy/stop.png and /dev/null differ
diff --git a/Data/Sys/Themes/Boomy/toolbar_add_breakpoint.png b/Data/Sys/Themes/Boomy/toolbar_add_breakpoint.png
deleted file mode 100644
index c633370..0000000
Binary files a/Data/Sys/Themes/Boomy/toolbar_add_breakpoint.png and /dev/null differ
diff --git a/Data/Sys/Themes/Boomy/toolbar_add_memorycheck.png b/Data/Sys/Themes/Boomy/toolbar_add_memorycheck.png
deleted file mode 100644
index fcd46e7..0000000
Binary files a/Data/Sys/Themes/Boomy/toolbar_add_memorycheck.png and /dev/null differ
diff --git a/Data/Sys/Themes/Boomy/toolbar_debugger_delete.png b/Data/Sys/Themes/Boomy/toolbar_debugger_delete.png
deleted file mode 100644
index 97af25d..0000000
Binary files a/Data/Sys/Themes/Boomy/toolbar_debugger_delete.png and /dev/null differ
diff --git a/Data/Sys/Themes/Boomy/wiimote.png b/Data/Sys/Themes/Boomy/wiimote.png
deleted file mode 100644
index 56cd873..0000000
Binary files a/Data/Sys/Themes/Boomy/wiimote.png and /dev/null differ
diff --git a/Source/Core/Common/CodeBlock.h b/Source/Core/Common/CodeBlock.h
index 972fc70..83a529e 100644
--- a/Source/Core/Common/CodeBlock.h
+++ b/Source/Core/Common/CodeBlock.h
@@ -28,10 +28,10 @@ public:
 	virtual ~CodeBlock() { if (region) FreeCodeSpace(); }
 
 	// Call this before you generate any code.
-	void AllocCodeSpace(int size)
+	void AllocCodeSpace(int size, bool need_low = true)
 	{
 		region_size = size;
-		region = (u8*)AllocateExecutableMemory(region_size);
+		region = (u8*)AllocateExecutableMemory(region_size, need_low);
 		T::SetCodePtr(region);
 	}
 
diff --git a/Source/Core/DiscIO/Volume.h b/Source/Core/DiscIO/Volume.h
index 294cf94..fc27c3b 100644
--- a/Source/Core/DiscIO/Volume.h
+++ b/Source/Core/DiscIO/Volume.h
@@ -89,7 +89,7 @@ public:
 	virtual std::map<ELanguage, std::string> GetDescriptions() const { return std::map<ELanguage, std::string>(); }
 	virtual std::string GetCompany() const { return std::string(); }
 	virtual std::vector<u32> GetBanner(int* width, int* height) const;
-	virtual u32 GetFSTSize() const = 0;
+	virtual u64 GetFSTSize() const = 0;
 	virtual std::string GetApploaderDate() const = 0;
 	// 0 is the first disc, 1 is the second disc
 	virtual u8 GetDiscNumber() const { return 0; }
diff --git a/Source/Core/DiscIO/VolumeDirectory.cpp b/Source/Core/DiscIO/VolumeDirectory.cpp
index ee22db7..cb907a6 100644
--- a/Source/Core/DiscIO/VolumeDirectory.cpp
+++ b/Source/Core/DiscIO/VolumeDirectory.cpp
@@ -210,7 +210,7 @@ void CVolumeDirectory::SetName(const std::string& name)
 	m_diskHeader[length + 0x20] = 0;
 }
 
-u32 CVolumeDirectory::GetFSTSize() const
+u64 CVolumeDirectory::GetFSTSize() const
 {
 	return 0;
 }
diff --git a/Source/Core/DiscIO/VolumeDirectory.h b/Source/Core/DiscIO/VolumeDirectory.h
index 8053d20..4dc7fa1 100644
--- a/Source/Core/DiscIO/VolumeDirectory.h
+++ b/Source/Core/DiscIO/VolumeDirectory.h
@@ -44,7 +44,7 @@ public:
 	std::map<IVolume::ELanguage, std::string> GetNames(bool prefer_long) const override;
 	void SetName(const std::string&);
 
-	u32 GetFSTSize() const override;
+	u64 GetFSTSize() const override;
 
 	std::string GetApploaderDate() const override;
 	EPlatform GetVolumeType() const override;
diff --git a/Source/Core/DiscIO/VolumeGC.cpp b/Source/Core/DiscIO/VolumeGC.cpp
index 6160c65..eaf20a5 100644
--- a/Source/Core/DiscIO/VolumeGC.cpp
+++ b/Source/Core/DiscIO/VolumeGC.cpp
@@ -146,7 +146,7 @@ std::vector<u32> CVolumeGC::GetBanner(int* width, int* height) const
 	return image_buffer;
 }
 
-u32 CVolumeGC::GetFSTSize() const
+u64 CVolumeGC::GetFSTSize() const
 {
 	if (m_pReader == nullptr)
 		return 0;
diff --git a/Source/Core/DiscIO/VolumeGC.h b/Source/Core/DiscIO/VolumeGC.h
index 35599ca..66b321b 100644
--- a/Source/Core/DiscIO/VolumeGC.h
+++ b/Source/Core/DiscIO/VolumeGC.h
@@ -33,7 +33,7 @@ public:
 	std::map<ELanguage, std::string> GetDescriptions() const override;
 	std::string GetCompany() const override;
 	std::vector<u32> GetBanner(int* width, int* height) const override;
-	u32 GetFSTSize() const override;
+	u64 GetFSTSize() const override;
 	std::string GetApploaderDate() const override;
 	u8 GetDiscNumber() const override;
 
diff --git a/Source/Core/DiscIO/VolumeWad.h b/Source/Core/DiscIO/VolumeWad.h
index 16168ae..b89de97 100644
--- a/Source/Core/DiscIO/VolumeWad.h
+++ b/Source/Core/DiscIO/VolumeWad.h
@@ -33,7 +33,7 @@ public:
 	u16 GetRevision() const override;
 	std::string GetInternalName() const override { return ""; }
 	std::map<IVolume::ELanguage, std::string> GetNames(bool prefer_long) const override;
-	u32 GetFSTSize() const override { return 0; }
+	u64 GetFSTSize() const override { return 0; }
 	std::string GetApploaderDate() const override { return ""; }
 
 	EPlatform GetVolumeType() const override;
diff --git a/Source/Core/DiscIO/VolumeWiiCrypted.cpp b/Source/Core/DiscIO/VolumeWiiCrypted.cpp
index ec5564f..ac39b04 100644
--- a/Source/Core/DiscIO/VolumeWiiCrypted.cpp
+++ b/Source/Core/DiscIO/VolumeWiiCrypted.cpp
@@ -210,7 +210,7 @@ std::map<IVolume::ELanguage, std::string> CVolumeWiiCrypted::GetNames(bool prefe
 	return ReadWiiNames(opening_bnr);
 }
 
-u32 CVolumeWiiCrypted::GetFSTSize() const
+u64 CVolumeWiiCrypted::GetFSTSize() const
 {
 	if (m_pReader == nullptr)
 		return 0;
@@ -220,7 +220,7 @@ u32 CVolumeWiiCrypted::GetFSTSize() const
 	if (!Read(0x428, 0x4, (u8*)&size, true))
 		return 0;
 
-	return Common::swap32(size);
+	return (u64)Common::swap32(size) << 2;
 }
 
 std::string CVolumeWiiCrypted::GetApploaderDate() const
diff --git a/Source/Core/DiscIO/VolumeWiiCrypted.h b/Source/Core/DiscIO/VolumeWiiCrypted.h
index 6fd687d..00642a9 100644
--- a/Source/Core/DiscIO/VolumeWiiCrypted.h
+++ b/Source/Core/DiscIO/VolumeWiiCrypted.h
@@ -33,7 +33,7 @@ public:
 	u16 GetRevision() const override;
 	std::string GetInternalName() const override;
 	std::map<IVolume::ELanguage, std::string> GetNames(bool prefer_long) const override;
-	u32 GetFSTSize() const override;
+	u64 GetFSTSize() const override;
 	std::string GetApploaderDate() const override;
 	u8 GetDiscNumber() const override;
 
diff --git a/Source/Core/DolphinWX/ISOProperties.cpp b/Source/Core/DolphinWX/ISOProperties.cpp
index e94fae4..87e5f44 100644
--- a/Source/Core/DolphinWX/ISOProperties.cpp
+++ b/Source/Core/DolphinWX/ISOProperties.cpp
@@ -184,9 +184,9 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
 
 	wxString temp = "0x" + StrToWxStr(OpenISO->GetMakerID());
 	m_MakerID->SetValue(temp);
-	m_Revision->SetValue(wxString::Format("%u", OpenISO->GetRevision()));
+	m_Revision->SetValue(StrToWxStr(std::to_string(OpenISO->GetRevision())));
 	m_Date->SetValue(StrToWxStr(OpenISO->GetApploaderDate()));
-	m_FST->SetValue(wxString::Format("%u", OpenISO->GetFSTSize()));
+	m_FST->SetValue(StrToWxStr(std::to_string(OpenISO->GetFSTSize())));
 
 	// Here we set all the info to be shown + we set the window title
 	bool wii = OpenISO->GetVolumeType() != DiscIO::IVolume::GAMECUBE_DISC;
diff --git a/Source/Core/DolphinWX/TASInputDlg.cpp b/Source/Core/DolphinWX/TASInputDlg.cpp
index da7645a..df37e44 100644
--- a/Source/Core/DolphinWX/TASInputDlg.cpp
+++ b/Source/Core/DolphinWX/TASInputDlg.cpp
@@ -23,8 +23,8 @@
 #include "InputCommon/GCPadStatus.h"
 #include "InputCommon/InputConfig.h"
 
-wxDEFINE_EVENT(WIIMOTE_UPDATE_CALLBACK, wxCommandEvent);
-wxDEFINE_EVENT(GCPAD_UPDATE_CALLBACK, wxCommandEvent);
+wxDEFINE_EVENT(INVALIDATE_BUTTON_EVENT, wxCommandEvent);
+wxDEFINE_EVENT(INVALIDATE_CONTROL_EVENT, wxCommandEvent);
 
 struct TASWiimoteReport
 {
@@ -206,8 +206,8 @@ void TASInputDlg::CreateWiiLayout(int num)
 void TASInputDlg::FinishLayout()
 {
 	Bind(wxEVT_CLOSE_WINDOW, &TASInputDlg::OnCloseWindow, this);
-	Bind(GCPAD_UPDATE_CALLBACK, &TASInputDlg::GetValuesCallback, this);
-	Bind(WIIMOTE_UPDATE_CALLBACK, &TASInputDlg::GetValuesCallback, this);
+	Bind(INVALIDATE_BUTTON_EVENT, &TASInputDlg::UpdateFromInvalidatedButton, this);
+	Bind(INVALIDATE_CONTROL_EVENT, &TASInputDlg::UpdateFromInvalidatedControl, this);
 	m_has_layout = true;
 }
 
@@ -455,7 +455,10 @@ void TASInputDlg::ResetValues()
 	for (Button* const button : m_buttons)
 	{
 		if (button != nullptr)
+		{
+			button->value = false;
 			button->checkbox->SetValue(false);
+		}
 	}
 
 	for (Control* const control : m_controls)
@@ -469,10 +472,13 @@ void TASInputDlg::ResetValues()
 	}
 	if (m_ext == 2)
 	{
-		for (Button const button : m_cc_buttons)
+		for (Button& button : m_cc_buttons)
+		{
+			button.value = false;
 			button.checkbox->SetValue(false);
+		}
 
-		for (Control* const control : m_cc_controls)
+		for (Control* control : m_cc_controls)
 		{
 			control->value = control->default_value;
 			control->slider->SetValue(control->default_value);
@@ -481,24 +487,24 @@ void TASInputDlg::ResetValues()
 	}
 }
 
-void TASInputDlg::SetStickValue(bool* ActivatedByKeyboard, int* AmountPressed, wxTextCtrl* Textbox, int CurrentValue, int center)
+void TASInputDlg::SetStickValue(Control* control, int CurrentValue, int center)
 {
 	if (CurrentValue != center)
 	{
-		*AmountPressed = CurrentValue;
-		*ActivatedByKeyboard = true;
+		control->value = CurrentValue;
+		control->set_by_keyboard = true;
 	}
-	else if (*ActivatedByKeyboard)
+	else if (control->set_by_keyboard)
 	{
-		*AmountPressed = center;
-		*ActivatedByKeyboard = false;
+		control->value = center;
+		control->set_by_keyboard = false;
 	}
 	else
 	{
 		return;
 	}
 
-	Textbox->SetValue(std::to_string(*AmountPressed));
+	InvalidateControl(control);
 }
 
 void TASInputDlg::SetSliderValue(Control* control, int CurrentValue)
@@ -507,14 +513,18 @@ void TASInputDlg::SetSliderValue(Control* control, int CurrentValue)
 	{
 		control->value = CurrentValue;
 		control->set_by_keyboard = true;
-		control->text->SetValue(std::to_string(CurrentValue));
 	}
 	else if (control->set_by_keyboard)
 	{
 		control->value = control->default_value;
 		control->set_by_keyboard = false;
-		control->text->SetValue(std::to_string(control->default_value));
 	}
+	else
+	{
+		return;
+	}
+
+	InvalidateControl(control);
 }
 
 void TASInputDlg::SetButtonValue(Button* button, bool CurrentState)
@@ -522,13 +532,18 @@ void TASInputDlg::SetButtonValue(Button* button, bool CurrentState)
 	if (CurrentState)
 	{
 		button->set_by_keyboard = true;
-		button->checkbox->SetValue(CurrentState);
 	}
 	else if (button->set_by_keyboard)
 	{
 		button->set_by_keyboard = false;
-		button->checkbox->SetValue(CurrentState);
 	}
+	else
+	{
+		return;
+	}
+
+	button->value = CurrentState;
+	InvalidateButton(button);
 }
 
 void TASInputDlg::SetWiiButtons(u16* butt)
@@ -543,11 +558,11 @@ void TASInputDlg::SetWiiButtons(u16* butt)
 
 void TASInputDlg::GetKeyBoardInput(GCPadStatus* PadStatus)
 {
-	SetStickValue(&m_main_stick.x_cont.set_by_keyboard, &m_main_stick.x_cont.value, m_main_stick.x_cont.text, PadStatus->stickX);
-	SetStickValue(&m_main_stick.y_cont.set_by_keyboard, &m_main_stick.y_cont.value, m_main_stick.y_cont.text, PadStatus->stickY);
+	SetStickValue(&m_main_stick.x_cont, PadStatus->stickX);
+	SetStickValue(&m_main_stick.y_cont, PadStatus->stickY);
 
-	SetStickValue(&m_c_stick.x_cont.set_by_keyboard, &m_c_stick.x_cont.value, m_c_stick.x_cont.text, PadStatus->substickX);
-	SetStickValue(&m_c_stick.y_cont.set_by_keyboard, &m_c_stick.y_cont.value, m_c_stick.y_cont.text, PadStatus->substickY);
+	SetStickValue(&m_c_stick.x_cont, PadStatus->substickX);
+	SetStickValue(&m_c_stick.y_cont, PadStatus->substickY);
 	SetSliderValue(&m_l_cont, PadStatus->triggerLeft);
 	SetSliderValue(&m_r_cont, PadStatus->triggerRight);
 
@@ -614,9 +629,15 @@ void TASInputDlg::GetKeyBoardInput(u8* data, WiimoteEmu::ReportFeatures rptf, in
 		}
 
 		if (m_cc_l.value == 31)
-			m_cc_buttons[10].checkbox->SetValue(true);
+		{
+			m_cc_buttons[10].value = true;
+			InvalidateButton(&m_cc_buttons[10]);
+		}
 		if (m_cc_r.value == 31)
-			m_cc_buttons[11].checkbox->SetValue(true);
+		{
+			m_cc_buttons[11].value = true;
+			InvalidateButton(&m_cc_buttons[11]);
+		}
 
 		SetSliderValue(&m_cc_l_stick.x_cont, cc.regular_data.lx);
 		SetSliderValue(&m_cc_l_stick.y_cont, cc.regular_data.ly);
@@ -631,15 +652,6 @@ void TASInputDlg::GetValues(u8* data, WiimoteEmu::ReportFeatures rptf, int ext,
 	if (!IsShown() || !m_has_layout)
 		return;
 
-	if (!wxIsMainThread())
-	{
-		TASWiimoteReport* report = new TASWiimoteReport{ data, rptf, ext, key };
-		wxCommandEvent* evt = new wxCommandEvent(WIIMOTE_UPDATE_CALLBACK);
-		evt->SetClientData(report);
-		wxQueueEvent(this, evt);
-		return;
-	}
-
 	GetKeyBoardInput(data, rptf, ext, key);
 
 	u8* const coreData = rptf.core ? (data + rptf.core) : nullptr;
@@ -777,37 +789,11 @@ void TASInputDlg::GetValues(u8* data, WiimoteEmu::ReportFeatures rptf, int ext,
 	}
 }
 
-void TASInputDlg::GetValuesCallback(wxCommandEvent& event)
-{
-	if (event.GetEventType() == WIIMOTE_UPDATE_CALLBACK)
-	{
-		TASWiimoteReport* report = static_cast<TASWiimoteReport*>(event.GetClientData());
-		GetValues(report->data, report->rptf, report->ext, report->key);
-		delete report;
-	}
-	else if (event.GetEventType() == GCPAD_UPDATE_CALLBACK)
-	{
-		GCPadStatus* pad = static_cast<GCPadStatus*>(event.GetClientData());
-		GetValues(pad);
-		delete pad;
-	}
-}
-
 void TASInputDlg::GetValues(GCPadStatus* PadStatus)
 {
 	if (!IsShown() || !m_has_layout)
 		return;
 
-	if (!wxIsMainThread())
-	{
-		GCPadStatus* status = new GCPadStatus(*PadStatus);
-		wxCommandEvent* evt = new wxCommandEvent(GCPAD_UPDATE_CALLBACK);
-		evt->SetClientData(status);
-		wxQueueEvent(this, evt);
-		return;
-	}
-
-
 	//TODO:: Make this instant not when polled.
 	GetKeyBoardInput(PadStatus);
 
@@ -875,6 +861,7 @@ void TASInputDlg::UpdateFromText(wxCommandEvent& event)
 		{
 			int v = (value > control->range) ? control->range : value;
 			control->slider->SetValue(v);
+			control->text->ChangeValue(std::to_string(v));
 			control->value = v;
 		}
 	}
@@ -885,6 +872,7 @@ void TASInputDlg::UpdateFromText(wxCommandEvent& event)
 		{
 			int v = (value > control->range) ? control->range : value;
 			control->slider->SetValue(v);
+			control->text->ChangeValue(std::to_string(v));
 			control->value = v;
 		}
 	}
@@ -1072,19 +1060,65 @@ void TASInputDlg::ButtonTurbo()
 		for (Button* const button : m_buttons)
 		{
 			if (button != nullptr && button->turbo_on)
-				button->checkbox->SetValue(!button->checkbox->GetValue());
+			{
+				button->value = !button->checkbox->GetValue();
+				InvalidateButton(button);
+			}
 		}
 		if (m_ext == 2)
 		{
-			for (Button const button : m_cc_buttons)
+			for (Button& button : m_cc_buttons)
 			{
 				if (button.turbo_on)
-					button.checkbox->SetValue(!button.checkbox->GetValue());
+				{
+					button.value = !button.checkbox->GetValue();
+					InvalidateButton(&button);
+				}
 			}
 		}
 	}
 }
 
+void TASInputDlg::InvalidateButton(Button* button)
+{
+	if (!wxIsMainThread())
+	{
+		wxCommandEvent* evt = new wxCommandEvent(INVALIDATE_BUTTON_EVENT, button->id);
+		evt->SetClientData(button);
+		wxQueueEvent(this, evt);
+		return;
+	}
+
+	button->checkbox->SetValue(button->value);
+}
+
+void TASInputDlg::InvalidateControl(Control* control)
+{
+	if (!wxIsMainThread())
+	{
+		wxCommandEvent* evt = new wxCommandEvent(INVALIDATE_CONTROL_EVENT, control->text_id);
+		evt->SetClientData(control);
+		wxQueueEvent(this, evt);
+		return;
+	}
+
+	control->text->SetValue(std::to_string(control->value));
+}
+
+void TASInputDlg::UpdateFromInvalidatedButton(wxCommandEvent& event)
+{
+	Button* button = static_cast<Button*>(event.GetClientData());
+	_assert_msg_(PAD, button->id == button->checkbox->GetId(), "Button ids do not match: %i != %i", button->id, button->checkbox->GetId());
+	button->checkbox->SetValue(button->value);
+}
+
+void TASInputDlg::UpdateFromInvalidatedControl(wxCommandEvent& event)
+{
+	Control* control = static_cast<Control*>(event.GetClientData());
+	_assert_msg_(PAD, control->text_id == control->text->GetId(), "Control ids do not match: %i != %i", control->text_id, control->text->GetId());
+	control->text->SetValue(std::to_string(control->value));
+}
+
 wxBitmap TASInputDlg::CreateStickBitmap(int x, int y)
 {
 	x = x / 2;
diff --git a/Source/Core/DolphinWX/TASInputDlg.h b/Source/Core/DolphinWX/TASInputDlg.h
index 8389781..fc72e90 100644
--- a/Source/Core/DolphinWX/TASInputDlg.h
+++ b/Source/Core/DolphinWX/TASInputDlg.h
@@ -76,6 +76,7 @@ class TASInputDlg : public wxDialog
 		struct Button
 		{
 			wxCheckBox* checkbox;
+			bool value = false;
 			bool set_by_keyboard = false;
 			bool turbo_on = false;
 			int id;
@@ -90,12 +91,15 @@ class TASInputDlg : public wxDialog
 
 		wxBoxSizer* CreateCCLayout();
 		void FinishLayout();
-		void GetValuesCallback(wxCommandEvent& event);
-		void SetStickValue(bool* ActivatedByKeyboard, int* AmountPressed, wxTextCtrl* Textbox, int CurrentValue, int center = 128);
+		void SetStickValue(Control* stick, int CurrentValue, int center = 128);
 		void SetButtonValue(Button* button, bool CurrentState);
 		void SetSliderValue(Control* control, int CurrentValue);
 		void CreateBaseLayout();
 		void UpdateStickBitmap(Stick stick);
+		void InvalidateButton(Button* button);
+		void InvalidateControl(Control* button);
+		void UpdateFromInvalidatedButton(wxCommandEvent& event);
+		void UpdateFromInvalidatedControl(wxCommandEvent& event);
 		Stick* FindStickByID(int id);
 		Stick CreateStick(int id_stick, int xRange, int yRange, u32 defaultX, u32 defaultY, bool reverseX, bool reverseY);
 		wxStaticBoxSizer* CreateStickLayout(Stick* tempStick, const wxString& title);
diff --git a/Source/Core/VideoBackends/OGL/GLInterface/AGL.cpp b/Source/Core/VideoBackends/OGL/GLInterface/AGL.cpp
index 924fdea..62286cb 100644
--- a/Source/Core/VideoBackends/OGL/GLInterface/AGL.cpp
+++ b/Source/Core/VideoBackends/OGL/GLInterface/AGL.cpp
@@ -15,7 +15,7 @@ void cInterfaceAGL::Swap()
 
 // Create rendering window.
 // Call browser: Core.cpp:EmuThread() > main.cpp:Video_Initialize()
-bool cInterfaceAGL::Create(void *window_handle)
+bool cInterfaceAGL::Create(void *window_handle, bool core)
 {
 	cocoaWin = reinterpret_cast<NSView*>(window_handle);
 	NSSize size = [cocoaWin frame].size;
@@ -33,7 +33,7 @@ bool cInterfaceAGL::Create(void *window_handle)
 	s_backbuffer_width = size.width;
 	s_backbuffer_height = size.height;
 
-	NSOpenGLPixelFormatAttribute attr[] = { NSOpenGLPFADoubleBuffer, NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core, NSOpenGLPFAAccelerated, 0 };
+	NSOpenGLPixelFormatAttribute attr[] = { NSOpenGLPFADoubleBuffer, NSOpenGLPFAOpenGLProfile, core ? NSOpenGLProfileVersion3_2Core : NSOpenGLProfileVersionLegacy, NSOpenGLPFAAccelerated, 0 };
 	NSOpenGLPixelFormat *fmt = [[NSOpenGLPixelFormat alloc]
 		initWithAttributes: attr];
 	if (fmt == nil)
diff --git a/Source/Core/VideoBackends/OGL/GLInterface/AGL.h b/Source/Core/VideoBackends/OGL/GLInterface/AGL.h
index f228bcb..4e453aa 100644
--- a/Source/Core/VideoBackends/OGL/GLInterface/AGL.h
+++ b/Source/Core/VideoBackends/OGL/GLInterface/AGL.h
@@ -17,7 +17,7 @@ private:
 	NSOpenGLContext *cocoaCtx;
 public:
 	void Swap();
-	bool Create(void *window_handle);
+	bool Create(void *window_handle, bool core);
 	bool MakeCurrent();
 	bool ClearCurrent();
 	void Shutdown();
diff --git a/Source/Core/VideoBackends/OGL/GLInterface/EGL.cpp b/Source/Core/VideoBackends/OGL/GLInterface/EGL.cpp
index f83b540..6e99030 100644
--- a/Source/Core/VideoBackends/OGL/GLInterface/EGL.cpp
+++ b/Source/Core/VideoBackends/OGL/GLInterface/EGL.cpp
@@ -84,7 +84,7 @@ err_exit:
 
 // Create rendering window.
 // Call browser: Core.cpp:EmuThread() > main.cpp:Video_Initialize()
-bool cInterfaceEGL::Create(void *window_handle)
+bool cInterfaceEGL::Create(void *window_handle, bool core)
 {
 	const char *s;
 	EGLint egl_major, egl_minor;
diff --git a/Source/Core/VideoBackends/OGL/GLInterface/EGL.h b/Source/Core/VideoBackends/OGL/GLInterface/EGL.h
index 2d290bf..c54b0e5 100644
--- a/Source/Core/VideoBackends/OGL/GLInterface/EGL.h
+++ b/Source/Core/VideoBackends/OGL/GLInterface/EGL.h
@@ -26,7 +26,7 @@ public:
 	void Swap();
 	void SetMode(u32 mode) { s_opengl_mode = mode; }
 	void* GetFuncAddress(const std::string& name);
-	bool Create(void *window_handle);
+	bool Create(void *window_handle, bool core);
 	bool MakeCurrent();
 	void Shutdown();
 };
diff --git a/Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp b/Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp
index 623466c..3cb75ec 100644
--- a/Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp
+++ b/Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp
@@ -44,7 +44,7 @@ void cInterfaceGLX::Swap()
 
 // Create rendering window.
 // Call browser: Core.cpp:EmuThread() > main.cpp:Video_Initialize()
-bool cInterfaceGLX::Create(void *window_handle)
+bool cInterfaceGLX::Create(void *window_handle, bool core)
 {
 	dpy = XOpenDisplay(nullptr);
 	int screen = DefaultScreen(dpy);
@@ -94,6 +94,9 @@ bool cInterfaceGLX::Create(void *window_handle)
 	// Get an appropriate visual
 	XVisualInfo* vi = glXGetVisualFromFBConfig(dpy, fbconfig);
 
+	s_glxError = false;
+	XErrorHandler oldHandler = XSetErrorHandler(&ctxErrorHandler);
+
 	// Create a GLX context.
 	// We try to get a 3.3 core profile, else we try it with anything we get.
 	int context_attribs[] =
@@ -104,10 +107,12 @@ bool cInterfaceGLX::Create(void *window_handle)
 		GLX_CONTEXT_FLAGS_ARB,         GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB,
 		None
 	};
-	s_glxError = false;
-	XErrorHandler oldHandler = XSetErrorHandler(&ctxErrorHandler);
-	ctx = glXCreateContextAttribs(dpy, fbconfig, 0, True, context_attribs);
-	XSync(dpy, False);
+	ctx = nullptr;
+	if (core)
+	{
+		ctx = glXCreateContextAttribs(dpy, fbconfig, 0, True, context_attribs);
+		XSync(dpy, False);
+	}
 	if (!ctx || s_glxError)
 	{
 		int context_attribs_legacy[] =
diff --git a/Source/Core/VideoBackends/OGL/GLInterface/GLX.h b/Source/Core/VideoBackends/OGL/GLInterface/GLX.h
index b9d047b..d1431f9 100644
--- a/Source/Core/VideoBackends/OGL/GLInterface/GLX.h
+++ b/Source/Core/VideoBackends/OGL/GLInterface/GLX.h
@@ -23,7 +23,7 @@ public:
 	void SwapInterval(int Interval) override;
 	void Swap() override;
 	void* GetFuncAddress(const std::string& name) override;
-	bool Create(void *window_handle) override;
+	bool Create(void *window_handle, bool core) override;
 	bool MakeCurrent() override;
 	bool ClearCurrent() override;
 	void Shutdown() override;
diff --git a/Source/Core/VideoBackends/OGL/GLInterface/WGL.cpp b/Source/Core/VideoBackends/OGL/GLInterface/WGL.cpp
index b974bb5..27f36e6 100644
--- a/Source/Core/VideoBackends/OGL/GLInterface/WGL.cpp
+++ b/Source/Core/VideoBackends/OGL/GLInterface/WGL.cpp
@@ -57,7 +57,7 @@ bool cInterfaceWGL::PeekMessages()
 
 // Create rendering window.
 // Call browser: Core.cpp:EmuThread() > main.cpp:Video_Initialize()
-bool cInterfaceWGL::Create(void *window_handle)
+bool cInterfaceWGL::Create(void *window_handle, bool core)
 {
 	if (window_handle == nullptr)
 		return false;
diff --git a/Source/Core/VideoBackends/OGL/GLInterface/WGL.h b/Source/Core/VideoBackends/OGL/GLInterface/WGL.h
index 6c1ece4..4382a0c 100644
--- a/Source/Core/VideoBackends/OGL/GLInterface/WGL.h
+++ b/Source/Core/VideoBackends/OGL/GLInterface/WGL.h
@@ -13,7 +13,7 @@ public:
 	void SwapInterval(int Interval);
 	void Swap();
 	void* GetFuncAddress(const std::string& name);
-	bool Create(void *window_handle);
+	bool Create(void *window_handle, bool core);
 	bool MakeCurrent();
 	bool ClearCurrent();
 	void Shutdown();
diff --git a/Source/Core/VideoBackends/OGL/GLInterfaceBase.h b/Source/Core/VideoBackends/OGL/GLInterfaceBase.h
index 31d107a..84d4be9 100644
--- a/Source/Core/VideoBackends/OGL/GLInterfaceBase.h
+++ b/Source/Core/VideoBackends/OGL/GLInterfaceBase.h
@@ -29,7 +29,7 @@ public:
 	virtual void SetMode(u32 mode) { s_opengl_mode = GLInterfaceMode::MODE_OPENGL; }
 	virtual u32 GetMode() { return s_opengl_mode; }
 	virtual void* GetFuncAddress(const std::string& name) { return nullptr; }
-	virtual bool Create(void *window_handle) { return true; }
+	virtual bool Create(void *window_handle, bool core = true) { return true; }
 	virtual bool MakeCurrent() { return true; }
 	virtual bool ClearCurrent() { return true; }
 	virtual void Shutdown() {}
diff --git a/Source/Core/VideoBackends/Software/SWmain.cpp b/Source/Core/VideoBackends/Software/SWmain.cpp
index e0afd7d..915d246 100644
--- a/Source/Core/VideoBackends/Software/SWmain.cpp
+++ b/Source/Core/VideoBackends/Software/SWmain.cpp
@@ -78,7 +78,7 @@ bool VideoSoftware::Initialize(void *window_handle)
 
 	InitInterface();
 	GLInterface->SetMode(GLInterfaceMode::MODE_DETECT);
-	if (!GLInterface->Create(window_handle))
+	if (!GLInterface->Create(window_handle, false))
 	{
 		INFO_LOG(VIDEO, "GLInterface::Create failed.");
 		return false;
diff --git a/Source/Core/VideoCommon/VertexLoaderX64.cpp b/Source/Core/VideoCommon/VertexLoaderX64.cpp
index a298d7e..1b87b89 100644
--- a/Source/Core/VideoCommon/VertexLoaderX64.cpp
+++ b/Source/Core/VideoCommon/VertexLoaderX64.cpp
@@ -38,7 +38,7 @@ VertexLoaderX64::VertexLoaderX64(const TVtxDesc& vtx_desc, const VAT& vtx_att) :
 	if (!IsInitialized())
 		return;
 
-	AllocCodeSpace(4096);
+	AllocCodeSpace(4096, false);
 	ClearCodeSpace();
 	GenerateVertexLoader();
 	WriteProtect();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/dolphin-emu.git



More information about the Pkg-games-commits mailing list