Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Don't Merge, Meta one] Cleanup warnings #8684

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions Source/Core/Common/ChunkFile.h
Expand Up @@ -312,6 +312,7 @@ class PointerWrap
break;

case MODE_WRITE:
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not work on Windows and doesn't actually resolve the warning.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. In order to clean up this, it may require significant rewrite of this file.

memcpy(*ptr, data, size);
break;

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Common/GL/GLContext.cpp
Expand Up @@ -95,9 +95,9 @@ std::unique_ptr<GLContext> GLContext::Create(const WindowSystemInfo& wsi, bool s
#if HAVE_X11
if (wsi.type == WindowSystemType::X11)
{
#if defined(HAVE_EGL)
// GLES 3 is not supported via GLX.
const bool use_egl = prefer_egl || prefer_gles;
#if defined(HAVE_EGL)
if (use_egl)
context = std::make_unique<GLContextEGLX11>();
else
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/HW/EXI/BBA-TAP/TAP_Unix.cpp
Expand Up @@ -50,7 +50,7 @@ bool CEXIETHERNET::Activate()
const int MAX_INTERFACES = 32;
for (int i = 0; i < MAX_INTERFACES; ++i)
{
strncpy(ifr.ifr_name, StringFromFormat("Dolphin%d", i).c_str(), IFNAMSIZ);
strncpy(ifr.ifr_name, StringFromFormat("Dolphin%d", i).c_str(), IFNAMSIZ - 1);

int err;
if ((err = ioctl(fd, TUNSETIFF, (void*)&ifr)) < 0)
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/HW/EXI/EXI_DeviceIPL.cpp
Expand Up @@ -291,7 +291,7 @@ void CEXIIPL::TransferByte(u8& data)
DEBUG_LOG(EXPANSIONINTERFACE, "IPL-DEV data %s %08x %02x",
m_command.is_write() ? "write" : "read", address, data);

#define IN_RANGE(x) (address >= x##_BASE && address < x##_BASE + x##_SIZE)
#define IN_RANGE(x) (address < x##_BASE + x##_SIZE)
#define DEV_ADDR(x) (address - x##_BASE)
#define DEV_ADDR_CURSOR(x) (DEV_ADDR(x) + m_cursor++)

Expand Down
4 changes: 3 additions & 1 deletion Source/Core/Core/HW/GCMemcard/GCMemcard.cpp
Expand Up @@ -928,7 +928,7 @@ GCMemcardRemoveFileRetVal GCMemcard::RemoveFile(u8 index) // index in the direc
// here that has an empty file with the filename "Broken File000" where the actual deleted file
// was. Determine when exactly this happens and if this is neccessary for anything.

memset(&(UpdatedDir.m_dir_entries[index]), 0xFF, DENTRY_SIZE);
memset(static_cast<void*>(&(UpdatedDir.m_dir_entries[index])), 0xFF, DENTRY_SIZE);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably not actually be silenced like this and instead have the initializtion and/or invalidation be done properly within a member function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I appreciate the gusto on trying to clean up some of these warnings, some of these changes seem to just silence warnings rather than properly fixing the underlying cause of said warnings. Particularly with ones that cast the destination type in memset calls to void*.

The commit messages also don't state what warnings were actually being resolved within them.

Your comments are fair. Let me split the patch and fix some places as you suggested.

UpdatedDir.m_update_counter = UpdatedDir.m_update_counter + 1;
UpdateDirectory(UpdatedDir);

Expand Down Expand Up @@ -1108,6 +1108,8 @@ GCMemcardExportFileRetVal GCMemcard::ExportGci(u8 index, const std::string& file
return GCMemcardExportFileRetVal::FAIL;
case GCMemcardGetSaveDataRetVal::NOMEMCARD:
return GCMemcardExportFileRetVal::NOMEMCARD;
case GCMemcardGetSaveDataRetVal::SUCCESS:
break;
}
gci.Seek(DENTRY_SIZE + offset, SEEK_SET);
for (unsigned int i = 0; i < size; ++i)
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Core/HW/SI/SI_DeviceGCSteeringWheel.cpp
Expand Up @@ -38,9 +38,9 @@ int CSIDevice_GCSteeringWheel::RunBuffer(u8* buffer, int request_length)
std::memcpy(buffer, &id, sizeof(id));
return sizeof(id);
}
default:
return CSIDevice_GCController::RunBuffer(buffer, request_length);
}

return CSIDevice_GCController::RunBuffer(buffer, request_length);
}

