aboutsummaryrefslogtreecommitdiff
path: root/src/libui_sdl/OSD.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libui_sdl/OSD.cpp')
-rw-r--r--src/libui_sdl/OSD.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libui_sdl/OSD.cpp b/src/libui_sdl/OSD.cpp
index 8b87e9d..bd44e99 100644
--- a/src/libui_sdl/OSD.cpp
+++ b/src/libui_sdl/OSD.cpp
@@ -28,6 +28,8 @@
#include "OSD.h"
#include "font.h"
+#include "PlatformConfig.h"
+
extern int WindowWidth, WindowHeight;
namespace OSD
@@ -306,6 +308,8 @@ void RenderText(u32 color, const char* text, Item* item)
void AddMessage(u32 color, const char* text)
{
+ if (!Config::ShowOSD) return;
+
while (Rendering);
Item item;
@@ -341,6 +345,14 @@ void WindowResized(bool opengl)
void Update(bool opengl, uiAreaDrawParams* params)
{
+ if (!Config::ShowOSD)
+ {
+ Rendering = true;
+ if (ItemQueue.size() > 0) DeInit(opengl);
+ Rendering = false;
+ return;
+ }
+
Rendering = true;
Uint32 tick_now = SDL_GetTicks();