Remove "LED" text and replace with LLE flags text

This commit is contained in:
Voxel9 2018-05-28 11:24:57 +01:00
parent 57a70654ee
commit 18a48546fe
4 changed files with 26 additions and 8 deletions

Binary file not shown.

Binary file not shown.

View File

@ -1,6 +1,6 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by C:\Users\anonymous\Documents\xbox\Cxbx-Reloaded\resource\Cxbx.rc
// Used by C:\Work\Cxbx-Reloaded\resource\Cxbx.rc
//
#define IDI_CXBX 101
#define IDB_SPLASH 102

View File

@ -1924,7 +1924,7 @@ void WndMain::UpdateCaption()
char sMenu[32];
mii.dwTypeData = &sMenu[0];
if (m_bIsStarted) {
if (m_bIsStarted) {
if (g_EmuShared != NULL) {
float currentFPSVal = 0;
float currentMSpFVal = 0;
@ -2325,9 +2325,18 @@ void WndMain::DrawLedBitmap(HWND hwnd, bool bdefault)
HMENU hMenu = GetMenu(hwnd);
int ActiveLEDColor;
// When so requested, or when not emulating, draw a black bitmap
MENUITEMINFO mii = { 0 };
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_FTYPE | MIIM_BITMAP | MIIM_STRING;
char flagString[10] = "LLE-";
mii.dwTypeData = &flagString[0];
mii.fType = MFT_RIGHTJUSTIFY;
mii.hbmpItem = m_LedBmp;
// When so requested, or when not emulating, draw a black bitmap and hide LLE flags string
if (bdefault || !m_bIsStarted) {
ActiveLEDColor = XBOX_LED_COLOUR_OFF;
sprintf(flagString, " ");
}
else { // draw colored bitmap
int LedSequence[4] = { XBOX_LED_COLOUR_OFF, XBOX_LED_COLOUR_OFF, XBOX_LED_COLOUR_OFF, XBOX_LED_COLOUR_OFF };
@ -2338,6 +2347,20 @@ void WndMain::DrawLedBitmap(HWND hwnd, bool bdefault)
// Select active color and cycle through all 4 phases in the sequence
ActiveLEDColor = LedSequence[LedSequenceOffset & 3];
++LedSequenceOffset;
// Set LLE flags string based on selected LLE flags
if (m_FlagsLLE & LLE_APU) {
strcat(flagString, "A");
}
if (m_FlagsLLE & LLE_GPU) {
strcat(flagString, "G");
}
if (m_FlagsLLE & LLE_JIT) {
strcat(flagString, "J");
}
if (m_FlagsLLE == 0) {
sprintf(flagString, "HLE");
}
}
SelectObject(m_LedDC, m_Brushes[ActiveLEDColor]);
@ -2347,11 +2370,6 @@ void WndMain::DrawLedBitmap(HWND hwnd, bool bdefault)
Rectangle(m_LedDC, 0, 0, m_xBmp, m_yBmp);
m_LedBmp = (HBITMAP)SelectObject(m_LedDC, m_OriLed);
MENUITEMINFO mii = { 0 };
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_FTYPE | MIIM_BITMAP;
mii.fType = MFT_RIGHTJUSTIFY;
mii.hbmpItem = m_LedBmp;
SetMenuItemInfo(hMenu, ID_LED, FALSE, &mii);
DrawMenuBar(hwnd);