From adaa88e0dbcafd880a9b7067e52d965a2934f8ea Mon Sep 17 00:00:00 2001
From: Jack Andersen <jackoalan@gmail.com>
Date: Sun, 14 Oct 2018 10:12:17 -1000
Subject: [PATCH] Windows build fixes

---
 hecl-gui/FindBlender.cpp     | 10 +++++-----
 hecl-gui/MainWindow.cpp      |  2 +-
 hecl-gui/SysReqTableView.cpp |  4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/hecl-gui/FindBlender.cpp b/hecl-gui/FindBlender.cpp
index c3fb36378..3726cbaef 100644
--- a/hecl-gui/FindBlender.cpp
+++ b/hecl-gui/FindBlender.cpp
@@ -45,10 +45,10 @@ hecl::SystemString FindBlender(int& major, int& minor)
     if (!blenderBin || !RegFileExists(blenderBin))
     {
         /* Environment not set; try steam */
-        steamBlender = hecl::FindCommonSteamApp(_S("Blender"));
+        steamBlender = hecl::FindCommonSteamApp(_SYS_STR("Blender"));
         if (steamBlender.size())
         {
-            steamBlender += _S("\\blender.exe");
+            steamBlender += _SYS_STR("\\blender.exe");
             blenderBin = steamBlender.c_str();
         }
 
@@ -71,7 +71,7 @@ hecl::SystemString FindBlender(int& major, int& minor)
     if (!RegFileExists(blenderBin))
     {
         /* Try steam */
-        steamBlender = hecl::FindCommonSteamApp(_S("Blender"));
+        steamBlender = hecl::FindCommonSteamApp(_SYS_STR("Blender"));
         if (steamBlender.size())
         {
 #ifdef __APPLE__
@@ -103,9 +103,9 @@ hecl::SystemString FindBlender(int& major, int& minor)
     if (!blenderBin)
         return {};
 
-    hecl::SystemString command = hecl::SystemString(_S("\"")) + blenderBin + _S("\" --version");
+    hecl::SystemString command = hecl::SystemString(_SYS_STR("\"")) + blenderBin + _SYS_STR("\" --version");
 #if _WIN32
-    FILE* fp = _wpopen(command.c_str(), _S("r"));
+    FILE* fp = _wpopen(command.c_str(), _SYS_STR("r"));
 #else
     FILE* fp = popen(command.c_str(), "r");
 #endif
diff --git a/hecl-gui/MainWindow.cpp b/hecl-gui/MainWindow.cpp
index 5684bcc21..fdf5126fc 100644
--- a/hecl-gui/MainWindow.cpp
+++ b/hecl-gui/MainWindow.cpp
@@ -59,7 +59,7 @@ static void KillProcessTree(QProcess& proc)
 
 MainWindow::MainWindow(QWidget *parent) :
     QMainWindow(parent)
-  , m_fileMgr(_S("urde"))
+  , m_fileMgr(_SYS_STR("urde"))
   , m_cvarManager(m_fileMgr)
   , m_cvarCommons(m_cvarManager)
   , m_ui(new Ui::MainWindow)
diff --git a/hecl-gui/SysReqTableView.cpp b/hecl-gui/SysReqTableView.cpp
index a838967d1..e5ffb376f 100644
--- a/hecl-gui/SysReqTableView.cpp
+++ b/hecl-gui/SysReqTableView.cpp
@@ -79,12 +79,12 @@ SysReqTableModel::SysReqTableModel(QObject* parent)
 #elif _WIN32
     HKEY hkey;
     if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
-                     _S("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0"),
+                     _SYS_STR("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0"),
                      0, KEY_QUERY_VALUE, &hkey) == ERROR_SUCCESS)
     {
         DWORD MHz;
         DWORD size = sizeof(MHz);
-        if (RegQueryValueEx(hkey, _S("~MHz"), nullptr, nullptr,
+        if (RegQueryValueEx(hkey, _SYS_STR("~MHz"), nullptr, nullptr,
                             (LPBYTE)&MHz, &size) == ERROR_SUCCESS)
         {
             m_cpuSpeed = uint64_t(MHz);