Merge pull request #9037 from shuffle2/code-cleanup

Code cleanup
This commit is contained in:
Jordan Woyak 2020-08-30 19:43:23 -05:00 committed by GitHub
commit 0a63340c20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
36 changed files with 119 additions and 162 deletions

View File

@ -9,28 +9,6 @@
#include "Common/Logging/Log.h" #include "Common/Logging/Log.h"
#include "Common/MsgHandler.h" #include "Common/MsgHandler.h"
#ifdef _WIN32
#define ASSERT_MSG(_t_, _a_, _fmt_, ...) \
do \
{ \
if (!(_a_)) \
{ \
if (!PanicYesNo(_fmt_, __VA_ARGS__)) \
Crash(); \
} \
} while (0)
#define DEBUG_ASSERT_MSG(_t_, _a_, _msg_, ...) \
do \
{ \
if (MAX_LOGLEVEL >= Common::Log::LOG_LEVELS::LDEBUG && !(_a_)) \
{ \
ERROR_LOG(_t_, _msg_, __VA_ARGS__); \
if (!PanicYesNo(_msg_, __VA_ARGS__)) \
Crash(); \
} \
} while (0)
#else
#define ASSERT_MSG(_t_, _a_, _fmt_, ...) \ #define ASSERT_MSG(_t_, _a_, _fmt_, ...) \
do \ do \
{ \ { \
@ -44,14 +22,16 @@
#define DEBUG_ASSERT_MSG(_t_, _a_, _msg_, ...) \ #define DEBUG_ASSERT_MSG(_t_, _a_, _msg_, ...) \
do \ do \
{ \ { \
if (MAX_LOGLEVEL >= Common::Log::LOG_LEVELS::LDEBUG && !(_a_)) \ if constexpr (MAX_LOGLEVEL >= Common::Log::LOG_LEVELS::LDEBUG) \
{ \ { \
ERROR_LOG(_t_, _msg_, ##__VA_ARGS__); \ if (!(_a_)) \
if (!PanicYesNo(_msg_, ##__VA_ARGS__)) \ { \
Crash(); \ ERROR_LOG(_t_, _msg_, ##__VA_ARGS__); \
if (!PanicYesNo(_msg_, ##__VA_ARGS__)) \
Crash(); \
} \
} \ } \
} while (0) } while (0)
#endif
#define ASSERT(_a_) \ #define ASSERT(_a_) \
do \ do \
@ -64,6 +44,6 @@
#define DEBUG_ASSERT(_a_) \ #define DEBUG_ASSERT(_a_) \
do \ do \
{ \ { \
if (MAX_LOGLEVEL >= Common::Log::LOG_LEVELS::LDEBUG) \ if constexpr (MAX_LOGLEVEL >= Common::Log::LOG_LEVELS::LDEBUG) \
ASSERT(_a_); \ ASSERT(_a_); \
} while (0) } while (0)

View File

@ -183,7 +183,7 @@ static bool GetModuleVersion(const wchar_t* name, Version* version)
if (!data_len) if (!data_len)
return false; return false;
std::vector<u8> block(data_len); std::vector<u8> block(data_len);
if (!GetFileVersionInfoW(path->c_str(), handle, data_len, block.data())) if (!GetFileVersionInfoW(path->c_str(), 0, data_len, block.data()))
return false; return false;
void* buf; void* buf;
UINT buf_len; UINT buf_len;

View File

@ -98,7 +98,7 @@ std::vector<std::string> DoFileSearch(const std::vector<std::string>& directorie
}; };
for (const auto& directory : directories) for (const auto& directory : directories)
{ {
const fs::path directory_path = StringToPath(directory); fs::path directory_path = StringToPath(directory);
if (fs::is_directory(directory_path)) // Can't create iterators for non-existant directories if (fs::is_directory(directory_path)) // Can't create iterators for non-existant directories
{ {
if (recursive) if (recursive)
@ -125,9 +125,11 @@ std::vector<std::string> DoFileSearch(const std::vector<std::string>& directorie
// std::filesystem uses the OS separator. // std::filesystem uses the OS separator.
constexpr fs::path::value_type os_separator = fs::path::preferred_separator; constexpr fs::path::value_type os_separator = fs::path::preferred_separator;
static_assert(os_separator == DIR_SEP_CHR || os_separator == '\\', "Unsupported path separator"); static_assert(os_separator == DIR_SEP_CHR || os_separator == '\\', "Unsupported path separator");
if (os_separator != DIR_SEP_CHR) if constexpr (os_separator != DIR_SEP_CHR)
{
for (auto& path : result) for (auto& path : result)
std::replace(path.begin(), path.end(), '\\', DIR_SEP_CHR); std::replace(path.begin(), path.end(), '\\', DIR_SEP_CHR);
}
return result; return result;
} }

View File

@ -600,7 +600,7 @@ std::string GetCurrentDir()
if (!dir) if (!dir)
{ {
ERROR_LOG(COMMON, "GetCurrentDirectory failed: %s", LastStrerrorString().c_str()); ERROR_LOG(COMMON, "GetCurrentDirectory failed: %s", LastStrerrorString().c_str());
return nullptr; return "";
} }
std::string strDir = dir; std::string strDir = dir;
free(dir); free(dir);
@ -621,10 +621,15 @@ std::string CreateTempDir()
return ""; return "";
GUID guid; GUID guid;
CoCreateGuid(&guid); if (FAILED(CoCreateGuid(&guid)))
TCHAR tguid[40]; {
StringFromGUID2(guid, tguid, 39); return "";
tguid[39] = 0; }
OLECHAR tguid[40]{};
if (!StringFromGUID2(guid, tguid, _countof(tguid)))
{
return "";
}
std::string dir = TStrToUTF8(temp) + "/" + TStrToUTF8(tguid); std::string dir = TStrToUTF8(temp) + "/" + TStrToUTF8(tguid);
if (!CreateDir(dir)) if (!CreateDir(dir))
return ""; return "";

View File

@ -1470,7 +1470,7 @@ u32* GekkoDisassembler::DoDisassembly(bool big_endian)
break; break;
case 30: case 30:
switch (in & 0x1c) switch ((in >> 2) & 0x7)
{ {
case 0: case 0:
rld(in, "icl", 0); // rldicl rld(in, "icl", 0); // rldicl

View File

@ -32,39 +32,6 @@ bool MsgAlert(bool yes_no, MsgType style, const char* format, ...)
void SetEnableAlert(bool enable); void SetEnableAlert(bool enable);
} // namespace Common } // namespace Common
#if defined(_WIN32) && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL == 1)
#define SuccessAlert(format, ...) \
Common::MsgAlert(false, Common::MsgType::Information, format, __VA_ARGS__)
#define PanicAlert(format, ...) \
Common::MsgAlert(false, Common::MsgType::Warning, format, __VA_ARGS__)
#define PanicYesNo(format, ...) \
Common::MsgAlert(true, Common::MsgType::Warning, format, __VA_ARGS__)
#define AskYesNo(format, ...) Common::MsgAlert(true, Common::MsgType::Question, format, __VA_ARGS__)
#define CriticalAlert(format, ...) \
Common::MsgAlert(false, Common::MsgType::Critical, format, __VA_ARGS__)
// Use these macros (that do the same thing) if the message should be translated.
#define SuccessAlertT(format, ...) \
Common::MsgAlert(false, Common::MsgType::Information, format, __VA_ARGS__)
#define PanicAlertT(format, ...) \
Common::MsgAlert(false, Common::MsgType::Warning, format, __VA_ARGS__)
#define PanicYesNoT(format, ...) \
Common::MsgAlert(true, Common::MsgType::Warning, format, __VA_ARGS__)
#define AskYesNoT(format, ...) \
Common::MsgAlert(true, Common::MsgType::Question, format, __VA_ARGS__)
#define CriticalAlertT(format, ...) \
Common::MsgAlert(false, Common::MsgType::Critical, format, __VA_ARGS__)
#else
#define SuccessAlert(format, ...) \ #define SuccessAlert(format, ...) \
Common::MsgAlert(false, Common::MsgType::Information, format, ##__VA_ARGS__) Common::MsgAlert(false, Common::MsgType::Information, format, ##__VA_ARGS__)
@ -95,4 +62,3 @@ void SetEnableAlert(bool enable);
#define CriticalAlertT(format, ...) \ #define CriticalAlertT(format, ...) \
Common::MsgAlert(false, Common::MsgType::Critical, format, ##__VA_ARGS__) Common::MsgAlert(false, Common::MsgType::Critical, format, ##__VA_ARGS__)
#endif

View File

@ -247,7 +247,7 @@ bool SDCardCreate(u64 disk_size /*in MB*/, const std::string& filename)
if (!write_sector(file, s_fsinfo_sector)) if (!write_sector(file, s_fsinfo_sector))
goto FailWrite; goto FailWrite;
if (BACKUP_BOOT_SECTOR > 0) if constexpr (BACKUP_BOOT_SECTOR > 0)
{ {
if (!write_empty(file, BACKUP_BOOT_SECTOR - 2)) if (!write_empty(file, BACKUP_BOOT_SECTOR - 2))
goto FailWrite; goto FailWrite;

View File

@ -6,9 +6,6 @@
#ifdef _WIN32 #ifdef _WIN32
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <Windows.h> #include <Windows.h>
namespace Common namespace Common

View File

@ -254,7 +254,7 @@ std::string Timer::GetDateTimeFormatted(double time)
#ifdef _WIN32 #ifdef _WIN32
wchar_t tmp[32] = {}; wchar_t tmp[32] = {};
wcsftime(tmp, sizeof(tmp), L"%x %X", localTime); wcsftime(tmp, std::size(tmp), L"%x %X", localTime);
return WStringToUTF8(tmp); return WStringToUTF8(tmp);
#else #else
char tmp[32] = {}; char tmp[32] = {};

View File

@ -35,7 +35,7 @@ bool IsTAPDevice(const TCHAR* guid)
TCHAR net_cfg_instance_id[256]; TCHAR net_cfg_instance_id[256];
DWORD data_type; DWORD data_type;
len = sizeof(enum_name); len = _countof(enum_name);
status = RegEnumKeyEx(netcard_key, i, enum_name, &len, nullptr, nullptr, nullptr, nullptr); status = RegEnumKeyEx(netcard_key, i, enum_name, &len, nullptr, nullptr, nullptr, nullptr);
if (status == ERROR_NO_MORE_ITEMS) if (status == ERROR_NO_MORE_ITEMS)
@ -43,7 +43,8 @@ bool IsTAPDevice(const TCHAR* guid)
else if (status != ERROR_SUCCESS) else if (status != ERROR_SUCCESS)
return false; return false;
_sntprintf(unit_string, sizeof(unit_string), _T("%s\\%s"), ADAPTER_KEY, enum_name); _sntprintf(unit_string, _countof(unit_string), _T("%s\\%s"), ADAPTER_KEY, enum_name);
unit_string[_countof(unit_string) - 1] = _T('\0');
status = RegOpenKeyEx(HKEY_LOCAL_MACHINE, unit_string, 0, KEY_READ, &unit_key); status = RegOpenKeyEx(HKEY_LOCAL_MACHINE, unit_string, 0, KEY_READ, &unit_key);
@ -110,14 +111,15 @@ bool GetGUIDs(std::vector<std::basic_string<TCHAR>>& guids)
DWORD name_type; DWORD name_type;
const TCHAR name_string[] = _T("Name"); const TCHAR name_string[] = _T("Name");
len = sizeof(enum_name); len = _countof(enum_name);
status = RegEnumKeyEx(control_net_key, i, enum_name, &len, nullptr, nullptr, nullptr, nullptr); status = RegEnumKeyEx(control_net_key, i, enum_name, &len, nullptr, nullptr, nullptr, nullptr);
if (status != ERROR_SUCCESS) if (status != ERROR_SUCCESS)
continue; continue;
_sntprintf(connection_string, sizeof(connection_string), _T("%s\\%s\\Connection"), _sntprintf(connection_string, _countof(connection_string), _T("%s\\%s\\Connection"),
NETWORK_CONNECTIONS_KEY, enum_name); NETWORK_CONNECTIONS_KEY, enum_name);
connection_string[_countof(connection_string) - 1] = _T('\0');
status = RegOpenKeyEx(HKEY_LOCAL_MACHINE, connection_string, 0, KEY_READ, &connection_key); status = RegOpenKeyEx(HKEY_LOCAL_MACHINE, connection_string, 0, KEY_READ, &connection_key);
@ -196,7 +198,7 @@ bool CEXIETHERNET::TAPNetworkInterface::Activate()
} }
/* get driver version info */ /* get driver version info */
ULONG info[3]; ULONG info[3]{};
if (DeviceIoControl(mHAdapter, TAP_IOCTL_GET_VERSION, &info, sizeof(info), &info, sizeof(info), if (DeviceIoControl(mHAdapter, TAP_IOCTL_GET_VERSION, &info, sizeof(info), &info, sizeof(info),
&len, nullptr)) &len, nullptr))
{ {

View File

@ -54,7 +54,7 @@ struct TypedHIDInputData
T data; T data;
static_assert(std::is_pod<T>()); static_assert(std::is_standard_layout_v<T> && std::is_trivially_copyable_v<T>);
u8* GetData() { return reinterpret_cast<u8*>(this); } u8* GetData() { return reinterpret_cast<u8*>(this); }
const u8* GetData() const { return reinterpret_cast<const u8*>(this); } const u8* GetData() const { return reinterpret_cast<const u8*>(this); }

View File

@ -26,7 +26,7 @@ protected:
template <typename T> template <typename T>
static int RawRead(T* reg_data, u8 addr, int count, u8* data_out) static int RawRead(T* reg_data, u8 addr, int count, u8* data_out)
{ {
static_assert(std::is_pod<T>::value); static_assert(std::is_standard_layout_v<T> && std::is_trivially_copyable_v<T>);
static_assert(0x100 == sizeof(T)); static_assert(0x100 == sizeof(T));
// TODO: addr wraps around after 0xff // TODO: addr wraps around after 0xff
@ -42,7 +42,7 @@ protected:
template <typename T> template <typename T>
static int RawWrite(T* reg_data, u8 addr, int count, const u8* data_in) static int RawWrite(T* reg_data, u8 addr, int count, const u8* data_in)
{ {
static_assert(std::is_pod<T>::value); static_assert(std::is_standard_layout_v<T> && std::is_trivially_copyable_v<T>);
static_assert(0x100 == sizeof(T)); static_assert(0x100 == sizeof(T));
// TODO: addr wraps around after 0xff // TODO: addr wraps around after 0xff

View File

@ -418,6 +418,10 @@ int WriteToHandle(HANDLE& dev_handle, WinWriteMethod& method, const u8* buf, siz
{ {
OVERLAPPED hid_overlap_write = OVERLAPPED(); OVERLAPPED hid_overlap_write = OVERLAPPED();
hid_overlap_write.hEvent = CreateEvent(nullptr, true, false, nullptr); hid_overlap_write.hEvent = CreateEvent(nullptr, true, false, nullptr);
if (!hid_overlap_write.hEvent)
{
return 0;
}
DWORD written = 0; DWORD written = 0;
IOWrite(dev_handle, hid_overlap_write, method, buf, size, &written); IOWrite(dev_handle, hid_overlap_write, method, buf, size, &written);
@ -431,6 +435,10 @@ int ReadFromHandle(HANDLE& dev_handle, u8* buf)
{ {
OVERLAPPED hid_overlap_read = OVERLAPPED(); OVERLAPPED hid_overlap_read = OVERLAPPED();
hid_overlap_read.hEvent = CreateEvent(nullptr, true, false, nullptr); hid_overlap_read.hEvent = CreateEvent(nullptr, true, false, nullptr);
if (!hid_overlap_read.hEvent)
{
return 0;
}
const int read = IORead(dev_handle, hid_overlap_read, buf, 1); const int read = IORead(dev_handle, hid_overlap_read, buf, 1);
CloseHandle(hid_overlap_read.hEvent); CloseHandle(hid_overlap_read.hEvent);
return read; return read;
@ -533,7 +541,6 @@ void WiimoteScannerWindows::FindWiimotes(std::vector<Wiimote*>& found_wiimotes,
SP_DEVICE_INTERFACE_DATA device_data = {}; SP_DEVICE_INTERFACE_DATA device_data = {};
device_data.cbSize = sizeof(device_data); device_data.cbSize = sizeof(device_data);
PSP_DEVICE_INTERFACE_DETAIL_DATA detail_data = nullptr;
for (int index = 0; for (int index = 0;
SetupDiEnumDeviceInterfaces(device_info, nullptr, &device_id, index, &device_data); ++index) SetupDiEnumDeviceInterfaces(device_info, nullptr, &device_id, index, &device_data); ++index)
@ -541,7 +548,8 @@ void WiimoteScannerWindows::FindWiimotes(std::vector<Wiimote*>& found_wiimotes,
// Get the size of the data block required // Get the size of the data block required
DWORD len; DWORD len;
SetupDiGetDeviceInterfaceDetail(device_info, &device_data, nullptr, 0, &len, nullptr); SetupDiGetDeviceInterfaceDetail(device_info, &device_data, nullptr, 0, &len, nullptr);
detail_data = (PSP_DEVICE_INTERFACE_DETAIL_DATA)malloc(len); auto detail_data_buf = std::make_unique<u8[]>(len);
auto detail_data = reinterpret_cast<PSP_DEVICE_INTERFACE_DETAIL_DATA>(detail_data_buf.get());
detail_data->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA); detail_data->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA);
SP_DEVINFO_DATA device_info_data = {}; SP_DEVINFO_DATA device_info_data = {};
@ -558,7 +566,6 @@ void WiimoteScannerWindows::FindWiimotes(std::vector<Wiimote*>& found_wiimotes,
if (!IsNewWiimote(WStringToUTF8(device_path)) || !IsWiimote(device_path, write_method)) if (!IsNewWiimote(WStringToUTF8(device_path)) || !IsWiimote(device_path, write_method))
{ {
free(detail_data);
continue; continue;
} }
@ -568,8 +575,6 @@ void WiimoteScannerWindows::FindWiimotes(std::vector<Wiimote*>& found_wiimotes,
else else
found_wiimotes.push_back(wiimote); found_wiimotes.push_back(wiimote);
} }
free(detail_data);
} }
SetupDiDestroyDeviceInfoList(device_info); SetupDiDestroyDeviceInfoList(device_info);

View File

@ -621,7 +621,7 @@ UIDSys::UIDSys(std::shared_ptr<HLE::FS::FileSystem> fs) : m_fs{fs}
{ {
while (true) while (true)
{ {
const std::pair<u32, u64> entry = ReadUidSysEntry(*file); std::pair<u32, u64> entry = ReadUidSysEntry(*file);
if (!entry.first && !entry.second) if (!entry.first && !entry.second)
break; break;
@ -766,7 +766,7 @@ std::map<std::string, CertReader> ParseCertChain(const std::vector<u8>& chain)
return certs; return certs;
processed += cert_reader.GetBytes().size(); processed += cert_reader.GetBytes().size();
const std::string name = cert_reader.GetName(); std::string name = cert_reader.GetName();
certs.emplace(std::move(name), std::move(cert_reader)); certs.emplace(std::move(name), std::move(cert_reader));
} }
return certs; return certs;

View File

@ -824,7 +824,8 @@ void Init()
if (!s_ios) if (!s_ios)
return; return;
auto device = static_cast<Device::SDIOSlot0*>(s_ios->GetDeviceByName("/dev/sdio/slot0").get()); auto sdio_slot0 = s_ios->GetDeviceByName("/dev/sdio/slot0");
auto device = static_cast<Device::SDIOSlot0*>(sdio_slot0.get());
if (device) if (device)
device->EventNotify(); device->EventNotify();
}); });

View File

@ -86,13 +86,12 @@ static constexpr u32 inet_addr(u8 a, u8 b, u8 c, u8 d)
static int inet_pton(const char* src, unsigned char* dst) static int inet_pton(const char* src, unsigned char* dst)
{ {
int saw_digit, octets; int saw_digit = 0;
int octets = 0;
unsigned char tmp[4]{};
unsigned char* tp = tmp;
char ch; char ch;
unsigned char tmp[4], *tp;
saw_digit = 0;
octets = 0;
*(tp = tmp) = 0;
while ((ch = *src++) != '\0') while ((ch = *src++) != '\0')
{ {
if (ch >= '0' && ch <= '9') if (ch >= '0' && ch <= '9')
@ -927,8 +926,9 @@ IPCCommandResult NetIPTop::HandleRecvFromRequest(const IOCtlVRequest& request)
IPCCommandResult NetIPTop::HandleGetAddressInfoRequest(const IOCtlVRequest& request) IPCCommandResult NetIPTop::HandleGetAddressInfoRequest(const IOCtlVRequest& request)
{ {
addrinfo hints; addrinfo hints;
const bool hints_valid = request.in_vectors.size() > 2 && request.in_vectors[2].size;
if (request.in_vectors.size() > 2 && request.in_vectors[2].size) if (hints_valid)
{ {
hints.ai_flags = Memory::Read_U32(request.in_vectors[2].address); hints.ai_flags = Memory::Read_U32(request.in_vectors[2].address);
hints.ai_family = Memory::Read_U32(request.in_vectors[2].address + 0x4); hints.ai_family = Memory::Read_U32(request.in_vectors[2].address + 0x4);
@ -959,9 +959,7 @@ IPCCommandResult NetIPTop::HandleGetAddressInfoRequest(const IOCtlVRequest& requ
} }
addrinfo* result = nullptr; addrinfo* result = nullptr;
int ret = getaddrinfo( int ret = getaddrinfo(pNodeName, pServiceName, hints_valid ? &hints : nullptr, &result);
pNodeName, pServiceName,
(request.in_vectors.size() > 2 && request.in_vectors[2].size) ? &hints : nullptr, &result);
u32 addr = request.io_vectors[0].address; u32 addr = request.io_vectors[0].address;
u32 sockoffset = addr + 0x460; u32 sockoffset = addr + 0x460;
if (ret == 0) if (ret == 0)

View File

@ -208,7 +208,7 @@ static void CopyDescriptorToBuffer(std::vector<u8>* buffer, T descriptor)
descriptor.Swap(); descriptor.Swap();
buffer->insert(buffer->end(), reinterpret_cast<const u8*>(&descriptor), buffer->insert(buffer->end(), reinterpret_cast<const u8*>(&descriptor),
reinterpret_cast<const u8*>(&descriptor) + size); reinterpret_cast<const u8*>(&descriptor) + size);
const size_t number_of_padding_bytes = Common::AlignUp(size, 4) - size; constexpr size_t number_of_padding_bytes = Common::AlignUp(size, 4) - size;
buffer->insert(buffer->end(), number_of_padding_bytes, 0); buffer->insert(buffer->end(), number_of_padding_bytes, 0);
} }

View File

@ -61,8 +61,8 @@ template <typename SType>
SType ScaleAndClamp(double ps, u32 stScale) SType ScaleAndClamp(double ps, u32 stScale)
{ {
float convPS = (float)ps * m_quantizeTable[stScale]; float convPS = (float)ps * m_quantizeTable[stScale];
float min = (float)std::numeric_limits<SType>::min(); constexpr float min = (float)std::numeric_limits<SType>::min();
float max = (float)std::numeric_limits<SType>::max(); constexpr float max = (float)std::numeric_limits<SType>::max();
return (SType)std::clamp(convPS, min, max); return (SType)std::clamp(convPS, min, max);
} }

View File

@ -247,7 +247,7 @@ bool PPCSymbolDB::LoadMap(const std::string& filename, bool bad)
continue; continue;
} }
char temp[256]; char temp[256]{};
sscanf(line, "%255s", temp); sscanf(line, "%255s", temp);
if (strcmp(temp, "UNUSED") == 0) if (strcmp(temp, "UNUSED") == 0)

View File

@ -28,7 +28,7 @@ void DualShockUDPClientWidget::CreateWidgets()
m_servers_enabled = new QCheckBox(tr("Enable")); m_servers_enabled = new QCheckBox(tr("Enable"));
m_servers_enabled->setChecked(Config::Get(ciface::DualShockUDPClient::Settings::SERVERS_ENABLED)); m_servers_enabled->setChecked(Config::Get(ciface::DualShockUDPClient::Settings::SERVERS_ENABLED));
main_layout->addWidget(m_servers_enabled, 0, 0); main_layout->addWidget(m_servers_enabled, 0, {});
m_server_list = new QListWidget(); m_server_list = new QListWidget();
main_layout->addWidget(m_server_list); main_layout->addWidget(m_server_list);

View File

@ -131,9 +131,12 @@ static int GetLayoutHorizontalSpacing(const QGridLayout* layout)
// Docs claim this is deprecated, but on macOS with Qt 5.8 this is the only one that actually // Docs claim this is deprecated, but on macOS with Qt 5.8 this is the only one that actually
// works. // works.
float pixel_ratio = QGuiApplication::primaryScreen()->devicePixelRatio(); float pixel_ratio = QGuiApplication::primaryScreen()->devicePixelRatio();
#ifdef __APPLE__
// TODO is this still required?
hspacing = pixel_ratio * style->pixelMetric(QStyle::PM_DefaultLayoutSpacing); hspacing = pixel_ratio * style->pixelMetric(QStyle::PM_DefaultLayoutSpacing);
if (hspacing >= 0) if (hspacing >= 0)
return hspacing; return hspacing;
#endif
// Ripped from qtbase/src/widgets/styles/qcommonstyle.cpp // Ripped from qtbase/src/widgets/styles/qcommonstyle.cpp
return pixel_ratio * 6; return pixel_ratio * 6;

View File

@ -156,7 +156,7 @@ void MemoryViewWidget::Update()
} }
else else
{ {
hex_item->setFlags(0); hex_item->setFlags({});
hex_item->setText(QStringLiteral("-")); hex_item->setText(QStringLiteral("-"));
} }
} }

View File

@ -21,7 +21,7 @@
<ClCompile> <ClCompile>
<!-- 5054 operator '+': deprecated between enumerations of different types (in Qt headers) --> <!-- 5054 operator '+': deprecated between enumerations of different types (in Qt headers) -->
<DisableSpecificWarnings>5054;%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings>5054;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<AdditionalIncludeDirectories>($ProjectDir)Config\Graphics;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir)Config\Graphics;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)Config;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir)Config;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)Config\ControllerInterface;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir)Config\ControllerInterface;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)Config\Mapping;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir)Config\Mapping;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

View File

@ -120,7 +120,7 @@ QLayoutItem* FlowLayout::takeAt(int index)
Qt::Orientations FlowLayout::expandingDirections() const Qt::Orientations FlowLayout::expandingDirections() const
{ {
return 0; return {};
} }
bool FlowLayout::hasHeightForWidth() const bool FlowLayout::hasHeightForWidth() const

View File

@ -186,9 +186,9 @@ void InterfacePane::ConnectLayout()
connect(m_checkbox_use_covers, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig); connect(m_checkbox_use_covers, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig);
connect(m_checkbox_show_debugging_ui, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig); connect(m_checkbox_show_debugging_ui, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig);
connect(m_checkbox_focused_hotkeys, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig); connect(m_checkbox_focused_hotkeys, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig);
connect(m_combobox_theme, qOverload<const QString&>(&QComboBox::currentIndexChanged), connect(m_combobox_theme, qOverload<int>(&QComboBox::currentIndexChanged), this,
&Settings::Instance(), &Settings::SetThemeName); [=](int index) { Settings::Instance().SetThemeName(m_combobox_theme->itemText(index)); });
connect(m_combobox_userstyle, qOverload<const QString&>(&QComboBox::currentIndexChanged), this, connect(m_combobox_userstyle, qOverload<int>(&QComboBox::currentIndexChanged), this,
&InterfacePane::OnSaveConfig); &InterfacePane::OnSaveConfig);
connect(m_combobox_language, qOverload<int>(&QComboBox::currentIndexChanged), this, connect(m_combobox_language, qOverload<int>(&QComboBox::currentIndexChanged), this,
&InterfacePane::OnSaveConfig); &InterfacePane::OnSaveConfig);

View File

@ -168,10 +168,9 @@ void USBDeviceAddToWhitelistDialog::OnDeviceSelection()
{ {
// Not the nicest way of doing this but... // Not the nicest way of doing this but...
QString device = usb_inserted_devices_list->currentItem()->text().left(9); QString device = usb_inserted_devices_list->currentItem()->text().left(9);
QString* vid = new QString( QStringList split = device.split(QString::fromStdString(":"));
device.split(QString::fromStdString(":"), QString::SplitBehavior::KeepEmptyParts)[0]); QString* vid = new QString(split[0]);
QString* pid = new QString( QString* pid = new QString(split[1]);
device.split(QString::fromStdString(":"), QString::SplitBehavior::KeepEmptyParts)[1]);
device_vid_textbox->setText(*vid); device_vid_textbox->setText(*vid);
device_pid_textbox->setText(*pid); device_pid_textbox->setText(*pid);
} }

View File

@ -279,10 +279,9 @@ void WiiPane::OnUSBWhitelistAddButton()
void WiiPane::OnUSBWhitelistRemoveButton() void WiiPane::OnUSBWhitelistRemoveButton()
{ {
QString device = m_whitelist_usb_list->currentItem()->text().left(9); QString device = m_whitelist_usb_list->currentItem()->text().left(9);
QString vid = QStringList split = device.split(QString::fromStdString(":"));
QString(device.split(QString::fromStdString(":"), QString::SplitBehavior::KeepEmptyParts)[0]); QString vid = QString(split[0]);
QString pid = QString pid = QString(split[1]);
QString(device.split(QString::fromStdString(":"), QString::SplitBehavior::KeepEmptyParts)[1]);
const u16 vid_u16 = static_cast<u16>(std::stoul(vid.toStdString(), nullptr, 16)); const u16 vid_u16 = static_cast<u16>(std::stoul(vid.toStdString(), nullptr, 16));
const u16 pid_u16 = static_cast<u16>(std::stoul(pid.toStdString(), nullptr, 16)); const u16 pid_u16 = static_cast<u16>(std::stoul(pid.toStdString(), nullptr, 16));
SConfig::GetInstance().m_usb_passthrough_devices.erase({vid_u16, pid_u16}); SConfig::GetInstance().m_usb_passthrough_devices.erase({vid_u16, pid_u16});

View File

@ -45,7 +45,7 @@ public:
std::getline(buffer, section, '.'); std::getline(buffer, section, '.');
std::getline(buffer, key, '='); std::getline(buffer, key, '=');
std::getline(buffer, value, '='); std::getline(buffer, value, '=');
const std::optional<Config::System> system = Config::GetSystemFromName(system_str); std::optional<Config::System> system = Config::GetSystemFromName(system_str);
if (system) if (system)
{ {
m_values.emplace_back( m_values.emplace_back(

View File

@ -15,12 +15,6 @@
#include "Common/CommonTypes.h" #include "Common/CommonTypes.h"
#include "Common/MsgHandler.h" #include "Common/MsgHandler.h"
#define CHECK(cond, Message, ...) \
if (!(cond)) \
{ \
PanicAlert("%s failed in %s at line %d: " Message, __func__, __FILE__, __LINE__, __VA_ARGS__); \
}
namespace DX11 namespace DX11
{ {
using Microsoft::WRL::ComPtr; using Microsoft::WRL::ComPtr;

View File

@ -9,13 +9,6 @@
#include "Common/MsgHandler.h" #include "Common/MsgHandler.h"
#include "VideoBackends/D3DCommon/Common.h" #include "VideoBackends/D3DCommon/Common.h"
#define CHECK(cond, Message, ...) \
if (!(cond)) \
{ \
PanicAlert(__FUNCTION__ " failed in %s at line %d: " Message, __FILE__, __LINE__, \
__VA_ARGS__); \
}
namespace DX12 namespace DX12
{ {
using Microsoft::WRL::ComPtr; using Microsoft::WRL::ComPtr;

View File

@ -195,10 +195,10 @@ void VertexManager::UploadAllConstants()
{ {
// We are free to re-use parts of the buffer now since we're uploading all constants. // We are free to re-use parts of the buffer now since we're uploading all constants.
const u32 pixel_constants_offset = 0; const u32 pixel_constants_offset = 0;
const u32 vertex_constants_offset = constexpr u32 vertex_constants_offset =
Common::AlignUp(pixel_constants_offset + sizeof(PixelShaderConstants), Common::AlignUp(pixel_constants_offset + sizeof(PixelShaderConstants),
D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT); D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT);
const u32 geometry_constants_offset = constexpr u32 geometry_constants_offset =
Common::AlignUp(vertex_constants_offset + sizeof(VertexShaderConstants), Common::AlignUp(vertex_constants_offset + sizeof(VertexShaderConstants),
D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT); D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT);
const u32 allocation_size = geometry_constants_offset + sizeof(GeometryShaderConstants); const u32 allocation_size = geometry_constants_offset + sizeof(GeometryShaderConstants);

View File

@ -12,6 +12,13 @@
#include "Common/CommonTypes.h" #include "Common/CommonTypes.h"
#define CHECK(cond, Message, ...) \
if (!(cond)) \
{ \
PanicAlert("%s failed in %s at line %d: " Message, __func__, __FILE__, __LINE__, \
##__VA_ARGS__); \
}
struct IDXGIFactory; struct IDXGIFactory;
enum class AbstractTextureFormat : u32; enum class AbstractTextureFormat : u32;

View File

@ -38,7 +38,7 @@
namespace OGL namespace OGL
{ {
u32 ProgramShaderCache::s_ubo_buffer_size; u32 ProgramShaderCache::s_ubo_buffer_size;
s32 ProgramShaderCache::s_ubo_align; s32 ProgramShaderCache::s_ubo_align = 1;
GLuint ProgramShaderCache::s_attributeless_VBO = 0; GLuint ProgramShaderCache::s_attributeless_VBO = 0;
GLuint ProgramShaderCache::s_attributeless_VAO = 0; GLuint ProgramShaderCache::s_attributeless_VAO = 0;
GLuint ProgramShaderCache::s_last_VAO = 0; GLuint ProgramShaderCache::s_last_VAO = 0;

View File

@ -20,11 +20,7 @@ constexpr u32 MAX_XFB_WIDTH = 720;
// that are next to each other in memory (TODO: handle that situation). // that are next to each other in memory (TODO: handle that situation).
constexpr u32 MAX_XFB_HEIGHT = 576; constexpr u32 MAX_XFB_HEIGHT = 576;
#if defined(_WIN32) && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL == 1)
#define PRIM_LOG(...) DEBUG_LOG(VIDEO, __VA_ARGS__)
#else
#define PRIM_LOG(...) DEBUG_LOG(VIDEO, ##__VA_ARGS__) #define PRIM_LOG(...) DEBUG_LOG(VIDEO, ##__VA_ARGS__)
#endif
// warning: mapping buffer should be disabled to use this // warning: mapping buffer should be disabled to use this
// #define LOG_VTX() DEBUG_LOG(VIDEO, "vtx: %f %f %f, ", ((float*)g_vertex_manager_write_ptr)[-3], // #define LOG_VTX() DEBUG_LOG(VIDEO, "vtx: %f %f %f, ", ((float*)g_vertex_manager_write_ptr)[-3],

View File

@ -2,15 +2,11 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="Base.Macros.props" Condition="'$(BaseMacrosImported)'==''" /> <Import Project="Base.Macros.props" Condition="'$(BaseMacrosImported)'==''" />
<PropertyGroup> <PropertyGroup>
<!--
Opt-in to x64 compiler and tools.
Unfortunately we can't set this property here, as it'll be overridden later. Instead, set it
from commandline if you're interested in using x64 toolset
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
-->
<IntDir>$(BuildRootDir)$(Platform)\$(Configuration)\$(ProjectName)\</IntDir> <IntDir>$(BuildRootDir)$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
<OutDir>$(IntDir)bin\</OutDir> <OutDir>$(IntDir)bin\</OutDir>
<TargetName Condition="'$(ConfigurationType)'=='Application'">$(ProjectName)$(TargetSuffix)</TargetName> <TargetName Condition="'$(ConfigurationType)'=='Application'">$(ProjectName)$(TargetSuffix)</TargetName>
<!--Set link /INCREMENTAL:NO to remove some entropy from builds (assists with /Brepro)-->
<LinkIncremental>false</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup> <ItemDefinitionGroup>
<!--ClCompile Base--> <!--ClCompile Base-->
@ -53,7 +49,15 @@
<AdditionalIncludeDirectories>$(ExternalsDir)zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ExternalsDir)zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ExternalsDir)zstd\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ExternalsDir)zstd\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>FMT_HEADER_ONLY=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>FMT_HEADER_ONLY=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <!--
It would be a good idea to disable _CRT_SECURE_NO_WARNINGS and get rid of e.g. C string parsing funcs
Unfortunately this also complains about FILE* APIs, which can be inconvenient to replace.
-->
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<!--IOS net code uses some ipv4-only functions which are marked as deprecated by winsock2-->
<PreprocessorDefinitions>_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<!--Currently needed for some code in StringUtil used only on Android-->
<PreprocessorDefinitions>_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>USE_UPNP;USE_USBDK;__LIBUSB__;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>USE_UPNP;USE_USBDK;__LIBUSB__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>SFML_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>SFML_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>USE_ANALYTICS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>USE_ANALYTICS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -73,26 +77,20 @@
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<RuntimeTypeInfo>false</RuntimeTypeInfo> <RuntimeTypeInfo>false</RuntimeTypeInfo>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
<!--Enable latest C++ standard--> <!--Enable latest C++ standard-->
<LanguageStandard>stdcpplatest</LanguageStandard> <LanguageStandard>stdcpplatest</LanguageStandard>
<!--Enable Standard Conformance--> <!--Enable Standard Conformance-->
<ConformanceMode>true</ConformanceMode> <ConformanceMode>true</ConformanceMode>
<!--Enforce some behaviors as standards-conformant when they don't default as such--> <!--Enforce some behaviors as standards-conformant when they don't default as such.-->
<AdditionalOptions>/Zc:throwingNew /volatile:iso %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/Zc:externConstexpr,lambda,preprocessor,throwingNew /volatile:iso %(AdditionalOptions)</AdditionalOptions>
<!--Enable detailed debug info--> <!--Enable detailed debug info-->
<AdditionalOptions>/Zo %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/Zo %(AdditionalOptions)</AdditionalOptions>
<!--Treat sources as utf-8--> <!--Treat sources as utf-8-->
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
<DiagnosticsFormat>Caret</DiagnosticsFormat> <DiagnosticsFormat>Caret</DiagnosticsFormat>
<!--
4996 is for GetVersionEx being marked as deprecated - which is idiotic and there's not much
else we can do since many externals use it. The bad part is that there doesn't
seem to be a way to only ignore the specific instance we don't care about...
4351 new behavior: elements of array 'array' will be default initialized
-->
<DisableSpecificWarnings>4996;4351;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<!-- Warnings one may want to ignore when using Level4. <!-- Warnings one may want to ignore when using Level4.
4201 nonstandard extension used : nameless struct/union 4201 nonstandard extension used : nameless struct/union
4127 conditional expression is constant 4127 conditional expression is constant
@ -109,36 +107,47 @@
Currently jits use some annoying code patterns which makes this common Currently jits use some annoying code patterns which makes this common
--> -->
<DisableSpecificWarnings>4245;%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings>4245;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<!-- Temporarily disable warnings to enable /Zc:preprocessor compatibility with WinSDK headers.
5105 macro expansion producing 'defined' has undefined behavior
-->
<DisableSpecificWarnings>5105;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<!-- Enable some off-by-default warnings <!-- Enable some off-by-default warnings
4263 Non-virtual member function hides base class virtual function 4263 Non-virtual member function hides base class virtual function
4265 Class has virtual functions, but destructor is not virtual 4265 Class has virtual functions, but destructor is not virtual
4946 Reinterpret cast between related types 4946 Reinterpret cast between related types
--> -->
<AdditionalOptions>/w44263 /w44265 /w44946 %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/w44263 /w44265 /w44946 %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions>/Brepro %(AdditionalOptions)</AdditionalOptions>
<!--
A (currently) hidden switch, like /Brepro, furthermore enabling warnings about non-deterministic code.
This may be advantageous over /Brepro, which inits __DATE__, __TIME__, etc. equal to 1 (and allows
them to be redefined), which could have unexpected results.
-->
<AdditionalOptions>/experimental:deterministic %(AdditionalOptions)</AdditionalOptions>
</ClCompile> </ClCompile>
<!--ClCompile Debug--> <!--ClCompile Debug-->
<ClCompile Condition="'$(Configuration)'=='Debug'"> <ClCompile Condition="'$(Configuration)'=='Debug'">
<FunctionLevelLinking>true</FunctionLevelLinking>
<PreprocessorDefinitions>_DEBUG;_SECURE_SCL=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;_SECURE_SCL=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
</ClCompile> </ClCompile>
<!--ClCompile Release--> <!--ClCompile Release-->
<ClCompile Condition="'$(Configuration)'=='Release'"> <ClCompile Condition="'$(Configuration)'=='Release'">
<WholeProgramOptimization Condition="'$(DolphinRelease)'=='true'">true</WholeProgramOptimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers> <OmitFramePointers>true</OmitFramePointers>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck> <BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>false</FunctionLevelLinking>
<PreprocessorDefinitions>_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalOptions>/Gw %(AdditionalOptions)</AdditionalOptions>
<WholeProgramOptimization Condition="'$(DolphinRelease)'=='true'">true</WholeProgramOptimization>
</ClCompile> </ClCompile>
<!--Link Base--> <!--Link Base-->
<Link> <Link>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors> <TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<AdditionalOptions>/Brepro %(AdditionalOptions)</AdditionalOptions>
</Link> </Link>
<!--Link Release--> <!--Link Release-->
<Link Condition="'$(Configuration)'=='Release'"> <Link Condition="'$(Configuration)'=='Release'">
@ -151,11 +160,12 @@
<!--See Common/CompatPatches.cpp--> <!--See Common/CompatPatches.cpp-->
<ForceSymbolReferences>enableCompatPatches</ForceSymbolReferences> <ForceSymbolReferences>enableCompatPatches</ForceSymbolReferences>
<!--TODO fix up ffmpeg garbage--> <!--TODO fix up ffmpeg garbage-->
<AdditionalOptions>/NODEFAULTLIB:libcmt /Brepro %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/NODEFAULTLIB:libcmt %(AdditionalOptions)</AdditionalOptions>
</Link> </Link>
<Lib> <Lib>
<TreatLibWarningAsErrors>true</TreatLibWarningAsErrors> <TreatLibWarningAsErrors>true</TreatLibWarningAsErrors>
<LinkTimeCodeGeneration Condition="'$(DolphinRelease)'=='true'">true</LinkTimeCodeGeneration> <LinkTimeCodeGeneration Condition="'$(DolphinRelease)'=='true'">true</LinkTimeCodeGeneration>
<AdditionalOptions>/Brepro %(AdditionalOptions)</AdditionalOptions>
</Lib> </Lib>
<!-- <!--
Prefer VTune 2015 over 2013 but support both since there is no non-commercial license for 2015 :( Prefer VTune 2015 over 2013 but support both since there is no non-commercial license for 2015 :(

View File

@ -3,7 +3,7 @@
<PropertyGroup Label="Configuration"> <PropertyGroup Label="Configuration">
<PlatformToolset>v142</PlatformToolset> <PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
<!--<EnableASAN>true</EnableASAN>--> <PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>