mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-05 04:05:27 +02:00
Added new option "Copy Float (32 bit)" to Windows Debugger UI
This commit is contained in:
committed by
Henrik Rydgård
parent
f40795c4b7
commit
b1074e1a08
@@ -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