Skip to content

Commit

Permalink
InputBuilder.cpp: use #include <windows.h> instead of <Windef.h>
Browse files Browse the repository at this point in the history
Fixes this error on Windows:
fatal  error C1189: #error:  "No Target Architecture"
  • Loading branch information
bkueng committed Dec 18, 2023
1 parent d49ab8e commit aee0b5d
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 15 deletions.
14 changes: 5 additions & 9 deletions include/3rdparty/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,14 @@

#define _AFX_ALL_WARNINGS

// clang-format off
#ifdef _UNICODE
#if defined _M_IX86
#pragma comment( \
linker, \
"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment( \
linker, \
"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment( \
linker, \
"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
#endif
// clang-format on
6 changes: 4 additions & 2 deletions src/3rdparty/InputBuilder.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// clang-format off
#include "stdafx.h"
// clang-format on

#include "InputBuilder.h"

#include <Windef.h>

#include "stdafx.h"

/* Copyright(c) 1998-2012, Arnaud Colin
* All rights reserved.
*
Expand Down
4 changes: 3 additions & 1 deletion src/3rdparty/InputSimulator.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// clang-format off
#include "stdafx.h"
// clang-format on
#include "InputSimulator.h"

#include "KeyboardSimulator.h"
#include "MouseSimulator.h"
#include "WindowsInputDeviceStateAdaptor.h"
#include "stdafx.h"
/* Copyright(c) 1998-2012, Arnaud Colin
* All rights reserved.
*
Expand Down
4 changes: 3 additions & 1 deletion src/3rdparty/KeyboardSimulator.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// clang-format off
#include "stdafx.h"
// clang-format on
#include "KeyboardSimulator.h"

#include "InputBuilder.h"
#include "stdafx.h"

/* Copyright(c) 1998-2012, Arnaud Colin
* All rights reserved.
Expand Down
4 changes: 3 additions & 1 deletion src/3rdparty/MouseSimulator.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// clang-format off
#include "stdafx.h"
// clang-format on
#include "MouseSimulator.h"

#include "stdafx.h"
/* Copyright(c) 1998-2012, Arnaud Colin
* All rights reserved.
*
Expand Down
4 changes: 3 additions & 1 deletion src/3rdparty/WindowsInputDeviceStateAdaptor.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// clang-format off
#include "stdafx.h"
// clang-format on
#include "WindowsInputDeviceStateAdaptor.h"

#include "stdafx.h"
/* Copyright(c) 1998-2012, Arnaud Colin
* All rights reserved.
*
Expand Down

0 comments on commit aee0b5d

Please sign in to comment.