diff --git a/.editorconfig b/.editorconfig index 965fbcf1ee..332927531a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -27,7 +27,7 @@ charset = utf-8-bom charset = utf-8-bom [Windows/{aboutbox.rc,version.rc}] -charset = utf-16le +charset = utf-8 [libretro/**.{cpp,h}] indent_style = space diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b8a4e8706..b3eeef4367 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -311,7 +311,9 @@ if(NOT MSVC) else() # Disable warnings about MS-specific _s variants of libc functions add_definitions(-D_CRT_SECURE_NO_WARNINGS) - add_definitions(-MP) + if (NOT CLANG) + add_compile_options(-MP) + endif() set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -D_NDEBUG") endif() @@ -914,6 +916,7 @@ if(WIN32) set(THIN3D_PLATFORMS ${THIN3D_PLATFORMS} ext/native/thin3d/thin3d_d3d9.cpp ext/native/thin3d/thin3d_d3d11.cpp + ext/native/thin3d/d3d9_d3dcompiler_loader.cpp ext/native/thin3d/d3dx9_loader.cpp ext/native/thin3d/d3dx9_loader.h ext/native/thin3d/d3d11_loader.cpp @@ -1846,8 +1849,6 @@ if(USE_MINIUPNPC) if (NOT WIN32) add_definitions (-DMINIUPNPC_SET_SOCKET_TIMEOUT) add_definitions (-D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112L) - else() - add_definitions (-D_WIN32_WINNT=0x0501) # XP or higher for getnameinfo and friends endif() if (MACOSX) add_definitions (-D_DARWIN_C_SOURCE) @@ -1895,25 +1896,31 @@ if(USE_MINIUPNPC) # find_library (RESOLV_LIBRARY NAMES resolv) # set (LDLIBS ${SOCKET_LIBRARY} ${NSL_LIBRARY} ${RESOLV_LIBRARY} ${LDLIBS}) endif() - if (MSVC) - # Suppress noise warnings - target_compile_definitions(miniupnpc _CRT_SECURE_NO_WARNINGS _WINSOCK_DEPRECATED_NO_WARNINGS) - endif() if (UPNPC_BUILD_STATIC) add_library(miniupnpc STATIC ${MINIUPNPC_SOURCES}) target_link_libraries(${CoreLibName} miniupnpc ${LDLIBS}) set(UPNPC_LIBRARY miniupnpc) + if (MSVC) + # Suppress noise warnings + target_compile_definitions(miniupnpc PRIVATE _CRT_SECURE_NO_WARNINGS _WINSOCK_DEPRECATED_NO_WARNINGS) + endif() endif() endif() setup_target_project(${CoreLibName} Core) -# Generate git-version.cpp at build time. -add_custom_target(GitVersion ALL - DEPENDS something_that_never_exists) +# Generate git-version at build time. +add_custom_target(GitVersion DEPENDS something_that_never_exists) + +set(WIN_VERSION_CMD "") +if (WIN32) + set(WIN_VERSION_CMD COMMAND ${CMAKE_SOURCE_DIR}/Windows/git-version-gen.cmd PPSSPPWindows) +endif() + add_custom_command(OUTPUT something_that_never_exists COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} - -P ${CMAKE_CURRENT_SOURCE_DIR}/git-version.cmake) + -P ${CMAKE_CURRENT_SOURCE_DIR}/git-version.cmake + ${WIN_VERSION_CMD}) set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/git-version.cpp PROPERTIES GENERATED TRUE diff --git a/Common/Common.h b/Common/Common.h index 9fffa42922..9894771c53 100644 --- a/Common/Common.h +++ b/Common/Common.h @@ -70,18 +70,16 @@ #define __forceinline inline __attribute__((always_inline)) #endif -#if !defined(__GNUC__) && (defined(_M_X64) || defined(_M_IX86)) +#if defined __SSE4_2__ +# define _M_SSE 0x402 +#elif defined __SSE4_1__ +# define _M_SSE 0x401 +#elif defined __SSSE3__ +# define _M_SSE 0x301 +#elif defined __SSE3__ +# define _M_SSE 0x300 +#elif defined __SSE2__ +# define _M_SSE 0x200 +#elif !defined(__GNUC__) && (defined(_M_X64) || defined(_M_IX86)) # define _M_SSE 0x402 -#else -# if defined __SSE4_2__ -# define _M_SSE 0x402 -# elif defined __SSE4_1__ -# define _M_SSE 0x401 -# elif defined __SSSE3__ -# define _M_SSE 0x301 -# elif defined __SSE3__ -# define _M_SSE 0x300 -# elif defined __SSE2__ -# define _M_SSE 0x200 -# endif #endif diff --git a/Core/HLE/sceKernel.h b/Core/HLE/sceKernel.h index 9e2a8ff3ac..c9d4e20d4c 100644 --- a/Core/HLE/sceKernel.h +++ b/Core/HLE/sceKernel.h @@ -25,7 +25,7 @@ class PointerWrap; -enum { +enum : u32 { SCE_KERNEL_ERROR_OK = 0, SCE_KERNEL_ERROR_ALREADY = 0x80000020, SCE_KERNEL_ERROR_BUSY = 0x80000021, diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index 987b626d6b..0173045ce2 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -72,7 +72,7 @@ enum { PSP_THREAD_ATTR_USER = 0x80000000, }; -enum { +enum : u32 { // Function exports. NID_MODULE_START = 0xD632ACDB, NID_MODULE_STOP = 0xCEE8593C, diff --git a/Windows/InputDevice.cpp b/Windows/InputDevice.cpp index 3c59c8323e..70d4a6ff48 100644 --- a/Windows/InputDevice.cpp +++ b/Windows/InputDevice.cpp @@ -15,6 +15,7 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. +#include "stdafx.h" #include #include @@ -26,7 +27,7 @@ static std::atomic_flag threadRunningFlag; static std::thread inputThread; -static std::atomic_bool focused = true; +static std::atomic_bool focused = ATOMIC_VAR_INIT(true); inline static void ExecuteInputPoll() { if (host && (focused.load(std::memory_order_relaxed) || !g_Config.bGamepadOnlyFocused)) { diff --git a/Windows/WASAPIStream.cpp b/Windows/WASAPIStream.cpp index d399781c46..9662bf2891 100644 --- a/Windows/WASAPIStream.cpp +++ b/Windows/WASAPIStream.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "WindowsAudio.h" #include "WASAPIStream.h" #include "Common/Log.h" diff --git a/Windows/aboutbox.rc b/Windows/aboutbox.rc index 1e669a134b..43e3b72005 100644 Binary files a/Windows/aboutbox.rc and b/Windows/aboutbox.rc differ diff --git a/Windows/version.rc b/Windows/version.rc index dbefa2cef8..1c6d3982b1 100644 Binary files a/Windows/version.rc and b/Windows/version.rc differ