mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 01:03:41 +01:00
Added new option "Copy Float (32 bit)" to Windows Debugger UI
This commit is contained in:
1 parent
4739d6c37d
commit
4a54409f09
3 files changed
+13
No files matched your search
@@ -4,6 +4,7 @@
|
||||
#include <tchar.h>
|
||||
#include <math.h>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
#include "ext/xxhash.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/MemMap.h"
|
||||
@@ -496,6 +497,7 @@ void CtrlMemView::onMouseUp(WPARAM wParam, LPARAM lParam, int button) {
|
||||
HMENU menu = GetContextMenu(ContextMenuID::MEMVIEW);
|
||||
EnableMenuItem(menu, ID_MEMVIEW_COPYVALUE_16, enable16 ? MF_ENABLED : MF_GRAYED);
|
||||
EnableMenuItem(menu, ID_MEMVIEW_COPYVALUE_32, enable32 ? MF_ENABLED : MF_GRAYED);
|
||||
EnableMenuItem(menu, ID_MEMVIEW_COPYFLOAT_32, enable32 ? MF_ENABLED : MF_GRAYED);
|
||||
|
||||
switch (TriggerContextMenu(ContextMenuID::MEMVIEW, wnd, ContextPoint::FromEvent(lParam))) {
|
||||
case ID_MEMVIEW_DUMP:
|
||||
@@ -577,6 +579,15 @@ void CtrlMemView::onMouseUp(WPARAM wParam, LPARAM lParam, int button) {
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_MEMVIEW_COPYFLOAT_32:
|
||||
{
|
||||
auto memLock = Memory::Lock();
|
||||
std::ostringstream stream;
|
||||
stream << (Memory::IsValidAddress(curAddress_) ? Memory::Read_Float(curAddress_) : NAN);
|
||||
W32Util::CopyTextToClipboard(wnd, stream.str().c_str());
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_MEMVIEW_EXTENTBEGIN:
|
||||
{
|
||||
std::vector<MemBlockInfo> memRangeInfo = FindMemInfoByFlag(highlightFlags_, curAddress_, 1);
|
||||
|
||||
Reference in new issue
Block a user