Skip to content

Commit ddf2fde

Browse files
authored
Fixed Windows compilation on the CI worker (cyberbotics#6550)
* Update WbDisplay.cpp * Update WbGuiApplication.cpp * Update WbGuiApplication.cpp
1 parent 01df207 commit ddf2fde

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

src/webots/gui/WbGuiApplication.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#ifdef _WIN32
16+
#include <dwmapi.h>
17+
#include <windows.h>
18+
#include <QtGui/QWindow>
19+
#endif
20+
1521
#include "WbGuiApplication.hpp"
1622

1723
#include "WbApplication.hpp"
@@ -492,10 +498,6 @@ void WbGuiApplication::loadInitialWorld() {
492498
}
493499

494500
#ifdef _WIN32
495-
#include <Windows.h>
496-
#include <dwmapi.h>
497-
#include <QtGui/QWindow>
498-
499501
static bool windowsDarkMode = false;
500502

501503
enum PreferredAppMode { Default, AllowDark, ForceDark, ForceLight, Max };

src/webots/nodes/WbDisplay.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040

4141
#include <QtCore/QDataStream>
4242

43+
#ifdef _WIN32
44+
#include <windows.h>
45+
#endif
46+
4347
#define SHIFT(value, shift) (((value) >> (shift)) & 0xFF)
4448

4549
class WbDisplayImage {

0 commit comments

Comments
 (0)