mirror of https://github.com/AxioDL/metaforce.git
Windows build fixes
This commit is contained in:
parent
e82da43331
commit
adaa88e0db
|
@ -45,10 +45,10 @@ hecl::SystemString FindBlender(int& major, int& minor)
|
||||||
if (!blenderBin || !RegFileExists(blenderBin))
|
if (!blenderBin || !RegFileExists(blenderBin))
|
||||||
{
|
{
|
||||||
/* Environment not set; try steam */
|
/* Environment not set; try steam */
|
||||||
steamBlender = hecl::FindCommonSteamApp(_S("Blender"));
|
steamBlender = hecl::FindCommonSteamApp(_SYS_STR("Blender"));
|
||||||
if (steamBlender.size())
|
if (steamBlender.size())
|
||||||
{
|
{
|
||||||
steamBlender += _S("\\blender.exe");
|
steamBlender += _SYS_STR("\\blender.exe");
|
||||||
blenderBin = steamBlender.c_str();
|
blenderBin = steamBlender.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ hecl::SystemString FindBlender(int& major, int& minor)
|
||||||
if (!RegFileExists(blenderBin))
|
if (!RegFileExists(blenderBin))
|
||||||
{
|
{
|
||||||
/* Try steam */
|
/* Try steam */
|
||||||
steamBlender = hecl::FindCommonSteamApp(_S("Blender"));
|
steamBlender = hecl::FindCommonSteamApp(_SYS_STR("Blender"));
|
||||||
if (steamBlender.size())
|
if (steamBlender.size())
|
||||||
{
|
{
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
@ -103,9 +103,9 @@ hecl::SystemString FindBlender(int& major, int& minor)
|
||||||
if (!blenderBin)
|
if (!blenderBin)
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
hecl::SystemString command = hecl::SystemString(_S("\"")) + blenderBin + _S("\" --version");
|
hecl::SystemString command = hecl::SystemString(_SYS_STR("\"")) + blenderBin + _SYS_STR("\" --version");
|
||||||
#if _WIN32
|
#if _WIN32
|
||||||
FILE* fp = _wpopen(command.c_str(), _S("r"));
|
FILE* fp = _wpopen(command.c_str(), _SYS_STR("r"));
|
||||||
#else
|
#else
|
||||||
FILE* fp = popen(command.c_str(), "r");
|
FILE* fp = popen(command.c_str(), "r");
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -59,7 +59,7 @@ static void KillProcessTree(QProcess& proc)
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent) :
|
MainWindow::MainWindow(QWidget *parent) :
|
||||||
QMainWindow(parent)
|
QMainWindow(parent)
|
||||||
, m_fileMgr(_S("urde"))
|
, m_fileMgr(_SYS_STR("urde"))
|
||||||
, m_cvarManager(m_fileMgr)
|
, m_cvarManager(m_fileMgr)
|
||||||
, m_cvarCommons(m_cvarManager)
|
, m_cvarCommons(m_cvarManager)
|
||||||
, m_ui(new Ui::MainWindow)
|
, m_ui(new Ui::MainWindow)
|
||||||
|
|
|
@ -79,12 +79,12 @@ SysReqTableModel::SysReqTableModel(QObject* parent)
|
||||||
#elif _WIN32
|
#elif _WIN32
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
|
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)
|
0, KEY_QUERY_VALUE, &hkey) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
DWORD MHz;
|
DWORD MHz;
|
||||||
DWORD size = sizeof(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)
|
(LPBYTE)&MHz, &size) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
m_cpuSpeed = uint64_t(MHz);
|
m_cpuSpeed = uint64_t(MHz);
|
||||||
|
|
Loading…
Reference in New Issue