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 May 31, 2024
1 parent e4b2cd4 commit 75a0488
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 @@ -66,7 +66,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 @@ -163,7 +163,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 @@ -174,7 +174,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 @@ -185,7 +185,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 @@ -203,7 +203,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 75a0488

Please sign in to comment.