Skip to content

Commit

Permalink
Disable some functions on mingw
Browse files Browse the repository at this point in the history
MinGW does not provide comsuppw
  • Loading branch information
tobil4sk committed Apr 12, 2023
1 parent d9364c6 commit c7c386d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion project/Build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@
<lib name="rpcrt4.lib" if="LIME_HARFBUZZ" />
<lib name="dwrite.lib" if="LIME_HARFBUZZ" />

<lib name="comsuppw.lib" unless="winrt" />
<lib name="comsuppw.lib" unless="winrt || mingw" />

<lib name="D3D11.lib" if="winrt" />
<lib name="RuntimeObject.lib" if="winrt" />
Expand Down
10 changes: 5 additions & 5 deletions project/src/system/System.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace lime {
}


#if defined (HX_WINDOWS) && !defined (HX_WINRT)
#if defined (HX_WINDOWS) && !defined (HX_WINRT) && !defined (__MINGW32__)
std::wstring* GetWMIValue (BSTR query, BSTR field) {

HRESULT hres = 0;
Expand Down Expand Up @@ -139,7 +139,7 @@ namespace lime {

std::wstring* System::GetDeviceModel () {

#if defined (HX_WINDOWS) && !defined (HX_WINRT)
#if defined (HX_WINDOWS) && !defined (HX_WINRT) && !defined (__MINGW32__)
return GetWMIValue (bstr_t ("SELECT * FROM Win32_ComputerSystemProduct"), L"Version");
#endif

Expand All @@ -150,7 +150,7 @@ namespace lime {

std::wstring* System::GetDeviceVendor () {

#if defined (HX_WINDOWS) && !defined (HX_WINRT)
#if defined (HX_WINDOWS) && !defined (HX_WINRT) && !defined (__MINGW32__)
return GetWMIValue (bstr_t ("SELECT * FROM Win32_ComputerSystemProduct"), L"Vendor");
#endif

Expand All @@ -161,7 +161,7 @@ namespace lime {

std::wstring* System::GetPlatformLabel () {

#if defined (HX_WINDOWS) && !defined (HX_WINRT)
#if defined (HX_WINDOWS) && !defined (HX_WINRT) && !defined (__MINGW32__)
return GetWMIValue (bstr_t ("SELECT * FROM Win32_OperatingSystem"), L"Caption");
#endif

Expand All @@ -179,7 +179,7 @@ namespace lime {

std::wstring* System::GetPlatformVersion () {

#if defined (HX_WINDOWS) && !defined (HX_WINRT)
#if defined (HX_WINDOWS) && !defined (HX_WINRT) && !defined (__MINGW32__)
return GetWMIValue (bstr_t ("SELECT * FROM Win32_OperatingSystem"), L"Version");
#endif

Expand Down

0 comments on commit c7c386d

Please sign in to comment.