Remove Unused Semicolons, Fix Windows.h includes and Minor Warnings Fixes

This commit is contained in:
Xphalnos 2025-03-05 20:20:00 +01:00
parent 96560ed3ca
commit b6e212a378
65 changed files with 74 additions and 77 deletions

View File

@ -175,4 +175,4 @@ std::filesystem::path GetFoolproofKbmConfigFile(const std::string& game_id = "")
// settings
u32 GetLanguage();
}; // namespace Config
} // namespace Config

View File

@ -4,7 +4,7 @@
#include <cstddef>
#ifdef _WIN32
#include <windows.h>
#include <Windows.h>
#else
#include <cerrno>
#include <cstring>

View File

@ -13,9 +13,9 @@
#ifdef _WIN32
#include "common/ntapi.h"
#include <Windows.h>
#include <io.h>
#include <share.h>
#include <windows.h>
#else
#include <unistd.h>
#endif

View File

@ -8,7 +8,7 @@
#include <fmt/format.h>
#ifdef _WIN32
#include <windows.h> // For OutputDebugStringW
#include <Windows.h> // For OutputDebugStringW
#endif
#include "common/bounded_threadsafe_queue.h"

View File

@ -5,7 +5,7 @@
#include <cstdio>
#ifdef _WIN32
#include <windows.h>
#include <Windows.h>
#endif
#include "common/assert.h"

View File

@ -5,7 +5,7 @@
#ifdef _WIN32
#include <windows.h>
#include <Windows.h>
#include "common/types.h"
typedef enum _FILE_INFORMATION_CLASS {

View File

@ -17,8 +17,8 @@
#ifdef _WIN32
// This is the maximum number of UTF-16 code units permissible in Windows file paths
#define MAX_PATH 260
#include <Shlobj.h>
#include <windows.h>
#include <ShlObj.h>
#include <Windows.h>
#else
// This is the maximum number of UTF-8 code units permissible in all other OSes' file paths
#define MAX_PATH 1024

View File

@ -6,7 +6,7 @@
#include "common/uint128.h"
#ifdef _WIN64
#include <windows.h>
#include <Windows.h>
#endif
namespace Common {

View File

@ -6,7 +6,7 @@
#include "common/signal_context.h"
#ifdef _WIN32
#include <windows.h>
#include <Windows.h>
#else
#include <sys/ucontext.h>
#endif

View File

@ -9,7 +9,7 @@
#include "common/types.h"
#ifdef _WIN32
#include <windows.h>
#include <Windows.h>
#endif
namespace Common {

View File

@ -14,7 +14,7 @@
#include <mach/mach_time.h>
#include <pthread.h>
#elif defined(_WIN32)
#include <windows.h>
#include <Windows.h>
#include "common/string_util.h"
#else
#if defined(__Bitrig__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__OpenBSD__)

View File

@ -13,7 +13,7 @@
#include "libraries/error_codes.h"
#ifdef _WIN32
#include <windows.h>
#include <Windows.h>
#else
#include <fcntl.h>
#include <sys/mman.h>

View File

@ -19,7 +19,7 @@
#include "cpu_patches.h"
#ifdef _WIN32
#include <windows.h>
#include <Windows.h>
#else
#include <pthread.h>
#ifdef __APPLE__

View File

@ -6,9 +6,9 @@
#include "core/file_sys/file.h"
#ifdef _WIN64
#include <Windows.h>
#include <io.h>
#include <share.h>
#include <windows.h>
#include "common/ntapi.h"
#endif

View File

@ -8,7 +8,7 @@
#include "common/types.h"
#ifdef _WIN64
#include <windows.h>
#include <Windows.h>
#else
#include <mutex>
#endif

View File

@ -10,7 +10,7 @@
#include "common/types.h"
#ifdef _WIN64
#include <windows.h>
#include <Windows.h>
#elif defined(__APPLE__)
#include <dispatch/dispatch.h>
#else

View File

@ -10,8 +10,8 @@
#include "core/libraries/libs.h"
#ifdef _WIN64
#include <Windows.h>
#include <pthread_time.h>
#include <windows.h>
#include "common/ntapi.h"

View File

@ -8,7 +8,7 @@
#include "core/signals.h"
#ifdef _WIN32
#include <windows.h>
#include <Windows.h>
#else
#include <csignal>
#ifdef ARCH_X86_64

View File

@ -6,7 +6,7 @@
#include "thread.h"
#ifdef _WIN64
#include <windows.h>
#include <Windows.h>
#include "common/ntapi.h"
#else
#include <csignal>

View File

@ -10,7 +10,7 @@
#include "core/tls.h"
#ifdef _WIN32
#include <windows.h>
#include <Windows.h>
#elif defined(__APPLE__) && defined(ARCH_X86_64)
#include <architecture/i386/table.h>
#include <boost/icl/interval_set.hpp>

View File

@ -103,7 +103,7 @@ void Emulator::Run(const std::filesystem::path& file, const std::vector<std::str
std::string id;
std::string title;
std::string app_version;
u32 fw_version;
u32 fw_version = 0;
Common::PSFAttributes psf_attributes{};
const auto param_sfo_path = mnt->GetHostPath("/app0/sce_sys/param.sfo");

View File

@ -42,4 +42,4 @@ public:
explicit(false) operator bool() const;
};
}; // namespace ImGui
} // namespace ImGui

View File

@ -632,9 +632,9 @@ static void UpdateMouseData() {
io.AddMousePosEvent(mouse_x_global, mouse_y_global);
// SDL_EVENT_MOUSE_MOTION isn't triggered before the first frame is rendered
// force update the prev_cursor coords
if (mouse_x_global != bd->prev_mouse_pos.x || mouse_y_global != bd->prev_mouse_pos.y &&
bd->prev_mouse_pos.y == 0 &&
bd->prev_mouse_pos.x == 0) {
if (mouse_x_global != bd->prev_mouse_pos.x ||
(mouse_y_global != bd->prev_mouse_pos.y && bd->prev_mouse_pos.y == 0 &&
bd->prev_mouse_pos.x == 0)) {
bd->prev_mouse_pos.x = mouse_x_global;
bd->prev_mouse_pos.y = mouse_y_global;
bd->lastCursorMoveTime = bd->time;

View File

@ -28,4 +28,4 @@ enum GamepadMode {
void SetGamepadMode(GamepadMode mode, SDL_Gamepad** manual_gamepads_array = NULL,
int manual_gamepads_count = -1);
}; // namespace ImGui::Sdl
} // namespace ImGui::Sdl

View File

@ -27,4 +27,4 @@ void DecodePngFile(std::filesystem::path path, Inner* core);
void Submit();
}; // namespace ImGui::Core::TextureManager
} // namespace ImGui::Core::TextureManager

View File

@ -15,7 +15,7 @@
#include "emulator.h"
#ifdef _WIN32
#include <windows.h>
#include <Windows.h>
#endif
int main(int argc, char* argv[]) {

View File

@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#ifndef CHEATS_PATCHES_H
#define CHEATS_PATCHES_H
#pragma once
#include <QCheckBox>
#include <QComboBox>
@ -116,5 +115,3 @@ private:
QString CheatsDownloadedSuccessfully_MSG;
QString DownloadComplete_MSG;
};
#endif // CHEATS_PATCHES_H

View File

@ -15,7 +15,7 @@ CompatibilityInfoClass::CompatibilityInfoClass()
std::filesystem::path compatibility_file_path =
Common::FS::GetUserPath(Common::FS::PathType::MetaDataDir) / "compatibility_data.json";
Common::FS::PathToQString(m_compatibility_filename, compatibility_file_path);
};
}
CompatibilityInfoClass::~CompatibilityInfoClass() = default;
void CompatibilityInfoClass::UpdateCompatibilityDatabase(QWidget* parent, bool forced) {

View File

@ -13,7 +13,7 @@
#include "main_window.h"
#ifdef _WIN32
#include <windows.h>
#include <Windows.h>
#endif
// Custom message handler to ignore Qt logs

View File

@ -730,7 +730,7 @@ void MainWindow::ShowGameList() {
m_game_grid_frame->clearContents();
m_game_list_frame->clearContents();
}
};
}
void MainWindow::RefreshGameTable() {
// m_game_info->m_games.clear();

View File

@ -702,7 +702,7 @@ EmitContext::BufferSpv EmitContext::DefineBuffer(bool is_storage, bool is_writte
}
interfaces.push_back(id);
return {id, pointer_type};
};
}
void EmitContext::DefineBuffers() {
if (!profile.supports_robust_buffer_access && !info.has_readconst) {

View File

@ -66,7 +66,7 @@ private:
if (it == labels.end()) {
labels.push_back(address);
}
};
}
size_t GetIndex(Label label) {
if (label == 0) {
@ -75,7 +75,7 @@ private:
const auto it_index = std::ranges::lower_bound(index_to_pc, label);
ASSERT(it_index != index_to_pc.end() || label > index_to_pc.back());
return std::distance(index_to_pc.begin(), it_index);
};
}
public:
Common::ObjectPool<Block>& block_pool;

