diff --git a/Common/GL/GLInterface/EGL.h b/Common/GL/GLInterface/EGL.h index 3028e9fc93..beb7377449 100644 --- a/Common/GL/GLInterface/EGL.h +++ b/Common/GL/GLInterface/EGL.h @@ -26,14 +26,14 @@ class cInterfaceEGL : public cInterfaceBase { public: - void SwapInterval(int Interval); - void Swap(); - void SetMode(u32 mode) { s_opengl_mode = mode; } - void* GetFuncAddress(const std::string& name); + void SwapInterval(int Interval) override; + void Swap() override; + void SetMode(u32 mode) override { s_opengl_mode = mode; } + void* GetFuncAddress(const std::string& name) override; bool Create(void *window_handle, bool core, bool use565) override; - bool MakeCurrent(); - bool ClearCurrent(); - void Shutdown(); + bool MakeCurrent() override; + bool ClearCurrent() override; + void Shutdown() override; protected: EGLSurface egl_surf; diff --git a/Common/Timer.h b/Common/Timer.h index 6094c5e7c8..8d775b8423 100644 --- a/Common/Timer.h +++ b/Common/Timer.h @@ -51,7 +51,9 @@ public: private: u64 m_LastTime; u64 m_StartTime; +#ifdef _WIN32 u64 m_frequency; +#endif bool m_Running; }; diff --git a/Common/Vulkan/VulkanContext.cpp b/Common/Vulkan/VulkanContext.cpp index a117dac02b..f446a5fb84 100644 --- a/Common/Vulkan/VulkanContext.cpp +++ b/Common/Vulkan/VulkanContext.cpp @@ -55,8 +55,6 @@ VulkanContext::VulkanContext(const char *app_name, int app_ver, uint32_t flags) #endif graphics_queue_family_index_(-1), surface_(VK_NULL_HANDLE), - prepared(false), - use_staging_buffer_(false), instance_(VK_NULL_HANDLE), width(0), height(0), diff --git a/Common/Vulkan/VulkanContext.h b/Common/Vulkan/VulkanContext.h index bc3a7d6d1b..6c03d0479e 100644 --- a/Common/Vulkan/VulkanContext.h +++ b/Common/Vulkan/VulkanContext.h @@ -255,8 +255,6 @@ private: VkQueue gfx_queue_; VkSurfaceKHR surface_; - bool prepared; - bool use_staging_buffer_; std::string init_error_; std::vector instance_layer_names; diff --git a/Core/MIPS/ARM/ArmCompVFPUNEON.cpp b/Core/MIPS/ARM/ArmCompVFPUNEON.cpp index 73f50dc8db..e40c4d8cae 100644 --- a/Core/MIPS/ARM/ArmCompVFPUNEON.cpp +++ b/Core/MIPS/ARM/ArmCompVFPUNEON.cpp @@ -1034,7 +1034,8 @@ void ArmJit::CompNEON_Vh2f(MIPSOpcode op) { } ARMReg vs = NEONMapPrefixS(_VS, sz, 0); - DestARMReg vd = NEONMapPrefixD(_VD, outsize, MAP_DIRTY | (vd == vs ? 0 : MAP_NOINIT)); + // TODO: MAP_NOINIT if they're definitely not overlapping. + DestARMReg vd = NEONMapPrefixD(_VD, outsize, MAP_DIRTY); VCVTF32F16(vd.rd, vs); diff --git a/GPU/Common/SoftwareTransformCommon.cpp b/GPU/Common/SoftwareTransformCommon.cpp index 669e4924d2..685976115f 100644 --- a/GPU/Common/SoftwareTransformCommon.cpp +++ b/GPU/Common/SoftwareTransformCommon.cpp @@ -111,7 +111,7 @@ static bool IsReallyAClear(const TransformedVertex *transformed, int numVerts) { if (i > 0 && transformed[i].x != transformed[i - 1].x) return false; } else { - if ((i & 1) && transformed[i].color0_32 != matchcolor || transformed[i].z != matchz) + if ((i & 1) && (transformed[i].color0_32 != matchcolor || transformed[i].z != matchz)) return false; // Bottom right if (transformed[i].y != bufH) diff --git a/GPU/GPU.cpp b/GPU/GPU.cpp index f5bec931d5..60b52ba18a 100644 --- a/GPU/GPU.cpp +++ b/GPU/GPU.cpp @@ -63,7 +63,7 @@ bool GPU_Init(GraphicsContext *ctx, Thin3DContext *thin3d) { #endif break; case GPU_DIRECTX11: - return nullptr; + return false; #ifndef NO_VULKAN case GPU_VULKAN: SetGPU(new GPU_Vulkan(ctx)); diff --git a/UI/ControlMappingScreen.h b/UI/ControlMappingScreen.h index 9df22339ea..b971839906 100644 --- a/UI/ControlMappingScreen.h +++ b/UI/ControlMappingScreen.h @@ -64,7 +64,6 @@ protected: private: int pspBtn_; - bool replace_; std::function callback_; bool mapped_; // Prevent double registrations }; diff --git a/UI/CwCheatScreen.h b/UI/CwCheatScreen.h index 22cc35429c..dfc8a4d579 100644 --- a/UI/CwCheatScreen.h +++ b/UI/CwCheatScreen.h @@ -44,7 +44,6 @@ protected: private: UI::EventReturn OnCheckBox(UI::EventParams ¶ms); std::vector formattedList_; - bool anythingChanged_; }; // TODO: Instead just hook the OnClick event on a regular checkbox. diff --git a/UI/DisplayLayoutScreen.cpp b/UI/DisplayLayoutScreen.cpp index 55781e4159..0447aaeacf 100644 --- a/UI/DisplayLayoutScreen.cpp +++ b/UI/DisplayLayoutScreen.cpp @@ -238,8 +238,8 @@ void DisplayLayoutScreen::CreateViews() { Choice *center = new Choice(di->T("Center"), "", false, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 74)); center->OnClick.Handle(this, &DisplayLayoutScreen::OnCenter); root_->Add(center); - PopupSliderChoiceFloat *zoomlvl_ = new PopupSliderChoiceFloat(&g_Config.fSmallDisplayZoomLevel, 1.0f, 10.0f, di->T("Zoom"), 1.0f, screenManager(), di->T("* PSP res"), new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 134)); - root_->Add(zoomlvl_); + PopupSliderChoiceFloat *zoomlvl = new PopupSliderChoiceFloat(&g_Config.fSmallDisplayZoomLevel, 1.0f, 10.0f, di->T("Zoom"), 1.0f, screenManager(), di->T("* PSP res"), new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 134)); + root_->Add(zoomlvl); mode_->AddChoice(di->T("Move")); mode_->AddChoice(di->T("Resize")); mode_->SetSelection(0); diff --git a/UI/DisplayLayoutScreen.h b/UI/DisplayLayoutScreen.h index a6d9c80082..07cf0019e2 100644 --- a/UI/DisplayLayoutScreen.h +++ b/UI/DisplayLayoutScreen.h @@ -42,7 +42,6 @@ private: UI::ChoiceStrip *mode_; UI::PopupMultiChoice *zoom_; UI::PopupMultiChoice *rotation_; - UI::PopupSliderChoiceFloat *zoomlvl_; bool displayRotEnable_; // Touch down state for drag to resize etc float startX_; diff --git a/UI/GameSettingsScreen.h b/UI/GameSettingsScreen.h index 3759057b9e..9895b0a47f 100644 --- a/UI/GameSettingsScreen.h +++ b/UI/GameSettingsScreen.h @@ -43,9 +43,6 @@ private: //edit the game-specific settings and restore the global settings after exiting bool bEditThenRestore; bool lastVertical_; - // As we load metadata in the background, we need to be able to update these after the fact. - UI::TextView *tvTitle_; - UI::TextView *tvGameSize_; UI::CheckBox *enableReportsCheckbox_; UI::Choice *layoutEditorChoice_; UI::Choice *postProcChoice_; diff --git a/UI/GamepadEmu.h b/UI/GamepadEmu.h index eaebd5e9c8..377ca06433 100644 --- a/UI/GamepadEmu.h +++ b/UI/GamepadEmu.h @@ -127,8 +127,6 @@ private: int stick_; float stick_size_; float scale_; - bool dragging_[MAX_POINTERS]; - bool lastPointerDown_[MAX_POINTERS]; float centerX_; float centerY_; diff --git a/Windows/GPU/WindowsVulkanContext.cpp b/Windows/GPU/WindowsVulkanContext.cpp index 88cb6173c5..914e6151c4 100644 --- a/Windows/GPU/WindowsVulkanContext.cpp +++ b/Windows/GPU/WindowsVulkanContext.cpp @@ -177,7 +177,7 @@ bool WindowsVulkanContext::Init(HINSTANCE hInst, HWND hWnd, std::string *error_m } if (g_validate_) { int bits = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT; - g_Vulkan->InitDebugMsgCallback(Vulkan_Dbg, bits, &g_LogOptions); + g_Vulkan->InitDebugMsgCallback(&Vulkan_Dbg, bits, &g_LogOptions); } g_Vulkan->InitSurfaceWin32(hInst, hWnd); g_Vulkan->InitObjects(true); diff --git a/android/jni/app-android.cpp b/android/jni/app-android.cpp index 853fb3673c..f2c2706d6b 100644 --- a/android/jni/app-android.cpp +++ b/android/jni/app-android.cpp @@ -71,12 +71,12 @@ public: class AndroidEGLGraphicsContext : public AndroidGraphicsContext { public: AndroidEGLGraphicsContext() : wnd_(nullptr), gl(nullptr) {} - bool Init(ANativeWindow *wnd, int desiredBackbufferSizeX, int desiredBackbufferSizeY, int backbufferFormat, int androidVersion); + bool Init(ANativeWindow *wnd, int desiredBackbufferSizeX, int desiredBackbufferSizeY, int backbufferFormat, int androidVersion) override; void Shutdown() override; void SwapBuffers() override; void SwapInterval(int interval) override {} - void Resize() {} - Thin3DContext *CreateThin3DContext() { + void Resize() override {} + Thin3DContext *CreateThin3DContext() override { CheckGLExtensions(); return T3DCreateGLContext(); } @@ -141,8 +141,8 @@ public: void Shutdown() override {} void SwapBuffers() override {} void SwapInterval(int interval) override {} - void Resize() {} - Thin3DContext *CreateThin3DContext() { + void Resize() override {} + Thin3DContext *CreateThin3DContext() override { CheckGLExtensions(); return T3DCreateGLContext(); } @@ -161,7 +161,7 @@ public: void SwapBuffers() override; void Resize() override; - void *GetAPIContext() { return g_Vulkan; } + void *GetAPIContext() override { return g_Vulkan; } Thin3DContext *CreateThin3DContext() override { return T3DCreateVulkanContext(g_Vulkan); @@ -208,7 +208,7 @@ const char *ObjTypeToString(VkDebugReportObjectTypeEXT type) { } } -static VkBool32 VKAPI_CALL Vulkan_Dbg(VkDebugReportFlagsEXT msgFlags, VkDebugReportObjectTypeEXT objType, uint64_t srcObject, size_t location, int32_t msgCode, const char* pLayerPrefix, const char* pMsg, void *pUserData) { +static VKAPI_ATTR VkBool32 VKAPI_CALL Vulkan_Dbg(VkDebugReportFlagsEXT msgFlags, VkDebugReportObjectTypeEXT objType, uint64_t srcObject, size_t location, int32_t msgCode, const char* pLayerPrefix, const char* pMsg, void *pUserData) { const VulkanLogOptions *options = (const VulkanLogOptions *)pUserData; int loglevel = ANDROID_LOG_INFO; if (msgFlags & VK_DEBUG_REPORT_ERROR_BIT_EXT) { @@ -266,7 +266,7 @@ bool AndroidVulkanContext::Init(ANativeWindow *wnd, int desiredBackbufferSizeX, g_Vulkan->InitSurfaceAndroid(wnd, width, height); if (g_validate_) { int bits = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT; - g_Vulkan->InitDebugMsgCallback(Vulkan_Dbg, bits, &g_LogOptions); + g_Vulkan->InitDebugMsgCallback(&Vulkan_Dbg, bits, &g_LogOptions); } g_Vulkan->InitObjects(true); diff --git a/ext/native/thin3d/thin3d_vulkan.cpp b/ext/native/thin3d/thin3d_vulkan.cpp index 8180f42c76..d8b2b52be3 100644 --- a/ext/native/thin3d/thin3d_vulkan.cpp +++ b/ext/native/thin3d/thin3d_vulkan.cpp @@ -983,10 +983,6 @@ void Thin3DVKTexture::Finalize(int zim_flags) { // TODO } -static bool isPowerOf2(int n) { - return n == 1 || (n & (n - 1)) == 0; -} - Thin3DDepthStencilState *Thin3DVKContext::CreateDepthStencilState(bool depthTestEnabled, bool depthWriteEnabled, T3DComparison depthCompare) { Thin3DVKDepthStencilState *ds = new Thin3DVKDepthStencilState(); ds->depthTestEnabled = depthTestEnabled;