diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 3807bb180..9eae099f9 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -10,6 +10,8 @@ set(SRCS cd_xa.h gl_program.cpp gl_program.h + gl_stream_buffer.cpp + gl_stream_buffer.h gl_texture.cpp gl_texture.h jit_code_buffer.cpp diff --git a/src/common/bitfield.h b/src/common/bitfield.h index 86dd8f7c2..0e63b574c 100644 --- a/src/common/bitfield.h +++ b/src/common/bitfield.h @@ -130,7 +130,7 @@ struct BitField ALWAYS_INLINE void SetValue(DataType value) { - data = (data & ~GetMask()) | (static_cast(value) << BitIndex) & GetMask(); + data = (data & ~GetMask()) | ((static_cast(value) << BitIndex) & GetMask()); } BackingDataType data; diff --git a/src/common/cd_image.h b/src/common/cd_image.h index e04645d11..2fd725774 100644 --- a/src/common/cd_image.h +++ b/src/common/cd_image.h @@ -78,7 +78,7 @@ public: } #define RELATIONAL_OPERATOR(op) \ - bool operator##op(const Position& rhs) const \ + bool operator op (const Position& rhs) const \ { \ return std::tie(minute, second, frame) op std::tie(rhs.minute, rhs.second, rhs.frame); \ } diff --git a/src/common/fifo_queue.h b/src/common/fifo_queue.h index 2e330a859..48fb86ec8 100644 --- a/src/common/fifo_queue.h +++ b/src/common/fifo_queue.h @@ -134,8 +134,8 @@ public: } } - template - void PushFromQueue(FIFOQueue* other_queue) + template + void PushFromQueue(FIFOQueue* other_queue) { while (!other_queue->IsEmpty() && !IsFull()) { diff --git a/src/common/heap_array.h b/src/common/heap_array.h index 94ee4b4e0..ac3d8aa4e 100644 --- a/src/common/heap_array.h +++ b/src/common/heap_array.h @@ -13,7 +13,7 @@ public: using const_reference = const T&; using pointer = T*; using const_pointer = const T*; - using this_type = typename HeapArray; + using this_type = HeapArray; HeapArray() { m_data = new T[size]; } @@ -71,7 +71,7 @@ public: } #define RELATIONAL_OPERATOR(op) \ - bool operator##op(const this_type& rhs) const \ + bool operator op (const this_type& rhs) const \ { \ for (size_type i = 0; i < SIZE; i++) \ { \ @@ -91,4 +91,4 @@ public: private: T* m_data; -}; \ No newline at end of file +}; diff --git a/src/core/memory_card.cpp b/src/core/memory_card.cpp index 3b900478c..162bcdf63 100644 --- a/src/core/memory_card.cpp +++ b/src/core/memory_card.cpp @@ -243,7 +243,11 @@ std::shared_ptr MemoryCard::Open(System* system, std::string_view fi mc->m_filename = filename; if (!mc->LoadFromFile()) { - Log_ErrorPrintf("Memory card at '%s' could not be read, formatting."); + SmallString message; + message.AppendString("Memory card at '"); + message.AppendString(filename.data(), filename.length()); + message.AppendString("' could not be read, formatting."); + Log_ErrorPrint(message); mc->Format(); } @@ -359,4 +363,4 @@ bool MemoryCard::SaveToFile() Log_InfoPrintf("Saved memory card to '%s'", m_filename.c_str()); m_system->GetHostInterface()->AddOSDMessage(SmallString::FromFormat("Saved memory card to '%s'", m_filename.c_str())); return true; -} \ No newline at end of file +}