bool CSIDevice_GCSteeringWheel::GetData(u32& hi, u32& low)
Expand Down
12 changes: 6 additions & 6 deletions Source/Core/Core/HW/WiimoteEmu/Encryption.cpp
Expand Up @@ -478,12 +478,12 @@ EncryptionKey::KeyData KeyGen3rdParty::GenerateKeyData(const EncryptionKey::Rand
auto& rol8 = Common::RotateLeft<u8>;

return {
u8(t0[7] ^ t0[6] + rol8(ans[0] ^ t0[0], t0[1])),
u8(t0[1] ^ t0[3] + rol8(ans[1] ^ t0[4], t0[2])),
u8(t0[5] ^ t0[4] + rol8(ans[2] ^ t0[2], t0[8])),
u8(t0[0] ^ t0[7] + rol8(ans[3] ^ t0[6], t0[9])),
u8(t0[1] ^ t0[8] + rol8(ans[4] ^ t0[5], t0[4])),
u8(t0[5] ^ t0[8] + rol8(ans[5] ^ t0[9], t0[3])),
u8((t0[7] ^ t0[6]) + rol8(ans[0] ^ t0[0], t0[1])),
u8((t0[1] ^ t0[3]) + rol8(ans[1] ^ t0[4], t0[2])),
u8((t0[5] ^ t0[4]) + rol8(ans[2] ^ t0[2], t0[8])),
u8((t0[0] ^ t0[7]) + rol8(ans[3] ^ t0[6], t0[9])),
u8((t0[1] ^ t0[8]) + rol8(ans[4] ^ t0[5], t0[4])),
u8((t0[5] ^ t0[8]) + rol8(ans[5] ^ t0[9], t0[3])),
};
}

Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Core/IOS/IOSC.cpp
Expand Up @@ -420,9 +420,9 @@ static CertECC MakeBlankEccCert(const std::string& issuer, const std::string& na
{
CertECC cert{};
cert.signature.type = SignatureType(Common::swap32(u32(SignatureType::ECC)));
std::strncpy(cert.signature.issuer, issuer.c_str(), 0x40);
std::strncpy(cert.signature.issuer, issuer.c_str(), 0x40 - 1);
cert.header.public_key_type = PublicKeyType(Common::swap32(u32(PublicKeyType::ECC)));
std::strncpy(cert.header.name, name.c_str(), 0x40);
std::strncpy(cert.header.name, name.c_str(), 0x40 - 1);
cert.header.id = Common::swap32(key_id);
cert.public_key = Common::ec::PrivToPub(private_key);
return cert;
Expand Down
6 changes: 3 additions & 3 deletions Source/Core/Core/PowerPC/Jit64/JitAsm.cpp
Expand Up @@ -138,18 +138,18 @@ void Jit64AsmRoutineManager::Generate()
SHL(64, R(RSCRATCH2), Imm8(32));
// RSCRATCH_EXTRA still has the PC.
OR(64, R(RSCRATCH2), R(RSCRATCH_EXTRA));
CMP(64, R(RSCRATCH2), MDisp(RSCRATCH, static_cast<s32>(offsetof(JitBlock, effectiveAddress))));
CMP(64, R(RSCRATCH2), MDisp(RSCRATCH, static_cast<s32>(offsetof(JitBlockData, effectiveAddress))));
FixupBranch state_mismatch = J_CC(CC_NE);

// Success; branch to the block we found.
// Switch to the correct memory base, in case MSR.DR has changed.
TEST(32, PPCSTATE(msr), Imm32(1 << (31 - 27)));
FixupBranch physmem = J_CC(CC_Z);
MOV(64, R(RMEM), ImmPtr(Memory::logical_base));
JMPptr(MDisp(RSCRATCH, static_cast<s32>(offsetof(JitBlock, normalEntry))));
JMPptr(MDisp(RSCRATCH, static_cast<s32>(offsetof(JitBlockData, normalEntry))));
SetJumpTarget(physmem);
MOV(64, R(RMEM), ImmPtr(Memory::physical_base));
JMPptr(MDisp(RSCRATCH, static_cast<s32>(offsetof(JitBlock, normalEntry))));
JMPptr(MDisp(RSCRATCH, static_cast<s32>(offsetof(JitBlockData, normalEntry))));

SetJumpTarget(not_found);
SetJumpTarget(state_mismatch);
Expand Down
30 changes: 16 additions & 14 deletions Source/Core/Core/PowerPC/JitCommon/JitCache.h
Expand Up @@ -17,17 +17,8 @@

class JitBase;

// A JitBlock is block of compiled code which corresponds to the PowerPC
// code at a given address.
//
// The notion of the address of a block is a bit complicated because of the
// way address translation works, but basically it's the combination of an
// effective address, the address translation bits in MSR, and the physical
// address.
struct JitBlock
struct JitBlockData
{
bool OverlapsPhysicalRange(u32 address, u32 length) const;

// A special entry point for block linking; usually used to check the
// downcount.
u8* checkedEntry;
Expand All @@ -49,6 +40,21 @@ struct JitBlock
// The number of PPC instructions represented by this block. Mostly
// useful for logging.
u32 originalSize;
// This tracks the position if this block within the fast block cache.
// We allow each block to have only one map entry.
size_t fast_block_map_index;
};

// A JitBlock is block of compiled code which corresponds to the PowerPC
// code at a given address.
//
// The notion of the address of a block is a bit complicated because of the
// way address translation works, but basically it's the combination of an
// effective address, the address translation bits in MSR, and the physical
// address.
struct JitBlock : public JitBlockData
{
bool OverlapsPhysicalRange(u32 address, u32 length) const;

// Information about exits to a known address from this block.
// This is used to implement block linking.
Expand All @@ -73,10 +79,6 @@ struct JitBlock
u64 ticStart;
u64 ticStop;
} profile_data = {};

// This tracks the position if this block within the fast block cache.
// We allow each block to have only one map entry.
size_t fast_block_map_index;
};

typedef void (*CompiledCode)();
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/State.cpp
Expand Up @@ -342,7 +342,7 @@ static void CompressAndDumpState(CompressAndDumpState_args save_args)

// Setting up the header
StateHeader header;
strncpy(header.gameID, SConfig::GetInstance().GetGameID().c_str(), 6);
memcpy(header.gameID, SConfig::GetInstance().GetGameID().c_str(), 6);
howard0su marked this conversation as resolved.
Show resolved Hide resolved
header.size = g_use_compression ? (u32)buffer_size : 0;
header.time = Common::Timer::GetDoubleTime();

Expand Down
8 changes: 4 additions & 4 deletions Source/Core/DiscIO/DiscExtractor.cpp
Expand Up @@ -266,7 +266,7 @@ std::optional<u64> GetBootDOLOffset(const Volume& volume, const Partition& parti
{
const Platform volume_type = volume.GetVolumeType();
if (!IsDisc(volume_type))
return {};
return std::nullopt;

std::optional<u64> dol_offset = volume.ReadSwappedAndShifted(0x420, partition);

Expand All @@ -280,7 +280,7 @@ std::optional<u64> GetBootDOLOffset(const Volume& volume, const Partition& parti
std::optional<u32> GetBootDOLSize(const Volume& volume, const Partition& partition, u64 dol_offset)
{
if (!IsDisc(volume.GetVolumeType()))
return {};
return std::nullopt;

u32 dol_size = 0;

Expand Down Expand Up @@ -326,7 +326,7 @@ std::optional<u64> GetFSTOffset(const Volume& volume, const Partition& partition
{
const Platform volume_type = volume.GetVolumeType();
if (!IsDisc(volume_type))
return {};
return std::nullopt;

return volume.ReadSwappedAndShifted(0x424, partition);
}
Expand All @@ -335,7 +335,7 @@ std::optional<u64> GetFSTSize(const Volume& volume, const Partition& partition)
{
const Platform volume_type = volume.GetVolumeType();
if (!IsDisc(volume_type))
return {};
return std::nullopt;

return volume.ReadSwappedAndShifted(0x428, partition);
}
Expand Down
4 changes: 1 addition & 3 deletions Source/Core/DolphinQt/GCMemcardManager.cpp
Expand Up @@ -230,8 +230,6 @@ void GCMemcardManager::UpdateSlotTable(int slot)
auto* icon = new QTableWidgetItem;
icon->setData(Qt::DecorationRole, icon_data.m_frames[0]);

std::optional<DEntry> entry = memcard->GetDEntry(file_index);

m_slot_active_icons[slot].emplace_back(std::move(icon_data));

table->setItem(i, 0, banner);
Expand Down Expand Up @@ -531,7 +529,7 @@ GCMemcardManager::IconAnimationData GCMemcardManager::GetIconFromSaveFile(int fi
if (decoded_data && !decoded_data->empty())
{
frame_data.m_frames.reserve(decoded_data->size());
const u32 per_frame_offset = MEMORY_CARD_ICON_WIDTH * MEMORY_CARD_ICON_HEIGHT;

for (size_t f = 0; f < decoded_data->size(); ++f)
{
QImage img(reinterpret_cast<const u8*>((*decoded_data)[f].image_data.data()),
Expand Down
4 changes: 4 additions & 0 deletions Source/Core/DolphinQt/GameList/GameList.cpp
Expand Up @@ -727,6 +727,7 @@ void GameList::OpenGCSaveFolder()
break;
}
case ExpansionInterface::EXIDEVICE_MEMORYCARD:
{
std::string memcard_path = i == 0 ? Config::Get(Config::MAIN_MEMCARD_A_PATH) :
Config::Get(Config::MAIN_MEMCARD_B_PATH);

Expand All @@ -736,6 +737,9 @@ void GameList::OpenGCSaveFolder()
url = QUrl::fromLocalFile(QString::fromStdString(memcard_dir));
break;
}
default:
break;
}

found |= !url.isEmpty();

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/DolphinQt/Settings/AdvancedPane.cpp
Expand Up @@ -177,7 +177,7 @@ void AdvancedPane::Update()
const bool enable_custom_rtc_widgets = SConfig::GetInstance().bEnableCustomRTC && !running;

const std::vector<PowerPC::CPUCore>& available_cpu_cores = PowerPC::AvailableCPUCores();
for (int i = 0; i < available_cpu_cores.size(); ++i)
for (size_t i = 0; i < available_cpu_cores.size(); ++i)
{
if (available_cpu_cores[i] == SConfig::GetInstance().cpu_core)
m_cpu_emulation_engine_combobox->setCurrentIndex(i);
Expand Down
Expand Up @@ -344,7 +344,7 @@ class LiteralReal : public LiteralExpression
const ControlState m_value{};
};

ParseResult MakeLiteralExpression(Token token)
static ParseResult MakeLiteralExpression(Token token)
{
ControlState val{};
if (TryParse(token.data, &val))
Expand Down
Expand Up @@ -56,14 +56,14 @@ ControlState AnalogStick::GetGateRadiusAtAngle(double ang) const
return m_stick_gate->GetRadiusAtAngle(ang);
}

OctagonAnalogStick::OctagonAnalogStick(const char* name, ControlState gate_radius)
: OctagonAnalogStick(name, name, gate_radius)
OctagonAnalogStick::OctagonAnalogStick(const char* _name, ControlState _gate_radius)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We prefer to prefix names with the underscore after the identifier like so: name_

Ditto for all other occurrences

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use this style because in ControlGroup subfolder, there is exiting code like this. If you prefer other way, I can submit a seperate patch to cleanup them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you have to change this anyways? Members should have the m_ prefix already and not cause any shadowing with the parameters.
In case I did miss some, use a suffix as lioncash suggested.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure. I can make a big change to add a prefix m_ to the fields in the class of ControlGroup

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't. I only see name being used there, so I don't quite see the need to rename the others (like gate_radius) though?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so only change name and ui_name here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the ones necessary to resolve the shadowing.

: OctagonAnalogStick(_name, _name, _gate_radius)
{
}

OctagonAnalogStick::OctagonAnalogStick(const char* name, const char* ui_name,
ControlState gate_radius)
: AnalogStick(name, ui_name, std::make_unique<ControllerEmu::OctagonStickGate>(gate_radius))
OctagonAnalogStick::OctagonAnalogStick(const char* _name, const char* _ui_name,
ControlState _gate_radius)
: AnalogStick(_name, _ui_name, std::make_unique<ControllerEmu::OctagonStickGate>(_gate_radius))
{
}

Expand Down
4 changes: 2 additions & 2 deletions Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.cpp
Expand Up @@ -21,8 +21,8 @@

namespace ControllerEmu
{
Cursor::Cursor(std::string name, std::string ui_name)
: ReshapableInput(std::move(name), std::move(ui_name), GroupType::Cursor),
Cursor::Cursor(std::string _name, std::string _ui_name)
: ReshapableInput(std::move(_name), std::move(_ui_name), GroupType::Cursor),
m_last_update(Clock::now())
{
for (auto& named_direction : named_directions)
Expand Down
Expand Up @@ -14,8 +14,8 @@

namespace ControllerEmu
{
IMUAccelerometer::IMUAccelerometer(std::string name, std::string ui_name)
: ControlGroup(std::move(name), std::move(ui_name), GroupType::IMUAccelerometer)
IMUAccelerometer::IMUAccelerometer(std::string _name, std::string _ui_name)
: ControlGroup(std::move(_name), std::move(_ui_name), GroupType::IMUAccelerometer)
{
AddInput(Translate, _trans("Up"));
AddInput(Translate, _trans("Down"));
Expand Down
Expand Up @@ -16,8 +16,8 @@

namespace ControllerEmu
{
IMUCursor::IMUCursor(std::string name, std::string ui_name)
: ControlGroup(std::move(name), std::move(ui_name), GroupType::IMUCursor,
IMUCursor::IMUCursor(std::string _name, std::string _ui_name)
: ControlGroup(std::move(_name), std::move(_ui_name), GroupType::IMUCursor,
ControlGroup::CanBeDisabled::Yes)
{
AddInput(Translate, _trans("Recenter"));
Expand Down
Expand Up @@ -24,8 +24,8 @@ static constexpr auto MAXIMUM_CALIBRATION_DURATION = std::chrono::hours(1);
// This is made slightly lower than the UI update frequency of 30.
static constexpr auto WORST_ACCEPTABLE_CALIBRATION_UPDATE_FREQUENCY = 25;

IMUGyroscope::IMUGyroscope(std::string name, std::string ui_name)
: ControlGroup(std::move(name), std::move(ui_name), GroupType::IMUGyroscope)
IMUGyroscope::IMUGyroscope(std::string _name, std::string _ui_name)
: ControlGroup(std::move(_name), std::move(_ui_name), GroupType::IMUGyroscope)
{
AddInput(Translate, _trans("Pitch Up"));
AddInput(Translate, _trans("Pitch Down"));
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/InputCommon/ControllerEmu/StickGate.cpp
Expand Up @@ -109,8 +109,8 @@ std::optional<u32> SquareStickGate::GetIdealCalibrationSampleCount() const
return 8;
}

ReshapableInput::ReshapableInput(std::string name, std::string ui_name, GroupType type)
: ControlGroup(std::move(name), std::move(ui_name), type)
ReshapableInput::ReshapableInput(std::string _name, std::string _ui_name, GroupType _type)
: ControlGroup(std::move(_name), std::move(_ui_name), _type)
{
AddDeadzoneSetting(&m_deadzone_setting, 50);
}
Expand Down
2 changes: 0 additions & 2 deletions Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.cpp
Expand Up @@ -131,8 +131,6 @@ void KeyboardMouse::SelectEventsForDevice(Window window, XIEventMask* mask, int
KeyboardMouse::KeyboardMouse(Window window, int opcode, int pointer, int keyboard)
: m_window(window), xi_opcode(opcode), pointer_deviceid(pointer), keyboard_deviceid(keyboard)
{
memset(&m_state, 0, sizeof(m_state));
howard0su marked this conversation as resolved.
Show resolved Hide resolved

// The cool thing about each KeyboardMouse object having its own Display
// is that each one gets its own separate copy of the X11 event stream,
// which it can individually filter to get just the events it's interested
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h
Expand Up @@ -105,7 +105,7 @@ class KeyboardMouse : public Core::Device
private:
Window m_window;
Display* m_display;
State m_state;
State m_state{};
int xi_opcode;
const int pointer_deviceid, keyboard_deviceid;
std::string name;
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp
Expand Up @@ -204,7 +204,7 @@ static int s_wakeup_eventfd;
// sysfs is not stable, so this is probably the easiest way to get a name for a node.
static std::map<std::string, std::weak_ptr<evdevDevice>> s_devnode_objects;

std::shared_ptr<evdevDevice> FindDeviceWithUniqueID(const char* unique_id)
static std::shared_ptr<evdevDevice> FindDeviceWithUniqueID(const char* unique_id)
{
if (!unique_id)
return nullptr;
Expand All @@ -223,7 +223,7 @@ std::shared_ptr<evdevDevice> FindDeviceWithUniqueID(const char* unique_id)
return nullptr;
}

void AddDeviceNode(const char* devnode)
static void AddDeviceNode(const char* devnode)
{
// Unfortunately udev gives us no way to filter out the non event device interfaces.
// So we open it and see if it works with evdev ioctls or not.
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/VideoBackends/Software/DebugUtil.cpp
Expand Up @@ -136,9 +136,9 @@ static void DumpEfb(const std::string& filename)
u8* data = new u8[EFB_WIDTH * EFB_HEIGHT * 4];
u8* writePtr = data;

for (int y = 0; y < EFB_HEIGHT; y++)
for (u32 y = 0; y < EFB_HEIGHT; y++)
{
for (int x = 0; x < EFB_WIDTH; x++)
for (u32 x = 0; x < EFB_WIDTH; x++)
{
// ABGR to RGBA
const u32 sample = Common::swap32(EfbInterface::GetColor(x, y));
Expand Down