mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-07 14:19:19 +00:00
Fix a bunch of Windows UI x64 conversion warnings.
This commit is contained in:
parent
89c569612a
commit
4ebd3aaceb
@ -203,7 +203,7 @@ void CtrlDisAsmView::onPaint(WPARAM wParam, LPARAM lParam)
|
||||
int rowY1 = rect.bottom/2 + rowHeight*i - rowHeight/2;
|
||||
int rowY2 = rect.bottom/2 + rowHeight*i + rowHeight/2;
|
||||
char temp[256];
|
||||
sprintf(temp,"%08x",address);
|
||||
int temp_len = sprintf(temp,"%08x",address);
|
||||
|
||||
lbr.lbColor=marker==address?0xffeee0:debugger->getColor(address);
|
||||
u32 bg = lbr.lbColor;
|
||||
@ -228,13 +228,13 @@ void CtrlDisAsmView::onPaint(WPARAM wParam, LPARAM lParam)
|
||||
SelectObject(hdc,currentBrush);
|
||||
DeleteObject(mojsBrush);
|
||||
SetTextColor(hdc,halfAndHalf(bg,0));
|
||||
TextOut(hdc,17,rowY1,temp,strlen(temp));
|
||||
TextOut(hdc,17,rowY1,temp,temp_len);
|
||||
SetTextColor(hdc,0x000000);
|
||||
if (debugger->isAlive())
|
||||
{
|
||||
const TCHAR *dizz = debugger->disasm(address, align);
|
||||
char dis[512];
|
||||
strcpy(dis, dizz);
|
||||
char dis[512];
|
||||
strcpy(dis, dizz);
|
||||
TCHAR *dis2 = strchr(dis,'\t');
|
||||
TCHAR desc[256]="";
|
||||
if (dis2)
|
||||
@ -278,11 +278,11 @@ void CtrlDisAsmView::onPaint(WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
else
|
||||
SetTextColor(hdc,0x000000);
|
||||
TextOut(hdc,149,rowY1,dis2,strlen(dis2));
|
||||
TextOut(hdc,149,rowY1,dis2,(int)strlen(dis2));
|
||||
}
|
||||
SetTextColor(hdc,0x007000);
|
||||
SelectObject(hdc,boldfont);
|
||||
TextOut(hdc,84,rowY1,dis,strlen(dis));
|
||||
TextOut(hdc,84,rowY1,dis,(int)strlen(dis));
|
||||
SelectObject(hdc,font);
|
||||
if (desc[0]==0)
|
||||
{
|
||||
@ -300,7 +300,7 @@ void CtrlDisAsmView::onPaint(WPARAM wParam, LPARAM lParam)
|
||||
//char temp[256];
|
||||
//UnDecorateSymbolName(desc,temp,255,UNDNAME_COMPLETE);
|
||||
if (strlen(desc))
|
||||
TextOut(hdc,max(280,width/3+190),rowY1,desc,strlen(desc));
|
||||
TextOut(hdc,max(280,width/3+190),rowY1,desc,(int)strlen(desc));
|
||||
if (debugger->isBreakpoint(address))
|
||||
{
|
||||
DrawIconEx(hdc,2,rowY1,breakPoint,32,32,0,0,DI_NORMAL);
|
||||
|
@ -180,7 +180,7 @@ void CtrlMemView::onPaint(WPARAM wParam, LPARAM lParam)
|
||||
Rectangle(hdc,16,rowY1,width,rowY2);
|
||||
SelectObject(hdc,nullBrush);
|
||||
SetTextColor(hdc,0x600000);
|
||||
TextOut(hdc,17,rowY1,temp,strlen(temp));
|
||||
TextOut(hdc,17,rowY1,temp,(int)strlen(temp));
|
||||
SetTextColor(hdc,0x000000);
|
||||
if (debugger->isAlive())
|
||||
{
|
||||
@ -188,9 +188,9 @@ void CtrlMemView::onPaint(WPARAM wParam, LPARAM lParam)
|
||||
switch(mode) {
|
||||
case MV_NORMAL:
|
||||
{
|
||||
const char *m = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
|
||||
if (Memory::IsValidAddress(address))
|
||||
{
|
||||
const char *m = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
|
||||
if (Memory::IsValidAddress(address))
|
||||
{
|
||||
u32 memory[4] = {
|
||||
debugger->readMemory(address),
|
||||
debugger->readMemory(address+4),
|
||||
@ -200,7 +200,7 @@ void CtrlMemView::onPaint(WPARAM wParam, LPARAM lParam)
|
||||
m = (const char*)memory;
|
||||
sprintf(temp, "%08x %08x %08x %08x ................",
|
||||
memory[0],memory[1],memory[2],memory[3]);
|
||||
}
|
||||
}
|
||||
for (int i=0; i<16; i++)
|
||||
{
|
||||
int c = (unsigned char)m[i];
|
||||
@ -211,7 +211,7 @@ void CtrlMemView::onPaint(WPARAM wParam, LPARAM lParam)
|
||||
// if (align == 16)
|
||||
// else
|
||||
// sprintf(temp, "%04x %04x %04x %04x", ReadMem16Unchecked(address),ReadMem16Unchecked(address+2), ReadMem16Unchecked(address+4), ReadMem16Unchecked(address+6))
|
||||
TextOut(hdc,80,rowY1,temp,strlen(temp));
|
||||
TextOut(hdc,80,rowY1,temp,(int)strlen(temp));
|
||||
break;
|
||||
|
||||
case MV_SYMBOLS:
|
||||
@ -224,7 +224,7 @@ void CtrlMemView::onPaint(WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
else
|
||||
sprintf(temp, "%s (0x%x b)", symbolMap.GetSymbolName(fn),symbolMap.GetSymbolSize(fn));
|
||||
TextOut(hdc,200,rowY1,temp,strlen(temp));
|
||||
TextOut(hdc,200,rowY1,temp,(int)strlen(temp));
|
||||
|
||||
SetTextColor(hdc,0x0000000);
|
||||
|
||||
@ -239,7 +239,7 @@ void CtrlMemView::onPaint(WPARAM wParam, LPARAM lParam)
|
||||
sprintf(temp, "%04x [%s]", value, symbolMap.GetSymbolName(symbolMap.GetSymbolNum(value)));
|
||||
}
|
||||
|
||||
TextOut(hdc,70,rowY1,temp,strlen(temp));
|
||||
TextOut(hdc,70,rowY1,temp,(int)strlen(temp));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ void CtrlRegisterList::onPaint(WPARAM wParam, LPARAM lParam)
|
||||
SelectObject(hdc,i==category?pcBrush:nullBrush);
|
||||
Rectangle(hdc,width*i/nc,0,width*(i+1)/nc,rowHeight);
|
||||
const TCHAR *name = cpu->GetCategoryName(i);
|
||||
TextOut(hdc,width*i/nc,1,name,strlen(name));
|
||||
TextOut(hdc,width*i/nc,1,name,(int)strlen(name));
|
||||
}
|
||||
|
||||
int numRows=rect.bottom/rowHeight;
|
||||
@ -238,9 +238,9 @@ void CtrlRegisterList::onPaint(WPARAM wParam, LPARAM lParam)
|
||||
if (i<cpu->GetNumRegsInCategory(category))
|
||||
{
|
||||
char temp[256];
|
||||
sprintf(temp,"%s",cpu->GetRegName(category,i));
|
||||
int temp_len = sprintf(temp,"%s",cpu->GetRegName(category,i));
|
||||
SetTextColor(hdc,0x600000);
|
||||
TextOut(hdc,17,rowY1,temp,strlen(temp));
|
||||
TextOut(hdc,17,rowY1,temp,temp_len);
|
||||
SetTextColor(hdc,0x000000);
|
||||
|
||||
cpu->PrintRegValue(category,i,temp);
|
||||
@ -248,7 +248,7 @@ void CtrlRegisterList::onPaint(WPARAM wParam, LPARAM lParam)
|
||||
SetTextColor(hdc, 0x0000FF);
|
||||
else
|
||||
SetTextColor(hdc,0x004000);
|
||||
TextOut(hdc,77,rowY1,temp,strlen(temp));
|
||||
TextOut(hdc,77,rowY1,temp,(int)strlen(temp));
|
||||
}
|
||||
|
||||
|
||||
|
@ -82,11 +82,11 @@ BOOL CMemoryDlg::DlgProc(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
case LBN_DBLCLK:
|
||||
case LBN_SELCHANGE:
|
||||
{
|
||||
HWND lb =GetDlgItem(m_hDlg,LOWORD(wParam));
|
||||
int n =ComboBox_GetCurSel(lb);
|
||||
HWND lb = GetDlgItem(m_hDlg,LOWORD(wParam));
|
||||
int n = ComboBox_GetCurSel(lb);
|
||||
if (n!=-1)
|
||||
{
|
||||
LONG_PTR addr = ComboBox_GetItemData(lb,n);
|
||||
unsigned int addr = (unsigned int)ComboBox_GetItemData(lb,n);
|
||||
mv->gotoAddr(addr);
|
||||
}
|
||||
}
|
||||
@ -100,8 +100,8 @@ BOOL CMemoryDlg::DlgProc(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
case LBN_SELCHANGE:
|
||||
{
|
||||
|
||||
HWND lb =GetDlgItem(m_hDlg,LOWORD(wParam));
|
||||
int n =ListBox_GetCurSel(lb);
|
||||
HWND lb = GetDlgItem(m_hDlg,LOWORD(wParam));
|
||||
int n = ListBox_GetCurSel(lb);
|
||||
if (n!=-1)
|
||||
{
|
||||
unsigned int addr = (unsigned int)ListBox_GetItemData(lb,n);
|
||||
|
@ -31,23 +31,23 @@ CVFPUDlg::CVFPUDlg(HINSTANCE _hInstance, HWND _hParent, DebugInterface *cpu_) :
|
||||
tcItem.mask = TCIF_TEXT;
|
||||
tcItem.dwState = 0;
|
||||
tcItem.pszText = "Float";
|
||||
tcItem.cchTextMax = strlen(tcItem.pszText)+1;
|
||||
tcItem.cchTextMax = (int)strlen(tcItem.pszText)+1;
|
||||
tcItem.iImage = 0;
|
||||
TabCtrl_InsertItem(tabs, TabCtrl_GetItemCount(tabs),&tcItem);
|
||||
tcItem.pszText = "HalfFloat";
|
||||
tcItem.cchTextMax = strlen(tcItem.pszText)+1;
|
||||
tcItem.cchTextMax = (int)strlen(tcItem.pszText)+1;
|
||||
TabCtrl_InsertItem(tabs, TabCtrl_GetItemCount(tabs),&tcItem);
|
||||
tcItem.pszText = "Hex";
|
||||
tcItem.cchTextMax = strlen(tcItem.pszText)+1;
|
||||
tcItem.cchTextMax = (int)strlen(tcItem.pszText)+1;
|
||||
TabCtrl_InsertItem(tabs, TabCtrl_GetItemCount(tabs),&tcItem);
|
||||
tcItem.pszText = "Bytes";
|
||||
tcItem.cchTextMax = strlen(tcItem.pszText)+1;
|
||||
tcItem.cchTextMax = (int)strlen(tcItem.pszText)+1;
|
||||
TabCtrl_InsertItem(tabs, TabCtrl_GetItemCount(tabs),&tcItem);
|
||||
tcItem.pszText = "Shorts";
|
||||
tcItem.cchTextMax = strlen(tcItem.pszText)+1;
|
||||
tcItem.cchTextMax = (int)strlen(tcItem.pszText)+1;
|
||||
TabCtrl_InsertItem(tabs, TabCtrl_GetItemCount(tabs),&tcItem);
|
||||
tcItem.pszText = "Ints";
|
||||
tcItem.cchTextMax = strlen(tcItem.pszText)+1;
|
||||
tcItem.cchTextMax = (int)strlen(tcItem.pszText)+1;
|
||||
TabCtrl_InsertItem(tabs, TabCtrl_GetItemCount(tabs),&tcItem);
|
||||
mode=0;
|
||||
Size();
|
||||
@ -145,8 +145,8 @@ BOOL CVFPUDlg::DlgProc(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
int my = (int)(yStart + matrix * rowHeight * 5.5f);
|
||||
Rectangle(hdc, 0, my, xStart, my+rowHeight);
|
||||
char temp[256];
|
||||
sprintf_s(temp, "M%i00", matrix);
|
||||
TextOut(hdc,3,my+2,temp,strlen(temp));
|
||||
int temp_len = sprintf_s(temp, "M%i00", matrix);
|
||||
TextOut(hdc,3,my+2,temp,temp_len);
|
||||
Rectangle(hdc,xStart,my+rowHeight,xStart+columnWidth*4,my+5*rowHeight);
|
||||
|
||||
for (int column = 0; column<4; column++)
|
||||
@ -156,12 +156,12 @@ BOOL CVFPUDlg::DlgProc(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
Rectangle(hdc, x, y, x + columnWidth, y+rowHeight);
|
||||
char temp[256];
|
||||
sprintf_s(temp, "R%i0%i", matrix, column);
|
||||
TextOut(hdc,x+3,y+2,temp,strlen(temp));
|
||||
temp_len = sprintf_s(temp, "R%i0%i", matrix, column);
|
||||
TextOut(hdc,x+3,y+2,temp,temp_len);
|
||||
|
||||
Rectangle(hdc, 0, y+rowHeight*(column+1), xStart, y+rowHeight*(column+2));
|
||||
sprintf_s(temp, "C%i%i0", matrix, column);
|
||||
TextOut(hdc,3,y+rowHeight*(column+1)+1,temp,strlen(temp));
|
||||
temp_len = sprintf_s(temp, "C%i%i0", matrix, column);
|
||||
TextOut(hdc,3,y+rowHeight*(column+1)+1,temp,temp_len);
|
||||
|
||||
y+=rowHeight;
|
||||
|
||||
@ -170,15 +170,16 @@ BOOL CVFPUDlg::DlgProc(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
float val = mipsr4k.v[column*32+row+matrix*4];
|
||||
u32 hex = *((u32*)&val);
|
||||
char temp[256];
|
||||
int temp_len;
|
||||
switch (mode)
|
||||
{
|
||||
case 0: sprintf_s(temp,"%f",val); break;
|
||||
// case 1: sprintf_s(temp,"??"); break;
|
||||
case 2: sprintf_s(temp,"0x%08x",hex); break;
|
||||
default:sprintf_s(temp,"%f",val); break;
|
||||
case 0: temp_len = sprintf_s(temp,"%f",val); break;
|
||||
// case 1: temp_len = sprintf_s(temp,"??"); break;
|
||||
case 2: temp_len = sprintf_s(temp,"0x%08x",hex); break;
|
||||
default:temp_len = sprintf_s(temp,"%f",val); break;
|
||||
}
|
||||
|
||||
TextOut(hdc,x+3,y+2,temp,strlen(temp));
|
||||
TextOut(hdc,x+3,y+2,temp,temp_len);
|
||||
y+=rowHeight;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user