mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-05 08:52:36 +00:00
Remove Unused Semicolons, Fix Windows.h includes and Minor Warnings Fixes
This commit is contained in:
parent
96560ed3ca
commit
b6e212a378
@ -175,4 +175,4 @@ std::filesystem::path GetFoolproofKbmConfigFile(const std::string& game_id = "")
|
||||
|
||||
// settings
|
||||
u32 GetLanguage();
|
||||
}; // namespace Config
|
||||
} // namespace Config
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include <cstddef>
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#include <cerrno>
|
||||
#include <cstring>
|
||||
|
@ -11,4 +11,4 @@
|
||||
|
||||
[[nodiscard]] inline u32 HashCombine(const u32 seed, const u32 hash) {
|
||||
return seed ^ (hash + 0x9e3779b9 + (seed << 6) + (seed >> 2));
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -39,4 +39,4 @@ struct fmt::formatter<fmt::UTF<std::string_view>, char> : formatter<std::string_
|
||||
auto format(const UTF<std::string_view>& wrapper, FormatContext& ctx) const {
|
||||
return formatter<std::string_view>::format(wrapper.data, ctx);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <cstdio>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
#include "common/assert.h"
|
||||
|
@ -45,4 +45,4 @@ void PatchMemory(std::string modNameStr, std::string offsetStr, std::string valu
|
||||
static std::vector<int32_t> PatternToByte(const std::string& pattern);
|
||||
uintptr_t PatternScan(const std::string& signature);
|
||||
|
||||
} // namespace MemoryPatcher
|
||||
} // namespace MemoryPatcher
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#include <windows.h>
|
||||
#include <Windows.h>
|
||||
#include "common/types.h"
|
||||
|
||||
typedef enum _FILE_INFORMATION_CLASS {
|
||||
|
@ -158,4 +158,4 @@ float S16ToSnorm(s16 val) {
|
||||
return float(val * c);
|
||||
}
|
||||
|
||||
} // namespace NumberUtils
|
||||
} // namespace NumberUtils
|
||||
|
@ -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
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "common/uint128.h"
|
||||
|
||||
#ifdef _WIN64
|
||||
#include <windows.h>
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
namespace Common {
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "common/signal_context.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#include <sys/ucontext.h>
|
||||
#endif
|
||||
@ -89,4 +89,4 @@ bool IsWriteError(void* ctx) {
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
} // namespace Common
|
||||
} // namespace Common
|
||||
|
@ -15,4 +15,4 @@ void IncrementRip(void* ctx, u64 length);
|
||||
|
||||
bool IsWriteError(void* ctx);
|
||||
|
||||
} // namespace Common
|
||||
} // namespace Common
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "common/types.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
namespace Common {
|
||||
|
@ -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__)
|
||||
|
@ -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>
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "cpu_patches.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#include <pthread.h>
|
||||
#ifdef __APPLE__
|
||||
|
@ -302,4 +302,4 @@ public:
|
||||
0xC7, 0x42, 0x82, 0x4B, 0x2E, 0xDC, 0x8E, 0x8D, 0x73, 0xCE, 0xB1, 0xCC, 0x01, 0xD9, 0x08,
|
||||
0x70, 0x87, 0x3C, 0x44, 0x08, 0xEC, 0x49, 0x8F, 0x81, 0x5A, 0xE2, 0x40, 0xFF, 0x77, 0xFC,
|
||||
0x0D};
|
||||
};
|
||||
};
|
||||
|
@ -43,4 +43,4 @@ private:
|
||||
std::array<u8, 16> esfmIv{};
|
||||
std::filesystem::path trpFilesPath;
|
||||
static constexpr int iv_len = 16;
|
||||
};
|
||||
};
|
||||
|
@ -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
|
||||
|
||||
|
@ -17,4 +17,4 @@ int PS4_SYSV_ABI Func_8A828CAEE7EDD5E9();
|
||||
int PS4_SYSV_ABI Func_E7EBCE96E92F91F8();
|
||||
|
||||
void RegisterlibSceDiscMap(Core::Loader::SymbolsResolver* sym);
|
||||
} // namespace Libraries::DiscMap
|
||||
} // namespace Libraries::DiscMap
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "common/types.h"
|
||||
|
||||
#ifdef _WIN64
|
||||
#include <windows.h>
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#include <mutex>
|
||||
#endif
|
||||
@ -77,4 +77,4 @@ private:
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace Libraries::Kernel
|
||||
} // namespace Libraries::Kernel
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "common/types.h"
|
||||
|
||||
#ifdef _WIN64
|
||||
#include <windows.h>
|
||||
#include <Windows.h>
|
||||
#elif defined(__APPLE__)
|
||||
#include <dispatch/dispatch.h>
|
||||
#else
|
||||
@ -161,4 +161,4 @@ private:
|
||||
using BinarySemaphore = Semaphore<1>;
|
||||
using CountingSemaphore = Semaphore<0x7FFFFFFF /*ORBIS_KERNEL_SEM_VALUE_MAX*/>;
|
||||
|
||||
} // namespace Libraries::Kernel
|
||||
} // namespace Libraries::Kernel
|
||||
|
@ -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"
|
||||
|
||||
|
@ -15,4 +15,4 @@ namespace Libraries::LibcInternal {
|
||||
// so everything is just in the .cpp file
|
||||
|
||||
void RegisterlibSceLibcInternal(Core::Loader::SymbolsResolver* sym);
|
||||
} // namespace Libraries::LibcInternal
|
||||
} // namespace Libraries::LibcInternal
|
||||
|
@ -226,4 +226,4 @@ int PS4_SYSV_ABI Func_F8EF6F5350A91990();
|
||||
int PS4_SYSV_ABI Func_FA7A2DD770447552();
|
||||
|
||||
void RegisterlibSceNpTrophy(Core::Loader::SymbolsResolver* sym);
|
||||
} // namespace Libraries::NpTrophy
|
||||
} // namespace Libraries::NpTrophy
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "core/signals.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#include <csignal>
|
||||
#ifdef ARCH_X86_64
|
||||
@ -161,4 +161,4 @@ bool SignalDispatch::DispatchIllegalInstruction(void* context) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Core
|
||||
|
@ -53,4 +53,4 @@ private:
|
||||
|
||||
using Signals = Common::Singleton<SignalDispatch>;
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Core
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "thread.h"
|
||||
|
||||
#ifdef _WIN64
|
||||
#include <windows.h>
|
||||
#include <Windows.h>
|
||||
#include "common/ntapi.h"
|
||||
#else
|
||||
#include <csignal>
|
||||
|
@ -42,4 +42,4 @@ private:
|
||||
u64 tid;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Core
|
||||
|
@ -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>
|
||||
|
@ -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");
|
||||
|
@ -38,4 +38,4 @@ using ImTextureID = ::ImGui::Texture*;
|
||||
|
||||
#ifdef IMGUI_USE_WCHAR32
|
||||
#error "This project uses 16 bits wchar standard like Orbis"
|
||||
#endif
|
||||
#endif
|
||||
|
@ -14,4 +14,4 @@ public:
|
||||
virtual void Draw() = 0;
|
||||
};
|
||||
|
||||
} // namespace ImGui
|
||||
} // namespace ImGui
|
||||
|
@ -42,4 +42,4 @@ public:
|
||||
explicit(false) operator bool() const;
|
||||
};
|
||||
|
||||
}; // namespace ImGui
|
||||
} // namespace ImGui
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -250,4 +250,4 @@ void Submit() {
|
||||
}
|
||||
} // namespace Core::TextureManager
|
||||
|
||||
} // namespace ImGui
|
||||
} // namespace ImGui
|
||||
|
@ -27,4 +27,4 @@ void DecodePngFile(std::filesystem::path path, Inner* core);
|
||||
|
||||
void Submit();
|
||||
|
||||
}; // namespace ImGui::Core::TextureManager
|
||||
} // namespace ImGui::Core::TextureManager
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "emulator.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
|
@ -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
|
@ -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) {
|
||||
|
@ -85,4 +85,4 @@ private:
|
||||
QNetworkAccessManager* m_network_manager;
|
||||
QString m_compatibility_filename;
|
||||
QJsonObject m_compatibility_database;
|
||||
};
|
||||
};
|
||||
|
@ -93,4 +93,4 @@ void ElfViewer::OpenElfFiles() {
|
||||
i++;
|
||||
}
|
||||
this->resizeColumnsToContents();
|
||||
}
|
||||
}
|
||||
|
@ -29,4 +29,4 @@ private:
|
||||
private:
|
||||
QLineEdit* m_gamesDirectory;
|
||||
QLineEdit* m_addonsDirectory;
|
||||
};
|
||||
};
|
||||
|
@ -418,4 +418,4 @@ QString GameListFrame::GetPlayTime(const std::string& serial) {
|
||||
|
||||
QTableWidgetItem* GameListFrame::GetCurrentItem() {
|
||||
return m_current_item;
|
||||
}
|
||||
}
|
||||
|
@ -173,4 +173,4 @@ You can find these here, with detailed comments, examples and suggestions for mo
|
||||
Devices: leftjoystick, rightjoystick, l2, r2
|
||||
)";
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "main_window.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
// Custom message handler to ignore Qt logs
|
||||
|
@ -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();
|
||||
|
@ -405,4 +405,4 @@ public:
|
||||
|
||||
namespace Ui {
|
||||
class MainWindow : public Ui_MainWindow {};
|
||||
} // namespace Ui
|
||||
} // namespace Ui
|
||||
|
@ -214,4 +214,4 @@ void PKGViewer::ProcessPKGInfo() {
|
||||
int numPkgs = m_pkg_list.size();
|
||||
QString statusMessage = QString::number(numPkgs) + " " + tr("Package");
|
||||
statusBar->showMessage(statusMessage);
|
||||
}
|
||||
}
|
||||
|
@ -59,4 +59,4 @@ private:
|
||||
QStringList dir_list;
|
||||
std::vector<std::string> dir_list_std;
|
||||
QTreeWidget* treeWidget = nullptr;
|
||||
};
|
||||
};
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -35,4 +35,4 @@ enum class TessConstantAttribute : u32 {
|
||||
FirstEdgeTessFactorIndex,
|
||||
};
|
||||
|
||||
} // namespace Shader
|
||||
} // namespace Shader
|
||||
|
@ -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) {
|
||||
|
@ -18,4 +18,4 @@ union DebugPrintFlags {
|
||||
BitField<0, 32, u32> num_args;
|
||||
};
|
||||
|
||||
} // namespace Shader::IR
|
||||
} // namespace Shader::IR
|
||||
|
@ -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;
|
||||
|
@ -34,4 +34,4 @@ struct PersistentSrtInfo {
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace Shader
|
||||
} // namespace Shader
|
||||
|
@ -124,4 +124,4 @@ inline auto MakeInstPattern(Args&&... args) {
|
||||
#define M_COMPOSITECONSTRUCTU32X4(...) \
|
||||
MakeInstPattern<IR::Opcode::CompositeConstructU32x4>(__VA_ARGS__)
|
||||
|
||||
} // namespace Shader::Optimiation::PatternMatching
|
||||
} // namespace Shader::Optimiation::PatternMatching
|
||||
|
@ -122,4 +122,4 @@ private:
|
||||
std::unordered_map<InstVector, u32, HashInstVector> iv_to_vn;
|
||||
};
|
||||
|
||||
} // namespace Shader::Optimization
|
||||
} // namespace Shader::Optimization
|
||||
|
@ -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.
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
#else
|
||||
#include <windows.h>
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
namespace VideoCore {
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <renderdoc_app.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user