aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2019-06-03 17:01:53 +0200
committerArisotura <thetotalworm@gmail.com>2019-06-03 17:01:53 +0200
commite3dc4e122a6ba822c860c09290925f98cc623532 (patch)
tree0b491ca25f5dbc72da0ccd7706f2bfccacfdd3cb
parent2b3ca2089f7420bb938c6bdda67ed0f8c04e51d5 (diff)
use OSD for some actual purposes
-rw-r--r--src/libui_sdl/OSD.cpp2
-rw-r--r--src/libui_sdl/main.cpp17
2 files changed, 18 insertions, 1 deletions
diff --git a/src/libui_sdl/OSD.cpp b/src/libui_sdl/OSD.cpp
index 851f9c5..c8d5f83 100644
--- a/src/libui_sdl/OSD.cpp
+++ b/src/libui_sdl/OSD.cpp
@@ -205,7 +205,7 @@ void RenderText(u32 color, const char* text, Item* item)
u32 rainbowinc = (text[0] * 17) % 600;
color |= 0xFF000000;
- const u32 shadow = 0xFE000000;
+ const u32 shadow = 0xE0000000;
LayoutText(text, &w, &h, breaks);
diff --git a/src/libui_sdl/main.cpp b/src/libui_sdl/main.cpp
index 073c8ac..cb93294 100644
--- a/src/libui_sdl/main.cpp
+++ b/src/libui_sdl/main.cpp
@@ -1591,6 +1591,11 @@ void LoadState(int slot)
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;
return;
}
@@ -1631,6 +1636,11 @@ void LoadState(int slot)
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;
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;
}
@@ -1714,6 +1729,8 @@ void UndoStateLoad()
NDS::RelocateSave(SRAMPath, false);
}
+ OSD::AddMessage(0, "State load undone");
+
EmuRunning = prevstatus;
}