[Core/GL/UI] Not all fields initilize and minor code refactor

This commit is contained in:
Herman Semenov 2024-04-11 15:50:42 +03:00
parent 22fdf6624c
commit 0d1f7e2e6c
6 changed files with 27 additions and 20 deletions

View File

@ -145,26 +145,26 @@ public:
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");
@ -173,7 +173,7 @@ public:
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)

View File

@ -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;

View File

@ -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;

View File

@ -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);
}
}

View File

@ -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;

View File

@ -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;