Skip to content

Commit

Permalink
Merge pull request #19038 from GermanAizek/all-fields-init-refactor
Browse files Browse the repository at this point in the history
[Core/GL/UI] Not all fields initilize and minor code refactor
  • Loading branch information
hrydgard committed May 12, 2024
2 parents 2fdd893 + 0d1f7e2 commit 9dc8c05
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 20 deletions.
10 changes: 5 additions & 5 deletions Common/FakeEmitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,26 +145,26 @@ class Operand2
return Type;
}
Operand2() {}
Operand2(u32 imm, OpType type = TYPE_IMM)
Operand2(u32 imm, OpType type = TYPE_IMM) : IndexOrShift(), Shift()
{
Type = type;
Value = imm;
Rotation = 0;
}

Operand2(FakeReg Reg)
Operand2(FakeReg Reg) : IndexOrShift(), Shift()
{
Type = TYPE_REG;
Value = Reg;
Rotation = 0;
}
Operand2(u8 imm, u8 rotation)
Operand2(u8 imm, u8 rotation) : IndexOrShift(), Shift()
{
Type = TYPE_IMM;
Value = imm;
Rotation = rotation;
}
Operand2(FakeReg base, ShiftType type, FakeReg shift) // RSR
Operand2(FakeReg base, ShiftType type, FakeReg shift) : Rotation(0) // RSR
{
Type = TYPE_RSR;
_assert_msg_(type != ST_RRX, "Invalid Operand2: RRX does not take a register shift amount");
Expand All @@ -173,7 +173,7 @@ class Operand2
Value = base;
}

Operand2(FakeReg base, ShiftType type, u8 shift)// For IMM shifted register
Operand2(FakeReg base, ShiftType type, u8 shift) : Rotation(0) // For IMM shifted register
{
if(shift == 32) shift = 0;
switch (type)
Expand Down
2 changes: 1 addition & 1 deletion Common/GPU/OpenGL/GLQueueRunner.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ enum GLRAspect {
const char *GLRAspectToString(GLRAspect aspect);

struct GLRStep {
GLRStep(GLRStepType _type) : stepType(_type) {}
GLRStep(GLRStepType _type) : stepType(_type), tag() {}
GLRStepType stepType;
FastVec<GLRRenderData> commands;
TinySet<const GLRFramebuffer *, 8> dependencies;
Expand Down
2 changes: 1 addition & 1 deletion Core/MIPS/fake/FakeJit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void DisassembleFake(const u8 *data, int size) {
namespace MIPSComp
{

FakeJit::FakeJit(MIPSState *mipsState) : blocks(mipsState, this), mips_(mipsState)
FakeJit::FakeJit(MIPSState *mipsState) : blocks(mipsState, this), mips_(mipsState), js()
{
logBlocks = 0;
dontLogBlocks = 0;
Expand Down
12 changes: 9 additions & 3 deletions Core/Util/DisArm64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -749,15 +749,21 @@ static void FPandASIMD1(uint32_t w, uint64_t addr, Instruction *instr) {
int dst_index = imm5 >> (size + 1);
int src_index = imm4 >> size;
int op = (w >> 29) & 1;
char s = "bhsd"[size];
char s;
switch (size) {
case 0x00: s = 'b'; break;
case 0x01: s = 'h'; break;
case 0x02: s = 's'; break;
case 0x03: s = 'd'; break;
}
if (op == 0 && imm4 == 0) {
// DUP (element)
int idxdsize = (imm5 & 8) ? 128 : 64;
char r = "dq"[idxdsize == 128];
char r = (idxdsize == 128) ? 'q' : 'd';
snprintf(instr->text, sizeof(instr->text), "dup %c%d, %c%d.%c[%d]", r, Rd, r, Rn, s, dst_index);
} else {
int idxdsize = (imm4 & 8) ? 128 : 64;
char r = "dq"[idxdsize == 128];
char r = (idxdsize == 128) ? 'q' : 'd';
snprintf(instr->text, sizeof(instr->text), "ins %c%d.%c[%d], %c%d.%c[%d]", r, Rd, s, dst_index, r, Rn, s, src_index);
}
}
Expand Down
19 changes: 10 additions & 9 deletions UI/ControlMappingScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,16 @@ void SingleControlMapper::Refresh() {
Clear();
auto mc = GetI18NCategory(I18NCat::MAPPABLECONTROLS);

std::map<std::string, ImageID> keyImages;
keyImages["Circle"] = ImageID("I_CIRCLE");
keyImages["Cross"] = ImageID("I_CROSS");
keyImages["Square"] = ImageID("I_SQUARE");
keyImages["Triangle"] = ImageID("I_TRIANGLE");
keyImages["Start"] = ImageID("I_START");
keyImages["Select"] = ImageID("I_SELECT");
keyImages["L"] = ImageID("I_L");
keyImages["R"] = ImageID("I_R");
std::map<std::string, ImageID> keyImages = {
{ "Circle", ImageID("I_CIRCLE") },
{ "Cross", ImageID("I_CROSS") },
{ "Square", ImageID("I_SQUARE") },
{ "Triangle", ImageID("I_TRIANGLE") },
{ "Start", ImageID("I_START") },
{ "Select", ImageID("I_SELECT") },
{ "L", ImageID("I_L") },
{ "R", ImageID("I_R") }
};

using namespace UI;

Expand Down
2 changes: 1 addition & 1 deletion UI/MemStickScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ void MemStickScreen::update() {
}

ConfirmMemstickMoveScreen::ConfirmMemstickMoveScreen(Path newMemstickFolder, bool initialSetup)
: newMemstickFolder_(newMemstickFolder), initialSetup_(initialSetup) {
: newMemstickFolder_(newMemstickFolder), initialSetup_(initialSetup), progressReporter_() {
existingFilesInNewFolder_ = FolderSeemsToBeUsed(newMemstickFolder);
if (initialSetup_) {
moveData_ = false;
Expand Down

0 comments on commit 9dc8c05

Please sign in to comment.