View File

@ -197,7 +197,7 @@ IR::VectorReg Translator::GetScratchVgpr(u32 offset) {
it->second = new_vgpr;
}
return it->second;
};
}
template <typename T>
T Translator::GetSrc(const InstOperand& operand) {

View File

@ -103,7 +103,7 @@ static inline void PushPtr(Xbyak::CodeGenerator& c, u32 off_dw) {
static inline void PopPtr(Xbyak::CodeGenerator& c) {
c.pop(rdi);
};
}
static void VisitPointer(u32 off_dw, IR::Inst* subtree, PassInfo& pass_info,
Xbyak::CodeGenerator& c) {
@ -182,7 +182,7 @@ static void GenerateSrtProgram(Info& info, PassInfo& pass_info) {
info.srt_info.flattened_bufsize_dw = pass_info.dst_off_dw;
}
}; // namespace
} // namespace
void FlattenExtendedUserdataPass(IR::Program& program) {
Shader::Info& info = program.info;

View File

@ -123,7 +123,7 @@ struct HullRuntimeInfo {
// output control points and attributes that shouldnt be read by the TES anyways
bool IsPassthrough() const {
return hs_output_base == 0 && ls_stride == hs_output_cp_stride && num_threads == 1;
};
}
// regs.ls_hs_config.hs_output_control_points contains the number of threads, which
// isn't exactly the number of output control points.

View File

@ -21,7 +21,7 @@
#include <sys/ioctl.h>
#endif
#else
#include <windows.h>
#include <Windows.h>
#endif
namespace VideoCore {

View File

@ -8,7 +8,7 @@
#include <renderdoc_app.h>
#ifdef _WIN32
#include <windows.h>
#include <Windows.h>
#else
#include <dlfcn.h>
#endif