summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp6
-rw-r--r--src/core/hle/service/nvdrv/devices/nvdisp_disp0.h4
-rw-r--r--src/core/hle/service/nvflinger/buffer_queue.cpp4
-rw-r--r--src/core/hle/service/nvflinger/buffer_queue.h5
-rw-r--r--src/core/hle/service/nvflinger/nvflinger.cpp3
-rw-r--r--src/core/hle/service/vi/vi.cpp20
-rw-r--r--src/video_core/gpu.h1
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp22
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.h1
-rw-r--r--src/video_core/textures/astc.cpp138
-rw-r--r--src/yuzu/configuration/config.cpp2
-rw-r--r--src/yuzu/game_list.cpp5
-rw-r--r--src/yuzu_cmd/config.cpp2
-rw-r--r--src/yuzu_cmd/default_ini.h2
14 files changed, 113 insertions, 102 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp
index c39d5a164..ed69a4325 100644
--- a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp
@@ -18,7 +18,8 @@ u32 nvdisp_disp0::ioctl(Ioctl command, const std::vector<u8>& input, std::vector
}
void nvdisp_disp0::flip(u32 buffer_handle, u32 offset, u32 format, u32 width, u32 height,
- u32 stride, NVFlinger::BufferQueue::BufferTransformFlags transform) {
+ u32 stride, NVFlinger::BufferQueue::BufferTransformFlags transform,
+ const MathUtil::Rectangle<int>& crop_rect) {
VAddr addr = nvmap_dev->GetObjectAddress(buffer_handle);
LOG_WARNING(Service,
"Drawing from address {:X} offset {:08X} Width {} Height {} Stride {} Format {}",
@@ -26,7 +27,8 @@ void nvdisp_disp0::flip(u32 buffer_handle, u32 offset, u32 format, u32 width, u3
using PixelFormat = Tegra::FramebufferConfig::PixelFormat;
const Tegra::FramebufferConfig framebuffer{
- addr, offset, width, height, stride, static_cast<PixelFormat>(format), transform};
+ addr, offset, width, height, stride, static_cast<PixelFormat>(format),
+ transform, crop_rect};
Core::System::GetInstance().perf_stats.EndGameFrame();
diff --git a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h
index 3d3979723..d4631a32b 100644
--- a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h
+++ b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h
@@ -7,6 +7,7 @@
#include <memory>
#include <vector>
#include "common/common_types.h"
+#include "common/math_util.h"
#include "core/hle/service/nvdrv/devices/nvdevice.h"
#include "core/hle/service/nvflinger/buffer_queue.h"
@@ -23,7 +24,8 @@ public:
/// Performs a screen flip, drawing the buffer pointed to by the handle.
void flip(u32 buffer_handle, u32 offset, u32 format, u32 width, u32 height, u32 stride,
- NVFlinger::BufferQueue::BufferTransformFlags transform);
+ NVFlinger::BufferQueue::BufferTransformFlags transform,
+ const MathUtil::Rectangle<int>& crop_rect);
private:
std::shared_ptr<nvmap> nvmap_dev;
diff --git a/src/core/hle/service/nvflinger/buffer_queue.cpp b/src/core/hle/service/nvflinger/buffer_queue.cpp
index a181cd2dc..7132b18ad 100644
--- a/src/core/hle/service/nvflinger/buffer_queue.cpp
+++ b/src/core/hle/service/nvflinger/buffer_queue.cpp
@@ -57,13 +57,15 @@ const IGBPBuffer& BufferQueue::RequestBuffer(u32 slot) const {
return itr->igbp_buffer;
}
-void BufferQueue::QueueBuffer(u32 slot, BufferTransformFlags transform) {
+void BufferQueue::QueueBuffer(u32 slot, BufferTransformFlags transform,
+ const MathUtil::Rectangle<int>& crop_rect) {
auto itr = std::find_if(queue.begin(), queue.end(),
[&](const Buffer& buffer) { return buffer.slot == slot; });
ASSERT(itr != queue.end());
ASSERT(itr->status == Buffer::Status::Dequeued);
itr->status = Buffer::Status::Queued;
itr->transform = transform;
+ itr->crop_rect = crop_rect;
}
boost::optional<const BufferQueue::Buffer&> BufferQueue::AcquireBuffer() {
diff --git a/src/core/hle/service/nvflinger/buffer_queue.h b/src/core/hle/service/nvflinger/buffer_queue.h
index 1e55b487e..004170538 100644
--- a/src/core/hle/service/nvflinger/buffer_queue.h
+++ b/src/core/hle/service/nvflinger/buffer_queue.h
@@ -6,6 +6,7 @@
#include <vector>
#include <boost/optional.hpp>
+#include "common/math_util.h"
#include "common/swap.h"
#include "core/hle/kernel/event.h"
@@ -68,12 +69,14 @@ public:
Status status = Status::Free;
IGBPBuffer igbp_buffer;
BufferTransformFlags transform;
+ MathUtil::Rectangle<int> crop_rect;
};
void SetPreallocatedBuffer(u32 slot, IGBPBuffer& buffer);
boost::optional<u32> DequeueBuffer(u32 width, u32 height);
const IGBPBuffer& RequestBuffer(u32 slot) const;
- void QueueBuffer(u32 slot, BufferTransformFlags transform);
+ void QueueBuffer(u32 slot, BufferTransformFlags transform,
+ const MathUtil::Rectangle<int>& crop_rect);
boost::optional<const Buffer&> AcquireBuffer();
void ReleaseBuffer(u32 slot);
u32 Query(QueryType type);
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp
index 826646b7d..d580f779e 100644
--- a/src/core/hle/service/nvflinger/nvflinger.cpp
+++ b/src/core/hle/service/nvflinger/nvflinger.cpp
@@ -149,7 +149,8 @@ void NVFlinger::Compose() {
ASSERT(nvdisp);
nvdisp->flip(igbp_buffer.gpu_buffer_id, igbp_buffer.offset, igbp_buffer.format,
- igbp_buffer.width, igbp_buffer.height, igbp_buffer.stride, buffer->transform);
+ igbp_buffer.width, igbp_buffer.height, igbp_buffer.stride, buffer->transform,
+ buffer->crop_rect);
buffer_queue->ReleaseBuffer(buffer->slot);
}
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp
index e094510bf..eccee6e33 100644
--- a/src/core/hle/service/vi/vi.cpp
+++ b/src/core/hle/service/vi/vi.cpp
@@ -7,6 +7,7 @@
#include <memory>
#include <boost/optional.hpp>
#include "common/alignment.h"
+#include "common/math_util.h"
#include "common/scope_exit.h"
#include "core/core_timing.h"
#include "core/hle/ipc_helpers.h"
@@ -27,8 +28,8 @@ struct DisplayInfo {
char display_name[0x40]{"Default"};
u64 unknown_1{1};
u64 unknown_2{1};
- u64 width{1920};
- u64 height{1080};
+ u64 width{1280};
+ u64 height{720};
};
static_assert(sizeof(DisplayInfo) == 0x60, "DisplayInfo has wrong size");
@@ -327,8 +328,8 @@ public:
protected:
void SerializeData() override {
- // TODO(Subv): Figure out what this value means, writing non-zero here will make libnx try
- // to read an IGBPBuffer object from the parcel.
+ // TODO(Subv): Figure out what this value means, writing non-zero here will make libnx
+ // try to read an IGBPBuffer object from the parcel.
Write<u32_le>(1);
WriteObject(buffer);
Write<u32_le>(0);
@@ -360,8 +361,8 @@ public:
INSERT_PADDING_WORDS(3);
u32_le timestamp;
s32_le is_auto_timestamp;
- s32_le crop_left;
s32_le crop_top;
+ s32_le crop_left;
s32_le crop_right;
s32_le crop_bottom;
s32_le scaling_mode;
@@ -370,6 +371,10 @@ public:
INSERT_PADDING_WORDS(2);
u32_le fence_is_valid;
std::array<Fence, 2> fences;
+
+ MathUtil::Rectangle<int> GetCropRect() const {
+ return {crop_left, crop_top, crop_right, crop_bottom};
+ }
};
static_assert(sizeof(Data) == 80, "ParcelData has wrong size");
@@ -519,7 +524,8 @@ private:
} else if (transaction == TransactionId::QueueBuffer) {
IGBPQueueBufferRequestParcel request{ctx.ReadBuffer()};
- buffer_queue->QueueBuffer(request.data.slot, request.data.transform);
+ buffer_queue->QueueBuffer(request.data.slot, request.data.transform,
+ request.data.GetCropRect());
IGBPQueueBufferResponseParcel response{1280, 720};
ctx.WriteBuffer(response.Serialize());
@@ -532,7 +538,7 @@ private:
IGBPQueryResponseParcel response{value};
ctx.WriteBuffer(response.Serialize());
} else if (transaction == TransactionId::CancelBuffer) {
- LOG_WARNING(Service_VI, "(STUBBED) called, transaction=CancelBuffer");
+ LOG_CRITICAL(Service_VI, "(STUBBED) called, transaction=CancelBuffer");
} else {
ASSERT_MSG(false, "Unimplemented");
}
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h
index cc5ca656e..60930e997 100644
--- a/src/video_core/gpu.h
+++ b/src/video_core/gpu.h
@@ -67,6 +67,7 @@ struct FramebufferConfig {
using TransformFlags = Service::NVFlinger::BufferQueue::BufferTransformFlags;
TransformFlags transform_flags;
+ MathUtil::Rectangle<int> crop_rect;
};
namespace Engines {
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index 1930fa6ef..7810b9147 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.cpp
+++ b/src/video_core/renderer_opengl/renderer_opengl.cpp
@@ -154,6 +154,7 @@ void RendererOpenGL::LoadFBToScreenInfo(const Tegra::FramebufferConfig& framebuf
// Framebuffer orientation handling
framebuffer_transform_flags = framebuffer.transform_flags;
+ framebuffer_crop_rect = framebuffer.crop_rect;
// Ensure no bad interactions with GL_UNPACK_ALIGNMENT, which by default
// only allows rows to have a memory alignement of 4.
@@ -320,11 +321,24 @@ void RendererOpenGL::DrawScreenTriangles(const ScreenInfo& screen_info, float x,
}
}
+ ASSERT_MSG(framebuffer_crop_rect.top == 0, "Unimplemented");
+ ASSERT_MSG(framebuffer_crop_rect.left == 0, "Unimplemented");
+
+ // Scale the output by the crop width/height. This is commonly used with 1280x720 rendering
+ // (e.g. handheld mode) on a 1920x1080 framebuffer.
+ f32 scale_u = 1.f, scale_v = 1.f;
+ if (framebuffer_crop_rect.GetWidth() > 0) {
+ scale_u = static_cast<f32>(framebuffer_crop_rect.GetWidth()) / screen_info.texture.width;
+ }
+ if (framebuffer_crop_rect.GetHeight() > 0) {
+ scale_v = static_cast<f32>(framebuffer_crop_rect.GetHeight()) / screen_info.texture.height;
+ }
+
std::array<ScreenRectVertex, 4> vertices = {{
- ScreenRectVertex(x, y, texcoords.top, left),
- ScreenRectVertex(x + w, y, texcoords.bottom, left),
- ScreenRectVertex(x, y + h, texcoords.top, right),
- ScreenRectVertex(x + w, y + h, texcoords.bottom, right),
+ ScreenRectVertex(x, y, texcoords.top * scale_u, left * scale_v),
+ ScreenRectVertex(x + w, y, texcoords.bottom * scale_u, left * scale_v),
+ ScreenRectVertex(x, y + h, texcoords.top * scale_u, right * scale_v),
+ ScreenRectVertex(x + w, y + h, texcoords.bottom * scale_u, right * scale_v),
}};
state.texture_units[0].texture_2d = screen_info.display_texture;
diff --git a/src/video_core/renderer_opengl/renderer_opengl.h b/src/video_core/renderer_opengl/renderer_opengl.h
index fd0267cf5..59d92a3dc 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.h
+++ b/src/video_core/renderer_opengl/renderer_opengl.h
@@ -97,4 +97,5 @@ private:
/// Used for transforming the framebuffer orientation
Tegra::FramebufferConfig::TransformFlags framebuffer_transform_flags;
+ MathUtil::Rectangle<int> framebuffer_crop_rect;
};
diff --git a/src/video_core/textures/astc.cpp b/src/video_core/textures/astc.cpp
index 3c4ad1c9d..b1feacae9 100644
--- a/src/video_core/textures/astc.cpp
+++ b/src/video_core/textures/astc.cpp
@@ -25,16 +25,15 @@
class BitStream {
public:
- BitStream(unsigned char* ptr, int nBits = 0, int start_offset = 0)
- : m_BitsWritten(0), m_BitsRead(0), m_NumBits(nBits), m_CurByte(ptr),
- m_NextBit(start_offset % 8), done(false) {}
+ explicit BitStream(unsigned char* ptr, int nBits = 0, int start_offset = 0)
+ : m_NumBits(nBits), m_CurByte(ptr), m_NextBit(start_offset % 8) {}
+
+ ~BitStream() = default;
int GetBitsWritten() const {
return m_BitsWritten;
}
- ~BitStream() {}
-
void WriteBitsR(unsigned int val, unsigned int nBits) {
for (unsigned int i = 0; i < nBits; i++) {
WriteBit((val >> (nBits - i - 1)) & 1);
@@ -95,33 +94,28 @@ private:
done = done || ++m_BitsWritten >= m_NumBits;
}
- int m_BitsWritten;
+ int m_BitsWritten = 0;
const int m_NumBits;
unsigned char* m_CurByte;
- int m_NextBit;
- int m_BitsRead;
+ int m_NextBit = 0;
+ int m_BitsRead = 0;
- bool done;
+ bool done = false;
};
template <typename IntType>
class Bits {
-private:
- const IntType& m_Bits;
-
- // Don't copy
- Bits() {}
- Bits(const Bits&) {}
- Bits& operator=(const Bits&) {}
-
public:
- explicit Bits(IntType& v) : m_Bits(v) {}
+ explicit Bits(const IntType& v) : m_Bits(v) {}
- uint8_t operator[](uint32_t bitPos) {
+ Bits(const Bits&) = delete;
+ Bits& operator=(const Bits&) = delete;
+
+ uint8_t operator[](uint32_t bitPos) const {
return static_cast<uint8_t>((m_Bits >> bitPos) & 1);
}
- IntType operator()(uint32_t start, uint32_t end) {
+ IntType operator()(uint32_t start, uint32_t end) const {
if (start == end) {
return (*this)[start];
} else if (start > end) {
@@ -133,6 +127,9 @@ public:
uint64_t mask = (1 << (end - start + 1)) - 1;
return (m_Bits >> start) & mask;
}
+
+private:
+ const IntType& m_Bits;
};
enum EIntegerEncoding { eIntegerEncoding_JustBits, eIntegerEncoding_Quint, eIntegerEncoding_Trit };
@@ -186,12 +183,12 @@ public:
m_QuintValue = val;
}
- bool MatchesEncoding(const IntegerEncodedValue& other) {
+ bool MatchesEncoding(const IntegerEncodedValue& other) const {
return m_Encoding == other.m_Encoding && m_NumBits == other.m_NumBits;
}
// Returns the number of bits required to encode nVals values.
- uint32_t GetBitLength(uint32_t nVals) {
+ uint32_t GetBitLength(uint32_t nVals) const {
uint32_t totalBits = m_NumBits * nVals;
if (m_Encoding == eIntegerEncoding_Trit) {
totalBits += (nVals * 8 + 4) / 5;
@@ -382,19 +379,15 @@ private:
namespace ASTCC {
struct TexelWeightParams {
- uint32_t m_Width;
- uint32_t m_Height;
- bool m_bDualPlane;
- uint32_t m_MaxWeight;
- bool m_bError;
- bool m_bVoidExtentLDR;
- bool m_bVoidExtentHDR;
-
- TexelWeightParams() {
- memset(this, 0, sizeof(*this));
- }
-
- uint32_t GetPackedBitSize() {
+ uint32_t m_Width = 0;
+ uint32_t m_Height = 0;
+ bool m_bDualPlane = false;
+ uint32_t m_MaxWeight = 0;
+ bool m_bError = false;
+ bool m_bVoidExtentLDR = false;
+ bool m_bVoidExtentHDR = false;
+
+ uint32_t GetPackedBitSize() const {
// How many indices do we have?
uint32_t nIdxs = m_Height * m_Width;
if (m_bDualPlane) {
@@ -413,7 +406,7 @@ struct TexelWeightParams {
}
};
-TexelWeightParams DecodeBlockInfo(BitStream& strm) {
+static TexelWeightParams DecodeBlockInfo(BitStream& strm) {
TexelWeightParams params;
// Read the entire block mode all at once
@@ -612,8 +605,8 @@ TexelWeightParams DecodeBlockInfo(BitStream& strm) {
return params;
}
-void FillVoidExtentLDR(BitStream& strm, uint32_t* const outBuf, uint32_t blockWidth,
- uint32_t blockHeight) {
+static void FillVoidExtentLDR(BitStream& strm, uint32_t* const outBuf, uint32_t blockWidth,
+ uint32_t blockHeight) {
// Don't actually care about the void extent, just read the bits...
for (int i = 0; i < 4; ++i) {
strm.ReadBits(13);
@@ -628,23 +621,25 @@ void FillVoidExtentLDR(BitStream& strm, uint32_t* const outBuf, uint32_t blockWi
uint32_t rgba = (r >> 8) | (g & 0xFF00) | (static_cast<uint32_t>(b) & 0xFF00) << 8 |
(static_cast<uint32_t>(a) & 0xFF00) << 16;
- for (uint32_t j = 0; j < blockHeight; j++)
+ for (uint32_t j = 0; j < blockHeight; j++) {
for (uint32_t i = 0; i < blockWidth; i++) {
outBuf[j * blockWidth + i] = rgba;
}
+ }
}
-void FillError(uint32_t* outBuf, uint32_t blockWidth, uint32_t blockHeight) {
- for (uint32_t j = 0; j < blockHeight; j++)
+static void FillError(uint32_t* outBuf, uint32_t blockWidth, uint32_t blockHeight) {
+ for (uint32_t j = 0; j < blockHeight; j++) {
for (uint32_t i = 0; i < blockWidth; i++) {
outBuf[j * blockWidth + i] = 0xFFFF00FF;
}
+ }
}
// Replicates low numBits such that [(toBit - 1):(toBit - 1 - fromBit)]
// is the same as [(numBits - 1):0] and repeats all the way down.
template <typename IntType>
-IntType Replicate(const IntType& val, uint32_t numBits, uint32_t toBit) {
+static IntType Replicate(const IntType& val, uint32_t numBits, uint32_t toBit) {
if (numBits == 0)
return 0;
if (toBit == 0)
@@ -668,27 +663,15 @@ IntType Replicate(const IntType& val, uint32_t numBits, uint32_t toBit) {
class Pixel {
protected:
- typedef int16_t ChannelType;
- uint8_t m_BitDepth[4];
- int16_t color[4];
+ using ChannelType = int16_t;
+ uint8_t m_BitDepth[4] = {8, 8, 8, 8};
+ int16_t color[4] = {};
public:
- Pixel() {
- for (int i = 0; i < 4; i++) {
- m_BitDepth[i] = 8;
- color[i] = 0;
- }
- }
-
- Pixel(ChannelType a, ChannelType r, ChannelType g, ChannelType b, unsigned bitDepth = 8) {
- for (int i = 0; i < 4; i++)
- m_BitDepth[i] = bitDepth;
-
- color[0] = a;
- color[1] = r;
- color[2] = g;
- color[3] = b;
- }
+ Pixel() = default;
+ Pixel(ChannelType a, ChannelType r, ChannelType g, ChannelType b, unsigned bitDepth = 8)
+ : m_BitDepth{uint8_t(bitDepth), uint8_t(bitDepth), uint8_t(bitDepth), uint8_t(bitDepth)},
+ color{a, r, g, b} {}
// Changes the depth of each pixel. This scales the values to
// the appropriate bit depth by either truncating the least
@@ -807,8 +790,8 @@ public:
}
};
-void DecodeColorValues(uint32_t* out, uint8_t* data, uint32_t* modes, const uint32_t nPartitions,
- const uint32_t nBitsForColorData) {
+static void DecodeColorValues(uint32_t* out, uint8_t* data, const uint32_t* modes,
+ const uint32_t nPartitions, const uint32_t nBitsForColorData) {
// First figure out how many color values we have
uint32_t nValues = 0;
for (uint32_t i = 0; i < nPartitions; i++) {
@@ -844,8 +827,7 @@ void DecodeColorValues(uint32_t* out, uint8_t* data, uint32_t* modes, const uint
// Once we have the decoded values, we need to dequantize them to the 0-255 range
// This procedure is outlined in ASTC spec C.2.13
uint32_t outIdx = 0;
- std::vector<IntegerEncodedValue>::const_iterator itr;
- for (itr = decodedColorValues.begin(); itr != decodedColorValues.end(); itr++) {
+ for (auto itr = decodedColorValues.begin(); itr != decodedColorValues.end(); ++itr) {
// Have we already decoded all that we need?
if (outIdx >= nValues) {
break;
@@ -978,7 +960,7 @@ void DecodeColorValues(uint32_t* out, uint8_t* data, uint32_t* modes, const uint
}
}
-uint32_t UnquantizeTexelWeight(const IntegerEncodedValue& val) {
+static uint32_t UnquantizeTexelWeight(const IntegerEncodedValue& val) {
uint32_t bitval = val.GetBitValue();
uint32_t bitlen = val.BaseBitLength();
@@ -1067,17 +1049,18 @@ uint32_t UnquantizeTexelWeight(const IntegerEncodedValue& val) {
return result;
}
-void UnquantizeTexelWeights(uint32_t out[2][144], std::vector<IntegerEncodedValue>& weights,
- const TexelWeightParams& params, const uint32_t blockWidth,
- const uint32_t blockHeight) {
+static void UnquantizeTexelWeights(uint32_t out[2][144],
+ const std::vector<IntegerEncodedValue>& weights,
+ const TexelWeightParams& params, const uint32_t blockWidth,
+ const uint32_t blockHeight) {
uint32_t weightIdx = 0;
uint32_t unquantized[2][144];
- std::vector<IntegerEncodedValue>::const_iterator itr;
- for (itr = weights.begin(); itr != weights.end(); itr++) {
+
+ for (auto itr = weights.begin(); itr != weights.end(); ++itr) {
unquantized[0][weightIdx] = UnquantizeTexelWeight(*itr);
if (params.m_bDualPlane) {
- itr++;
+ ++itr;
unquantized[1][weightIdx] = UnquantizeTexelWeight(*itr);
if (itr == weights.end()) {
break;
@@ -1261,8 +1244,8 @@ static inline uint32_t Select2DPartition(int32_t seed, int32_t x, int32_t y, int
}
// Section C.2.14
-void ComputeEndpoints(Pixel& ep1, Pixel& ep2, const uint32_t*& colorValues,
- uint32_t colorEndpointMode) {
+static void ComputeEndpoints(Pixel& ep1, Pixel& ep2, const uint32_t*& colorValues,
+ uint32_t colorEndpointMode) {
#define READ_UINT_VALUES(N) \
uint32_t v[N]; \
for (uint32_t i = 0; i < N; i++) { \
@@ -1382,8 +1365,8 @@ void ComputeEndpoints(Pixel& ep1, Pixel& ep2, const uint32_t*& colorValues,
#undef READ_INT_VALUES
}
-void DecompressBlock(uint8_t inBuf[16], const uint32_t blockWidth, const uint32_t blockHeight,
- uint32_t* outBuf) {
+static void DecompressBlock(uint8_t inBuf[16], const uint32_t blockWidth,
+ const uint32_t blockHeight, uint32_t* outBuf) {
BitStream strm(inBuf);
TexelWeightParams weightParams = DecodeBlockInfo(strm);
@@ -1617,8 +1600,7 @@ namespace Tegra::Texture::ASTC {
std::vector<uint8_t> Decompress(std::vector<uint8_t>& data, uint32_t width, uint32_t height,
uint32_t block_width, uint32_t block_height) {
uint32_t blockIdx = 0;
- std::vector<uint8_t> outData;
- outData.resize(height * width * 4);
+ std::vector<uint8_t> outData(height * width * 4);
for (uint32_t j = 0; j < height; j += block_height) {
for (uint32_t i = 0; i < width; i += block_width) {
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp
index a32134fbe..62754a1a9 100644
--- a/src/yuzu/configuration/config.cpp
+++ b/src/yuzu/configuration/config.cpp
@@ -97,7 +97,7 @@ void Config::ReadValues() {
qt_config->endGroup();
qt_config->beginGroup("System");
- Settings::values.use_docked_mode = qt_config->value("use_docked_mode", true).toBool();
+ Settings::values.use_docked_mode = qt_config->value("use_docked_mode", false).toBool();
qt_config->endGroup();
qt_config->beginGroup("Miscellaneous");
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp
index 5a708dc73..0132a050d 100644
--- a/src/yuzu/game_list.cpp
+++ b/src/yuzu/game_list.cpp
@@ -17,10 +17,7 @@
#include "game_list_p.h"
#include "ui_settings.h"
-GameList::SearchField::KeyReleaseEater::KeyReleaseEater(GameList* gamelist) {
- this->gamelist = gamelist;
- edit_filter_text_old = "";
-}
+GameList::SearchField::KeyReleaseEater::KeyReleaseEater(GameList* gamelist) : gamelist{gamelist} {}
// EventFilter in order to process systemkeys while editing the searchfield
bool GameList::SearchField::KeyReleaseEater::eventFilter(QObject* obj, QEvent* event) {
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp
index 3a311b69f..723e8b4cc 100644
--- a/src/yuzu_cmd/config.cpp
+++ b/src/yuzu_cmd/config.cpp
@@ -110,7 +110,7 @@ void Config::ReadValues() {
sdl2_config->GetBoolean("Data Storage", "use_virtual_sd", true);
// System
- Settings::values.use_docked_mode = sdl2_config->GetBoolean("System", "use_docked_mode", true);
+ Settings::values.use_docked_mode = sdl2_config->GetBoolean("System", "use_docked_mode", false);
// Miscellaneous
Settings::values.log_filter = sdl2_config->Get("Miscellaneous", "log_filter", "*:Trace");
diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h
index 71d2e040f..5eca38b48 100644
--- a/src/yuzu_cmd/default_ini.h
+++ b/src/yuzu_cmd/default_ini.h
@@ -163,7 +163,7 @@ use_virtual_sd =
[System]
# Whether the system is docked
-# 1 (default): Yes, 0: No
+# 1: Yes, 0 (default): No
use_docked_mode =
# The system region that yuzu will use during emulation