Skip to content

Commit 75a0488

Browse files
committed
Disable some functions on mingw
MinGW does not provide comsuppw
1 parent e4b2cd4 commit 75a0488

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

project/Build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@
430430
<lib name="rpcrt4.lib" if="LIME_HARFBUZZ" />
431431
<lib name="dwrite.lib" if="LIME_HARFBUZZ" />
432432

433-
<lib name="comsuppw.lib" unless="winrt" />
433+
<lib name="comsuppw.lib" unless="winrt || mingw" />
434434

435435
<lib name="D3D11.lib" if="winrt" />
436436
<lib name="RuntimeObject.lib" if="winrt" />

project/src/system/System.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ namespace lime {
6666
}
6767

6868

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

7272
HRESULT hres = 0;
@@ -163,7 +163,7 @@ namespace lime {
163163

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

166-
#if defined (HX_WINDOWS) && !defined (HX_WINRT)
166+
#if defined (HX_WINDOWS) && !defined (HX_WINRT) && !defined (__MINGW32__)
167167
return GetWMIValue (bstr_t ("SELECT * FROM Win32_ComputerSystemProduct"), L"Version");
168168
#endif
169169

@@ -174,7 +174,7 @@ namespace lime {
174174

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

177-
#if defined (HX_WINDOWS) && !defined (HX_WINRT)
177+
#if defined (HX_WINDOWS) && !defined (HX_WINRT) && !defined (__MINGW32__)
178178
return GetWMIValue (bstr_t ("SELECT * FROM Win32_ComputerSystemProduct"), L"Vendor");
179179
#endif
180180

@@ -185,7 +185,7 @@ namespace lime {
185185

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

188-
#if defined (HX_WINDOWS) && !defined (HX_WINRT)
188+
#if defined (HX_WINDOWS) && !defined (HX_WINRT) && !defined (__MINGW32__)
189189
return GetWMIValue (bstr_t ("SELECT * FROM Win32_OperatingSystem"), L"Caption");
190190
#endif
191191

@@ -203,7 +203,7 @@ namespace lime {
203203

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

206-
#if defined (HX_WINDOWS) && !defined (HX_WINRT)
206+
#if defined (HX_WINDOWS) && !defined (HX_WINRT) && !defined (__MINGW32__)
207207
return GetWMIValue (bstr_t ("SELECT * FROM Win32_OperatingSystem"), L"Version");
208208
#endif
209209

0 commit comments

Comments
 (0)