summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/input_common/udp/udp.cpp3
-rw-r--r--src/video_core/textures/astc.cpp24
2 files changed, 14 insertions, 13 deletions
diff --git a/src/input_common/udp/udp.cpp b/src/input_common/udp/udp.cpp
index ca99cc22f..8c6ef1394 100644
--- a/src/input_common/udp/udp.cpp
+++ b/src/input_common/udp/udp.cpp
@@ -3,6 +3,7 @@
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <mutex> 5#include <mutex>
6#include <optional>
6#include <tuple> 7#include <tuple>
7 8
8#include "common/param_package.h" 9#include "common/param_package.h"
@@ -44,7 +45,7 @@ public:
44 std::unique_ptr<Input::TouchDevice> Create(const Common::ParamPackage& params) override { 45 std::unique_ptr<Input::TouchDevice> Create(const Common::ParamPackage& params) override {
45 { 46 {
46 std::lock_guard guard(status->update_mutex); 47 std::lock_guard guard(status->update_mutex);
47 status->touch_calibration.emplace(); 48 status->touch_calibration = DeviceStatus::CalibrationData{};
48 // These default values work well for DS4 but probably not other touch inputs 49 // These default values work well for DS4 but probably not other touch inputs
49 status->touch_calibration->min_x = params.Get("min_x", 100); 50 status->touch_calibration->min_x = params.Get("min_x", 100);
50 status->touch_calibration->min_y = params.Get("min_y", 50); 51 status->touch_calibration->min_y = params.Get("min_y", 50);
diff --git a/src/video_core/textures/astc.cpp b/src/video_core/textures/astc.cpp
index 404708d92..062b4f252 100644
--- a/src/video_core/textures/astc.cpp
+++ b/src/video_core/textures/astc.cpp
@@ -577,7 +577,7 @@ static TexelWeightParams DecodeBlockInfo(InputBitStream& strm) {
577 } 577 }
578 578
579 default: 579 default:
580 assert(!"Don't know this layout..."); 580 assert(false && "Don't know this layout...");
581 params.m_bError = true; 581 params.m_bError = true;
582 break; 582 break;
583 } 583 }
@@ -713,7 +713,7 @@ public:
713 } 713 }
714 } 714 }
715 715
716 assert(!"We shouldn't get here."); 716 assert(false && "We shouldn't get here.");
717 return 0; 717 return 0;
718 } 718 }
719 719
@@ -893,7 +893,7 @@ static void DecodeColorValues(u32* out, u8* data, const u32* modes, const u32 nP
893 } break; 893 } break;
894 894
895 default: 895 default:
896 assert(!"Unsupported trit encoding for color values!"); 896 assert(false && "Unsupported trit encoding for color values!");
897 break; 897 break;
898 } // switch(bitlen) 898 } // switch(bitlen)
899 } // case IntegerEncoding::Trit 899 } // case IntegerEncoding::Trit
@@ -937,7 +937,7 @@ static void DecodeColorValues(u32* out, u8* data, const u32* modes, const u32 nP
937 } break; 937 } break;
938 938
939 default: 939 default:
940 assert(!"Unsupported qus32 encoding for color values!"); 940 assert(false && "Unsupported quint encoding for color values!");
941 break; 941 break;
942 } // switch(bitlen) 942 } // switch(bitlen)
943 } // case IntegerEncoding::Qus32 943 } // case IntegerEncoding::Qus32
@@ -998,7 +998,7 @@ static u32 UnquantizeTexelWeight(const IntegerEncodedValue& val) {
998 } break; 998 } break;
999 999
1000 default: 1000 default:
1001 assert(!"Invalid trit encoding for texel weight"); 1001 assert(false && "Invalid trit encoding for texel weight");
1002 break; 1002 break;
1003 } 1003 }
1004 } break; 1004 } break;
@@ -1024,7 +1024,7 @@ static u32 UnquantizeTexelWeight(const IntegerEncodedValue& val) {
1024 } break; 1024 } break;
1025 1025
1026 default: 1026 default:
1027 assert(!"Invalid qus32 encoding for texel weight"); 1027 assert(false && "Invalid quint encoding for texel weight");
1028 break; 1028 break;
1029 } 1029 }
1030 } break; 1030 } break;
@@ -1352,7 +1352,7 @@ static void ComputeEndpos32s(Pixel& ep1, Pixel& ep2, const u32*& colorValues,
1352 } break; 1352 } break;
1353 1353
1354 default: 1354 default:
1355 assert(!"Unsupported color endpos32 mode (is it HDR?)"); 1355 assert(false && "Unsupported color endpoint mode (is it HDR?)");
1356 break; 1356 break;
1357 } 1357 }
1358 1358
@@ -1367,7 +1367,7 @@ static void DecompressBlock(const u8 inBuf[16], const u32 blockWidth, const u32
1367 1367
1368 // Was there an error? 1368 // Was there an error?
1369 if (weightParams.m_bError) { 1369 if (weightParams.m_bError) {
1370 assert(!"Invalid block mode"); 1370 assert(false && "Invalid block mode");
1371 FillError(outBuf, blockWidth, blockHeight); 1371 FillError(outBuf, blockWidth, blockHeight);
1372 return; 1372 return;
1373 } 1373 }
@@ -1378,19 +1378,19 @@ static void DecompressBlock(const u8 inBuf[16], const u32 blockWidth, const u32
1378 } 1378 }
1379 1379
1380 if (weightParams.m_bVoidExtentHDR) { 1380 if (weightParams.m_bVoidExtentHDR) {
1381 assert(!"HDR void extent blocks are unsupported!"); 1381 assert(false && "HDR void extent blocks are unsupported!");
1382 FillError(outBuf, blockWidth, blockHeight); 1382 FillError(outBuf, blockWidth, blockHeight);
1383 return; 1383 return;
1384 } 1384 }
1385 1385
1386 if (weightParams.m_Width > blockWidth) { 1386 if (weightParams.m_Width > blockWidth) {
1387 assert(!"Texel weight grid width should be smaller than block width"); 1387 assert(false && "Texel weight grid width should be smaller than block width");
1388 FillError(outBuf, blockWidth, blockHeight); 1388 FillError(outBuf, blockWidth, blockHeight);
1389 return; 1389 return;
1390 } 1390 }
1391 1391
1392 if (weightParams.m_Height > blockHeight) { 1392 if (weightParams.m_Height > blockHeight) {
1393 assert(!"Texel weight grid height should be smaller than block height"); 1393 assert(false && "Texel weight grid height should be smaller than block height");
1394 FillError(outBuf, blockWidth, blockHeight); 1394 FillError(outBuf, blockWidth, blockHeight);
1395 return; 1395 return;
1396 } 1396 }
@@ -1400,7 +1400,7 @@ static void DecompressBlock(const u8 inBuf[16], const u32 blockWidth, const u32
1400 assert(nPartitions <= 4); 1400 assert(nPartitions <= 4);
1401 1401
1402 if (nPartitions == 4 && weightParams.m_bDualPlane) { 1402 if (nPartitions == 4 && weightParams.m_bDualPlane) {
1403 assert(!"Dual plane mode is incompatible with four partition blocks"); 1403 assert(false && "Dual plane mode is incompatible with four partition blocks");
1404 FillError(outBuf, blockWidth, blockHeight); 1404 FillError(outBuf, blockWidth, blockHeight);
1405 return; 1405 return;
1406 } 1406 }