GUI: show segments better in CPUInfoBox

This commit is contained in:
mrexodia 2017-07-29 17:58:54 +02:00
parent b758ea6e9d
commit 3c9a24ec37
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8

View File

@ -182,14 +182,28 @@ void CPUInfoBox::disasmSelectionChanged(dsint parVA)
sizeName = "qword ptr";
break;
}
sizeName.append(' ');
#ifdef _WIN64
if(arg.segment == SEG_GS)
sizeName += "gs:";
#else //x32
if(arg.segment == SEG_FS)
sizeName += "fs:";
#endif
sizeName += [](SEGMENTREG seg)
{
switch(seg)
{
case SEG_ES:
return "es:";
case SEG_DS:
return "ds:";
case SEG_FS:
return "fs:";
case SEG_GS:
return "gs:";
case SEG_CS:
return "cs:";
case SEG_SS:
return "ss:";
default:
return "";
}
}(arg.segment);
if(bUpper)
sizeName = sizeName.toUpper();