From 35f9b9d0d80994d912f05301eeb56296fa67d104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 2 Dec 2024 09:14:10 +0100 Subject: [PATCH] Qt buildfix, assorted warning fixes --- GPU/Debugger/Record.cpp | 2 +- GPU/GPUCommon.cpp | 2 +- Qt/mainwindow.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/GPU/Debugger/Record.cpp b/GPU/Debugger/Record.cpp index d9e17c7550..347e581f5a 100644 --- a/GPU/Debugger/Record.cpp +++ b/GPU/Debugger/Record.cpp @@ -207,7 +207,7 @@ static Path WriteRecording() { FILE *fp = File::OpenCFile(filename, "wb"); Header header{}; - strncpy(header.magic, HEADER_MAGIC, sizeof(header.magic)); + memcpy(header.magic, HEADER_MAGIC, sizeof(header.magic)); header.version = VERSION; strncpy(header.gameID, g_paramSFO.GetDiscID().c_str(), sizeof(header.gameID)); fwrite(&header, sizeof(header), 1, fp); diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index 4a16048ca8..3bc7a42c4d 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -1710,7 +1710,7 @@ void GPUCommon::DoBlockTransfer(u32 skipDrawReason) { bool dstWraps = Memory::IsVRAMAddress(dstBasePtr) && !dstValid; char tag[128]; - size_t tagSize; + size_t tagSize = 0; // Tell the framebuffer manager to take action if possible. If it does the entire thing, let's just return. if (!framebufferManager_ || !framebufferManager_->NotifyBlockTransferBefore(dstBasePtr, dstStride, dstX, dstY, srcBasePtr, srcStride, srcX, srcY, width, height, bpp, skipDrawReason)) { diff --git a/Qt/mainwindow.cpp b/Qt/mainwindow.cpp index e982aff696..a41fb1b76f 100644 --- a/Qt/mainwindow.cpp +++ b/Qt/mainwindow.cpp @@ -117,7 +117,7 @@ void MainWindow::updateMenus() void MainWindow::bootDone() { - if (nextState == CORE_RUNNING) + if (nextState == CORE_RUNNING_CPU) runAct(); updateMenus(); }