From 086bbf95dc0a6ab1c5ae3d99b3b21f3c7723f979 Mon Sep 17 00:00:00 2001 From: Ziemas Date: Tue, 21 May 2024 04:25:11 +0200 Subject: [PATCH] Misc: Fix building with gcc14 (#11278) --- common/SmallString.h | 2 +- pcsx2/CDVD/ThreadedFileReader.cpp | 1 + pcsx2/Input/SDLInputSource.cpp | 2 +- pcsx2/SPU2/Dma.h | 2 ++ pcsx2/SPU2/defs.h | 1 + 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/common/SmallString.h b/common/SmallString.h index b2be736e6f..82c7413d60 100644 --- a/common/SmallString.h +++ b/common/SmallString.h @@ -343,7 +343,7 @@ private: #endif template -__fi SmallStackString SmallStackString::from_sprintf(const char* format, ...) +SmallStackString SmallStackString::from_sprintf(const char* format, ...) { std::va_list ap; va_start(ap, format); diff --git a/pcsx2/CDVD/ThreadedFileReader.cpp b/pcsx2/CDVD/ThreadedFileReader.cpp index 3471b4f087..51773f92ad 100644 --- a/pcsx2/CDVD/ThreadedFileReader.cpp +++ b/pcsx2/CDVD/ThreadedFileReader.cpp @@ -4,6 +4,7 @@ #include "ThreadedFileReader.h" #include "common/Threading.h" +#include // Make sure buffer size is bigger than the cutoff where PCSX2 emulates a seek // If buffers are smaller than that, we can't keep up with linear reads diff --git a/pcsx2/Input/SDLInputSource.cpp b/pcsx2/Input/SDLInputSource.cpp index 52aa905cd8..510c123e2f 100644 --- a/pcsx2/Input/SDLInputSource.cpp +++ b/pcsx2/Input/SDLInputSource.cpp @@ -790,7 +790,7 @@ bool SDLInputSource::CloseDevice(int joystick_index) return false; InputManager::OnInputDeviceDisconnected( - {{.source_type = InputSourceType::SDL, .source_index = static_cast(it->player_id)}}, + {InputBindingKey{.source_type = InputSourceType::SDL, .source_index = static_cast(it->player_id)}}, fmt::format("SDL-{}", it->player_id)); if (it->haptic) diff --git a/pcsx2/SPU2/Dma.h b/pcsx2/SPU2/Dma.h index 5f64cb531f..102ebb97d5 100644 --- a/pcsx2/SPU2/Dma.h +++ b/pcsx2/SPU2/Dma.h @@ -3,6 +3,8 @@ #pragma once +#include "common/Pcsx2Types.h" + #define MADR (Index == 0 ? HW_DMA4_MADR : HW_DMA7_MADR) #define TADR (Index == 0 ? HW_DMA4_TADR : HW_DMA7_TADR) diff --git a/pcsx2/SPU2/defs.h b/pcsx2/SPU2/defs.h index adbf67d424..b6317b38d2 100644 --- a/pcsx2/SPU2/defs.h +++ b/pcsx2/SPU2/defs.h @@ -5,6 +5,7 @@ #include "GS/MultiISA.h" +#include #include // --------------------------------------------------------------------------------------