win32: Play movie dialog shows New PPU in red if the required setting does not match
This commit is contained in:
parent
baf366f1f2
commit
aafce94aaf
|
@ -730,24 +730,36 @@ BOOL CALLBACK ReplayDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lP
|
||||||
}
|
}
|
||||||
|
|
||||||
case WM_CTLCOLORSTATIC:
|
case WM_CTLCOLORSTATIC:
|
||||||
if((HWND)lParam == GetDlgItem(hwndDlg, IDC_LABEL_CURRCHECKSUM))
|
if ((HWND)lParam == GetDlgItem(hwndDlg, IDC_LABEL_CURRCHECKSUM))
|
||||||
{
|
{
|
||||||
// draw the md5 sum in red if it's different from the md5 of the rom used in the replay
|
// draw the md5 sum in red if it's different from the md5 of the rom used in the replay
|
||||||
HDC hdcStatic = (HDC)wParam;
|
HDC hdcStatic = (HDC)wParam;
|
||||||
char szMd5Text[35];
|
char szMd5Text[35];
|
||||||
|
|
||||||
GetDlgItemText(hwndDlg, IDC_LABEL_ROMCHECKSUM, szMd5Text, 35);
|
GetDlgItemText(hwndDlg, IDC_LABEL_ROMCHECKSUM, szMd5Text, 35);
|
||||||
if(!strlen(szMd5Text) || !strcmp(szMd5Text, "unknown") || !strcmp(szMd5Text, "00000000000000000000000000000000") || !strcmp(szMd5Text, md5_asciistr(GameInfo->MD5)))
|
if (!strlen(szMd5Text) || !strcmp(szMd5Text, "unknown") || !strcmp(szMd5Text, "00000000000000000000000000000000") || !strcmp(szMd5Text, md5_asciistr(GameInfo->MD5)))
|
||||||
SetTextColor(hdcStatic, RGB(0,0,0)); // use black color for a match (or no comparison)
|
SetTextColor(hdcStatic, RGB(0,0,0)); // use black color for a match (or no comparison)
|
||||||
else
|
else
|
||||||
SetTextColor(hdcStatic, RGB(255,0,0)); // use red for a mismatch
|
SetTextColor(hdcStatic, RGB(255,0,0)); // use red for a mismatch
|
||||||
|
|
||||||
SetBkMode((HDC)wParam,TRANSPARENT);
|
SetBkMode((HDC)wParam,TRANSPARENT);
|
||||||
return (BOOL)GetSysColorBrush(COLOR_BTNFACE);
|
return (BOOL)GetSysColorBrush(COLOR_BTNFACE);
|
||||||
}
|
} else if ((HWND)lParam == GetDlgItem(hwndDlg, IDC_LABEL_NEWPPUUSED))
|
||||||
|
{
|
||||||
|
HDC hdcStatic = (HDC)wParam;
|
||||||
|
char szMd5Text[35];
|
||||||
|
GetDlgItemText(hwndDlg, IDC_LABEL_NEWPPUUSED, szMd5Text, 35);
|
||||||
|
bool want_newppu = (bool)strcmp(szMd5Text, "Off");
|
||||||
|
extern int newppu;
|
||||||
|
if ((want_newppu && newppu) || (!want_newppu && !newppu))
|
||||||
|
SetTextColor(hdcStatic, RGB(0,0,0)); // use black color for a match
|
||||||
else
|
else
|
||||||
|
SetTextColor(hdcStatic, RGB(255,0,0)); // use red for a mismatch
|
||||||
|
SetBkMode((HDC)wParam,TRANSPARENT);
|
||||||
|
return (BOOL)GetSysColorBrush(COLOR_BTNFACE);
|
||||||
|
} else
|
||||||
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue