use OSD for some actual purposes

This commit is contained in:
Arisotura
2019-06-03 17:01:53 +02:00
parent 2b3ca2089f
commit e3dc4e122a
2 changed files with 18 additions and 1 deletions

View File

@ -205,7 +205,7 @@ void RenderText(u32 color, const char* text, Item* item)
u32 rainbowinc = (text[0] * 17) % 600; u32 rainbowinc = (text[0] * 17) % 600;
color |= 0xFF000000; color |= 0xFF000000;
const u32 shadow = 0xFE000000; const u32 shadow = 0xE0000000;
LayoutText(text, &w, &h, breaks); LayoutText(text, &w, &h, breaks);

View File

@ -1591,6 +1591,11 @@ void LoadState(int slot)
if (!Platform::FileExists(filename)) if (!Platform::FileExists(filename))
{ {
char msg[64];
if (slot > 0) sprintf(msg, "State slot %d is empty", slot);
else sprintf(msg, "State file does not exist");
OSD::AddMessage(0xFFA0A0, msg);
EmuRunning = prevstatus; EmuRunning = prevstatus;
return; return;
} }
@ -1631,6 +1636,11 @@ void LoadState(int slot)
NDS::RelocateSave(SRAMPath, false); NDS::RelocateSave(SRAMPath, false);
} }
char msg[64];
if (slot > 0) sprintf(msg, "State loaded from slot %d", slot);
else sprintf(msg, "State loaded from file");
OSD::AddMessage(0, msg);
SavestateLoaded = true; SavestateLoaded = true;
uiMenuItemEnable(MenuItem_UndoStateLoad); uiMenuItemEnable(MenuItem_UndoStateLoad);
} }
@ -1690,6 +1700,11 @@ void SaveState(int slot)
} }
} }
char msg[64];
if (slot > 0) sprintf(msg, "State saved to slot %d", slot);
else sprintf(msg, "State saved to file");
OSD::AddMessage(0, msg);
EmuRunning = prevstatus; EmuRunning = prevstatus;
} }
@ -1714,6 +1729,8 @@ void UndoStateLoad()
NDS::RelocateSave(SRAMPath, false); NDS::RelocateSave(SRAMPath, false);
} }
OSD::AddMessage(0, "State load undone");
EmuRunning = prevstatus; EmuRunning = prevstatus;
} }