diff options
| author | Lioncash <mathew1800@gmail.com> | 2015-08-06 00:04:34 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2015-08-06 10:09:12 -0400 |
| commit | bef7af11588b56d45f96950ace4d36cd40609c6c (patch) | |
| tree | 3b7517d22a8005136814dd0ea4e1b68881cc6a92 /Source/Core | |
| parent | 5882d76a6c625b9a983be8ae0f596a1970e94533 (diff) | |
CheatSearchTab: Display floating point equivalent results
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinWX/Cheats/CheatSearchTab.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/Core/DolphinWX/Cheats/CheatSearchTab.cpp b/Source/Core/DolphinWX/Cheats/CheatSearchTab.cpp index df73e085dd..1074cc6f9e 100644 --- a/Source/Core/DolphinWX/Cheats/CheatSearchTab.cpp +++ b/Source/Core/DolphinWX/Cheats/CheatSearchTab.cpp @@ -3,6 +3,7 @@ // Refer to the license.txt file included. #include <array> +#include <cstring> #include <wx/button.h> #include <wx/choice.h> #include <wx/listctrl.h> @@ -294,6 +295,16 @@ void CheatSearchTab::UpdateCheatSearchResultsList() buf.Printf("0x%08X", display_value); m_lview_search_results->SetItem(index, 1, buf); + + float display_value_float = 0.0f; + std::memcpy(&display_value_float, &display_value, sizeof(u32)); + buf.Printf("%e", display_value_float); + m_lview_search_results->SetItem(index, 2, buf); + + double display_value_double = 0.0; + std::memcpy(&display_value_double, &display_value, sizeof(u32)); + buf.Printf("%e", display_value_double); + m_lview_search_results->SetItem(index, 3, buf); } m_lview_search_results->Thaw(); @@ -320,4 +331,6 @@ void CheatSearchTab::ResetListViewColumns() { m_lview_search_results->AppendColumn(_("Address")); m_lview_search_results->AppendColumn(_("Value")); + m_lview_search_results->AppendColumn(_("Value (float)")); + m_lview_search_results->AppendColumn(_("Value (double)")); } |
