From 98676772115872da7e7084b0160084cd5f9d244d Mon Sep 17 00:00:00 2001 From: Michael M Date: Wed, 2 Aug 2017 16:45:18 -0700 Subject: [PATCH] WxUtils: add WxStrToUL --- Source/Core/DolphinWX/WxUtils.cpp | 7 +++++++ Source/Core/DolphinWX/WxUtils.h | 1 + 2 files changed, 8 insertions(+) diff --git a/Source/Core/DolphinWX/WxUtils.cpp b/Source/Core/DolphinWX/WxUtils.cpp index ef22a09d43..703518da3f 100644 --- a/Source/Core/DolphinWX/WxUtils.cpp +++ b/Source/Core/DolphinWX/WxUtils.cpp @@ -531,3 +531,10 @@ wxString StrToWxStr(const std::string& str) // return wxString::FromUTF8Unchecked(str.c_str()); return wxString::FromUTF8(str.c_str()); } + +unsigned long WxStrToUL(const wxString& str) +{ + unsigned long value = 0; + str.ToULong(&value); + return value; +} diff --git a/Source/Core/DolphinWX/WxUtils.h b/Source/Core/DolphinWX/WxUtils.h index 6cb449ae2d..7dc5051751 100644 --- a/Source/Core/DolphinWX/WxUtils.h +++ b/Source/Core/DolphinWX/WxUtils.h @@ -145,3 +145,4 @@ wxImage ScaleImage(wxImage image, double source_scale_factor = 1.0, std::string WxStrToStr(const wxString& str); wxString StrToWxStr(const std::string& str); +unsigned long WxStrToUL(const wxString& str);