Clean up some compiler warnings
This commit is contained in:
parent
5e65882920
commit
d39c9f5d1c
|
@ -470,7 +470,7 @@ void AndroidHostInterface::SetControllerType(u32 index, std::string_view type_na
|
||||||
}
|
}
|
||||||
|
|
||||||
RunOnEmulationThread(
|
RunOnEmulationThread(
|
||||||
[this, index, type]() {
|
[index, type]() {
|
||||||
Log_InfoPrintf("Changing controller slot %d to %s", index, Settings::GetControllerTypeName(type));
|
Log_InfoPrintf("Changing controller slot %d to %s", index, Settings::GetControllerTypeName(type));
|
||||||
g_settings.controller_types[index] = type;
|
g_settings.controller_types[index] = type;
|
||||||
System::UpdateControllers();
|
System::UpdateControllers();
|
||||||
|
@ -484,7 +484,7 @@ void AndroidHostInterface::SetControllerButtonState(u32 index, s32 button_code,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
RunOnEmulationThread(
|
RunOnEmulationThread(
|
||||||
[this, index, button_code, pressed]() {
|
[index, button_code, pressed]() {
|
||||||
Controller* controller = System::GetController(index);
|
Controller* controller = System::GetController(index);
|
||||||
if (!controller)
|
if (!controller)
|
||||||
return;
|
return;
|
||||||
|
@ -500,7 +500,7 @@ void AndroidHostInterface::SetControllerAxisState(u32 index, s32 button_code, fl
|
||||||
return;
|
return;
|
||||||
|
|
||||||
RunOnEmulationThread(
|
RunOnEmulationThread(
|
||||||
[this, index, button_code, value]() {
|
[index, button_code, value]() {
|
||||||
Controller* controller = System::GetController(index);
|
Controller* controller = System::GetController(index);
|
||||||
if (!controller)
|
if (!controller)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -126,7 +126,7 @@ bool CDImageCHD::Open(const char* filename)
|
||||||
char pgsub_str[256];
|
char pgsub_str[256];
|
||||||
u32 metadata_length;
|
u32 metadata_length;
|
||||||
|
|
||||||
int track_num = 0, frames = 0, pad = 0, pregap_frames = 0, postgap_frames = 0;
|
int track_num = 0, frames = 0, pregap_frames = 0, postgap_frames = 0;
|
||||||
err = chd_get_metadata(m_chd, CDROM_TRACK_METADATA2_TAG, num_tracks, metadata_str, sizeof(metadata_str),
|
err = chd_get_metadata(m_chd, CDROM_TRACK_METADATA2_TAG, num_tracks, metadata_str, sizeof(metadata_str),
|
||||||
&metadata_length, nullptr, nullptr);
|
&metadata_length, nullptr, nullptr);
|
||||||
if (err == CHDERR_NONE)
|
if (err == CHDERR_NONE)
|
||||||
|
|
|
@ -158,7 +158,6 @@ void Texture::GetTextureSubImage(GLuint texture, GLint level, GLint xoffset, GLi
|
||||||
else
|
else
|
||||||
glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture, level);
|
glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture, level);
|
||||||
|
|
||||||
GLuint status = glCheckFramebufferStatus(GL_READ_FRAMEBUFFER);
|
|
||||||
DebugAssert(glCheckFramebufferStatus(GL_READ_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE);
|
DebugAssert(glCheckFramebufferStatus(GL_READ_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE);
|
||||||
glReadPixels(xoffset, yoffset, width, height, format, type, pixels);
|
glReadPixels(xoffset, yoffset, width, height, format, type, pixels);
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
#include "../string_util.h"
|
#include "../string_util.h"
|
||||||
#include "context.h"
|
#include "context.h"
|
||||||
#include "shader_compiler.h"
|
#include "shader_compiler.h"
|
||||||
Log_SetChannel(Vulkan::Util);
|
|
||||||
|
|
||||||
namespace Vulkan {
|
namespace Vulkan {
|
||||||
namespace Util {
|
namespace Util {
|
||||||
|
|
|
@ -1429,8 +1429,6 @@ bool CodeGenerator::Compile_Divide(const CodeBlockInstruction& cbi)
|
||||||
{
|
{
|
||||||
InstructionPrologue(cbi, 1);
|
InstructionPrologue(cbi, 1);
|
||||||
|
|
||||||
const bool signed_divide = (cbi.instruction.r.funct == InstructionFunct::div);
|
|
||||||
|
|
||||||
Value num = m_register_cache.ReadGuestRegister(cbi.instruction.r.rs);
|
Value num = m_register_cache.ReadGuestRegister(cbi.instruction.r.rs);
|
||||||
Value denom = m_register_cache.ReadGuestRegister(cbi.instruction.r.rt);
|
Value denom = m_register_cache.ReadGuestRegister(cbi.instruction.r.rt);
|
||||||
if (num.IsConstant() && denom.IsConstant())
|
if (num.IsConstant() && denom.IsConstant())
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
#include "gpu_hw_shadergen.h"
|
#include "gpu_hw_shadergen.h"
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/log.h"
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <glad.h>
|
#include <glad.h>
|
||||||
Log_SetChannel(GPU_HW_ShaderGen);
|
|
||||||
|
|
||||||
GPU_HW_ShaderGen::GPU_HW_ShaderGen(HostDisplay::RenderAPI render_api, u32 resolution_scale, bool true_color, bool scaled_dithering, GPUTextureFilter texture_filtering, bool uv_limits, bool supports_dual_source_blend) :
|
GPU_HW_ShaderGen::GPU_HW_ShaderGen(HostDisplay::RenderAPI render_api, u32 resolution_scale, bool true_color, bool scaled_dithering, GPUTextureFilter texture_filtering, bool uv_limits, bool supports_dual_source_blend) :
|
||||||
ShaderGen(render_api, supports_dual_source_blend),
|
ShaderGen(render_api, supports_dual_source_blend),
|
||||||
|
|
|
@ -149,6 +149,9 @@ protected:
|
||||||
/// Restores all settings to defaults.
|
/// Restores all settings to defaults.
|
||||||
virtual void SetDefaultSettings(SettingsInterface& si);
|
virtual void SetDefaultSettings(SettingsInterface& si);
|
||||||
|
|
||||||
|
/// Performs the initial load of settings. Should call CheckSettings() and LoadSettings(SettingsInterface&).
|
||||||
|
virtual void LoadSettings() = 0;
|
||||||
|
|
||||||
/// Loads settings to m_settings and any frontend-specific parameters.
|
/// Loads settings to m_settings and any frontend-specific parameters.
|
||||||
virtual void LoadSettings(SettingsInterface& si);
|
virtual void LoadSettings(SettingsInterface& si);
|
||||||
|
|
||||||
|
|
|
@ -524,10 +524,6 @@ void MDEC::CopyOutBlock()
|
||||||
Execute();
|
Execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
static constexpr std::array<u8, 64> zigzag = {{0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42,
|
|
||||||
3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44, 53,
|
|
||||||
10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60,
|
|
||||||
21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49, 57, 58, 62, 63}};
|
|
||||||
static constexpr std::array<u8, 64> zagzig = {{0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5,
|
static constexpr std::array<u8, 64> zagzig = {{0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5,
|
||||||
12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28,
|
12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28,
|
||||||
35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51,
|
35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51,
|
||||||
|
|
|
@ -63,7 +63,9 @@ void MemoryCard::ResetTransferState()
|
||||||
bool MemoryCard::Transfer(const u8 data_in, u8* data_out)
|
bool MemoryCard::Transfer(const u8 data_in, u8* data_out)
|
||||||
{
|
{
|
||||||
bool ack = false;
|
bool ack = false;
|
||||||
|
#ifdef _DEBUG
|
||||||
const State old_state = m_state;
|
const State old_state = m_state;
|
||||||
|
#endif
|
||||||
|
|
||||||
switch (m_state)
|
switch (m_state)
|
||||||
{
|
{
|
||||||
|
|
|
@ -104,7 +104,6 @@ static void MaskValidate(PGXP_value* pV, u32 psxV, u32 mask, u32 validMask);
|
||||||
|
|
||||||
static double f16Sign(double in);
|
static double f16Sign(double in);
|
||||||
static double f16Unsign(double in);
|
static double f16Unsign(double in);
|
||||||
static double fu16Trunc(double in);
|
|
||||||
static double f16Overflow(double in);
|
static double f16Overflow(double in);
|
||||||
|
|
||||||
typedef union
|
typedef union
|
||||||
|
|
|
@ -57,7 +57,7 @@ private:
|
||||||
void InitDiskControlInterface();
|
void InitDiskControlInterface();
|
||||||
void InitRumbleInterface();
|
void InitRumbleInterface();
|
||||||
|
|
||||||
void LoadSettings();
|
void LoadSettings() override;
|
||||||
void UpdateSettings();
|
void UpdateSettings();
|
||||||
void UpdateControllers();
|
void UpdateControllers();
|
||||||
void UpdateControllersDigitalController(u32 index);
|
void UpdateControllersDigitalController(u32 index);
|
||||||
|
|
|
@ -261,9 +261,6 @@ protected:
|
||||||
/// Sets the base path for the user directory. Can be overridden by platform/frontend/command line.
|
/// Sets the base path for the user directory. Can be overridden by platform/frontend/command line.
|
||||||
virtual void SetUserDirectory();
|
virtual void SetUserDirectory();
|
||||||
|
|
||||||
/// Performs the initial load of settings. Should call CheckSettings() and LoadSettings(SettingsInterface&).
|
|
||||||
virtual void LoadSettings() = 0;
|
|
||||||
|
|
||||||
/// Updates logging settings.
|
/// Updates logging settings.
|
||||||
virtual void UpdateLogSettings(LOGLEVEL level, const char* filter, bool log_to_console, bool log_to_debug,
|
virtual void UpdateLogSettings(LOGLEVEL level, const char* filter, bool log_to_console, bool log_to_debug,
|
||||||
bool log_to_window, bool log_to_file);
|
bool log_to_window, bool log_to_file);
|
||||||
|
@ -284,6 +281,7 @@ protected:
|
||||||
virtual void SetDefaultSettings(SettingsInterface& si) override;
|
virtual void SetDefaultSettings(SettingsInterface& si) override;
|
||||||
|
|
||||||
/// Loads settings to m_settings and any frontend-specific parameters.
|
/// Loads settings to m_settings and any frontend-specific parameters.
|
||||||
|
using HostInterface::LoadSettings;
|
||||||
virtual void LoadSettings(SettingsInterface& si) override;
|
virtual void LoadSettings(SettingsInterface& si) override;
|
||||||
|
|
||||||
/// Saves current settings variables to ini.
|
/// Saves current settings variables to ini.
|
||||||
|
|
|
@ -576,7 +576,7 @@ bool VulkanHostDisplay::Render()
|
||||||
|
|
||||||
void VulkanHostDisplay::BeginSwapChainRenderPass(VkFramebuffer framebuffer)
|
void VulkanHostDisplay::BeginSwapChainRenderPass(VkFramebuffer framebuffer)
|
||||||
{
|
{
|
||||||
const VkClearValue clear_value = {};
|
const VkClearValue clear_value = {{{0.0f, 0.0f, 0.0f, 1.0f}}};
|
||||||
const VkRenderPassBeginInfo rp = {VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,
|
const VkRenderPassBeginInfo rp = {VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,
|
||||||
nullptr,
|
nullptr,
|
||||||
m_swap_chain->GetClearRenderPass(),
|
m_swap_chain->GetClearRenderPass(),
|
||||||
|
@ -714,8 +714,8 @@ std::vector<std::string> VulkanHostDisplay::EnumerateAdapterNames()
|
||||||
#ifndef LIBRETRO
|
#ifndef LIBRETRO
|
||||||
|
|
||||||
VulkanHostDisplay::PostProcessingStage::PostProcessingStage(PostProcessingStage&& move)
|
VulkanHostDisplay::PostProcessingStage::PostProcessingStage(PostProcessingStage&& move)
|
||||||
: output_texture(std::move(move.output_texture)), output_framebuffer(move.output_framebuffer),
|
: pipeline(move.pipeline), output_framebuffer(move.output_framebuffer),
|
||||||
pipeline(move.pipeline), uniforms_size(move.uniforms_size)
|
output_texture(std::move(move.output_texture)), uniforms_size(move.uniforms_size)
|
||||||
{
|
{
|
||||||
move.output_framebuffer = VK_NULL_HANDLE;
|
move.output_framebuffer = VK_NULL_HANDLE;
|
||||||
move.pipeline = VK_NULL_HANDLE;
|
move.pipeline = VK_NULL_HANDLE;
|
||||||
|
@ -870,8 +870,6 @@ void VulkanHostDisplay::ApplyPostProcessingChain(s32 final_left, s32 final_top,
|
||||||
s32 texture_view_x, s32 texture_view_y, s32 texture_view_width,
|
s32 texture_view_x, s32 texture_view_y, s32 texture_view_width,
|
||||||
s32 texture_view_height)
|
s32 texture_view_height)
|
||||||
{
|
{
|
||||||
static constexpr std::array<float, 4> clear_color = {0.0f, 0.0f, 0.0f, 1.0f};
|
|
||||||
|
|
||||||
if (!CheckPostProcessingRenderTargets(m_swap_chain->GetWidth(), m_swap_chain->GetHeight()))
|
if (!CheckPostProcessingRenderTargets(m_swap_chain->GetWidth(), m_swap_chain->GetHeight()))
|
||||||
{
|
{
|
||||||
BeginSwapChainRenderPass(m_swap_chain->GetCurrentFramebuffer());
|
BeginSwapChainRenderPass(m_swap_chain->GetCurrentFramebuffer());
|
||||||
|
|
Loading…
Reference in New Issue