From 367d6dfd6569ccd7f1788768bb6e593df2dd4c5d Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Sat, 24 Aug 2013 01:41:17 +0200 Subject: Add an OSD message when taking screenshots in D3D9/D3D11 Fixes issue 6486. --- Source/Core/VideoCommon/Src/OnScreenDisplay.cpp | 5 +++++ Source/Core/VideoCommon/Src/OnScreenDisplay.h | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon') diff --git a/Source/Core/VideoCommon/Src/OnScreenDisplay.cpp b/Source/Core/VideoCommon/Src/OnScreenDisplay.cpp index 29a3837a9a..72abcd5752 100644 --- a/Source/Core/VideoCommon/Src/OnScreenDisplay.cpp +++ b/Source/Core/VideoCommon/Src/OnScreenDisplay.cpp @@ -58,6 +58,11 @@ void AddMessage(const char* pstr, u32 ms) s_listMsgs.push_back(MESSAGE(pstr, Common::Timer::GetTimeMs() + ms)); } +void AddMessage(const std::string& str, u32 ms) +{ + AddMessage(str.c_str(), ms); +} + void DrawMessages() { if(!SConfig::GetInstance().m_LocalCoreStartupParameter.bOnScreenDisplayMessages) diff --git a/Source/Core/VideoCommon/Src/OnScreenDisplay.h b/Source/Core/VideoCommon/Src/OnScreenDisplay.h index ef7d899e1f..6db53f0ead 100644 --- a/Source/Core/VideoCommon/Src/OnScreenDisplay.h +++ b/Source/Core/VideoCommon/Src/OnScreenDisplay.h @@ -5,11 +5,14 @@ #ifndef _OSD_H_ #define _OSD_H_ -namespace OSD +#include + +namespace OSD { // On-screen message display void AddMessage(const char* str, u32 ms = 2000); +void AddMessage(const std::string& str, u32 ms = 2000); void DrawMessages(); // draw the current messages on the screen. Only call once per frame. void ClearMessages(); -- cgit v1.2.3