Skip to content

Commit

Permalink
[Chores] Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasnoble authored Oct 20, 2024
1 parent 2b94af1 commit 3ada28e
Show file tree
Hide file tree
Showing 72 changed files with 275 additions and 360 deletions.
10 changes: 6 additions & 4 deletions src/cdrom/cdriso.cc
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,12 @@ uint8_t *PCSX::CDRIso::getBuffer() {

void PCSX::CDRIso::printTracks() {
for (int i = 1; i <= m_numtracks; i++) {
PCSX::g_system->printf(
_("Track %.2d (%s) - Start %.2d:%.2d:%.2d, Length %.2d:%.2d:%.2d\n"), i,
(m_ti[i].type == TrackType::DATA ? "DATA" : m_ti[i].cddatype == trackinfo::CCDDA ? "CZDA" : "CDDA"),
m_ti[i].start.m, m_ti[i].start.s, m_ti[i].start.f, m_ti[i].length.m, m_ti[i].length.s, m_ti[i].length.f);
PCSX::g_system->printf(_("Track %.2d (%s) - Start %.2d:%.2d:%.2d, Length %.2d:%.2d:%.2d\n"), i,
(m_ti[i].type == TrackType::DATA ? "DATA"
: m_ti[i].cddatype == trackinfo::CCDDA ? "CZDA"
: "CDDA"),
m_ti[i].start.m, m_ti[i].start.s, m_ti[i].start.f, m_ti[i].length.m, m_ti[i].length.s,
m_ti[i].length.f);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/core/DynaRec_aa64/gte_aa64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

#if defined(DYNAREC_AA64)
#include "core/gte.h"
#define COP2_CONTROL_OFFSET(reg) ((uintptr_t)&m_regs.CP2C.r[(reg)] - (uintptr_t)this)
#define COP2_DATA_OFFSET(reg) ((uintptr_t)&m_regs.CP2D.r[(reg)] - (uintptr_t)this)
#define COP2_CONTROL_OFFSET(reg) ((uintptr_t) & m_regs.CP2C.r[(reg)] - (uintptr_t)this)
#define COP2_DATA_OFFSET(reg) ((uintptr_t) & m_regs.CP2D.r[(reg)] - (uintptr_t)this)

void DynaRecCPU::recCOP2(uint32_t code) {
const auto func = m_recGTE[code & 0x3f]; // Look up the opcode in our decoding LUT
Expand Down
14 changes: 7 additions & 7 deletions src/core/DynaRec_aa64/recompiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
#include "spu/interface.h"
#include "tracy/public/tracy/Tracy.hpp"

#define HOST_REG_CACHE_OFFSET(x) ((uintptr_t)&m_hostRegisterCache[(x)] - (uintptr_t)this)
#define GPR_OFFSET(x) ((uintptr_t)&m_regs.GPR.r[(x)] - (uintptr_t)this)
#define COP0_OFFSET(x) ((uintptr_t)&m_regs.CP0.r[(x)] - (uintptr_t)this)
#define PC_OFFSET ((uintptr_t)&m_regs.pc - (uintptr_t)this)
#define LO_OFFSET ((uintptr_t)&m_regs.GPR.n.lo - (uintptr_t)this)
#define HI_OFFSET ((uintptr_t)&m_regs.GPR.n.hi - (uintptr_t)this)
#define CYCLE_OFFSET ((uintptr_t)&m_regs.cycle - (uintptr_t)this)
#define HOST_REG_CACHE_OFFSET(x) ((uintptr_t) & m_hostRegisterCache[(x)] - (uintptr_t)this)
#define GPR_OFFSET(x) ((uintptr_t) & m_regs.GPR.r[(x)] - (uintptr_t)this)
#define COP0_OFFSET(x) ((uintptr_t) & m_regs.CP0.r[(x)] - (uintptr_t)this)
#define PC_OFFSET ((uintptr_t) & m_regs.pc - (uintptr_t)this)
#define LO_OFFSET ((uintptr_t) & m_regs.GPR.n.lo - (uintptr_t)this)
#define HI_OFFSET ((uintptr_t) & m_regs.GPR.n.hi - (uintptr_t)this)
#define CYCLE_OFFSET ((uintptr_t) & m_regs.cycle - (uintptr_t)this)

#undef _PC_
#undef _Op_
Expand Down
4 changes: 2 additions & 2 deletions src/core/DynaRec_x64/gte_x64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

#if defined(DYNAREC_X86_64)
#include "core/gte.h"
#define COP2_CONTROL_OFFSET(reg) ((uintptr_t)&m_regs.CP2C.r[(reg)] - (uintptr_t)this)
#define COP2_DATA_OFFSET(reg) ((uintptr_t)&m_regs.CP2D.r[(reg)] - (uintptr_t)this)
#define COP2_CONTROL_OFFSET(reg) ((uintptr_t) & m_regs.CP2C.r[(reg)] - (uintptr_t)this)
#define COP2_DATA_OFFSET(reg) ((uintptr_t) & m_regs.CP2D.r[(reg)] - (uintptr_t)this)

void DynaRecCPU::recCOP2(uint32_t code) {
const auto func = m_recGTE[m_regs.code & 0x3F]; // Look up the opcode in our decoding LUT
Expand Down
14 changes: 7 additions & 7 deletions src/core/DynaRec_x64/recompiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
#include "spu/interface.h"
#include "tracy/public/tracy/Tracy.hpp"

#define HOST_REG_CACHE_OFFSET(x) ((uintptr_t)&m_hostRegisterCache[(x)] - (uintptr_t)this)
#define GPR_OFFSET(x) ((uintptr_t)&m_regs.GPR.r[(x)] - (uintptr_t)this)
#define COP0_OFFSET(x) ((uintptr_t)&m_regs.CP0.r[(x)] - (uintptr_t)this)
#define PC_OFFSET ((uintptr_t)&m_regs.pc - (uintptr_t)this)
#define LO_OFFSET ((uintptr_t)&m_regs.GPR.n.lo - (uintptr_t)this)
#define HI_OFFSET ((uintptr_t)&m_regs.GPR.n.hi - (uintptr_t)this)
#define CYCLE_OFFSET ((uintptr_t)&m_regs.cycle - (uintptr_t)this)
#define HOST_REG_CACHE_OFFSET(x) ((uintptr_t) & m_hostRegisterCache[(x)] - (uintptr_t)this)
#define GPR_OFFSET(x) ((uintptr_t) & m_regs.GPR.r[(x)] - (uintptr_t)this)
#define COP0_OFFSET(x) ((uintptr_t) & m_regs.CP0.r[(x)] - (uintptr_t)this)
#define PC_OFFSET ((uintptr_t) & m_regs.pc - (uintptr_t)this)
#define LO_OFFSET ((uintptr_t) & m_regs.GPR.n.lo - (uintptr_t)this)
#define HI_OFFSET ((uintptr_t) & m_regs.GPR.n.hi - (uintptr_t)this)
#define CYCLE_OFFSET ((uintptr_t) & m_regs.cycle - (uintptr_t)this)

#undef _PC_
#undef _Op_
Expand Down
4 changes: 2 additions & 2 deletions src/core/decode_xa.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include "core/decode_xa.h"

//#define FIXED
// #define FIXED

#define NOT(_X_) (!(_X_))
#define XACLAMP(_X_, _MI_, _MA_) \
Expand Down Expand Up @@ -274,7 +274,7 @@ typedef struct {
#define SUB_SUB_VIDEO (1 << 1) // contains video
#define SUB_SUB_EOR (1 << 0) // end of record

#define AUDIO_CODING_GET_STEREO(_X_) ((_X_)&3)
#define AUDIO_CODING_GET_STEREO(_X_) ((_X_) & 3)
#define AUDIO_CODING_GET_FREQ(_X_) (((_X_) >> 2) & 3)
#define AUDIO_CODING_GET_BPS(_X_) (((_X_) >> 4) & 3)
#define AUDIO_CODING_GET_EMPHASIS(_X_) (((_X_) >> 6) & 1)
Expand Down
2 changes: 1 addition & 1 deletion src/core/disr3000a.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const char *PCSX::Disasm::s_disRNameCP0[] = {

#define declare(n) \
void PCSX::Disasm::n(uint32_t code, uint32_t nextCode, uint32_t pc, bool *skipNext, bool *delaySlotNext)
#define _Funct_ ((code)&0x3F) // The funct part of the instruction register
#define _Funct_ ((code) & 0x3F) // The funct part of the instruction register
#define _Rd_ ((code >> 11) & 0x1F) // The rd part of the instruction register
#define _Rt_ ((code >> 16) & 0x1F) // The rt part of the instruction register
#define _Rs_ ((code >> 21) & 0x1F) // The rs part of the instruction register
Expand Down
2 changes: 1 addition & 1 deletion src/core/gte.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#undef NCCS

#define gteoB (PCSX::g_emulator->m_cpu->m_regs.GPR.r[_Rs_] + _Imm_)
#define gteop(instruction) ((instruction)&0x1ffffff)
#define gteop(instruction) ((instruction) & 0x1ffffff)

namespace PCSX {

Expand Down
2 changes: 1 addition & 1 deletion src/core/logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ enum class LogClass : unsigned {
template <LogClass logClass, bool enabled>
struct Logger {
template <typename... Args>
static void Log(const char *format, const Args &... args) {
static void Log(const char *format, const Args &...args) {
if (!enabled) return;
std::string s = fmt::sprintf(format, args...);
g_system->log(logClass, std::move(s));
Expand Down
2 changes: 1 addition & 1 deletion src/core/mdec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ unsigned short *PCSX::MDEC::rl2blk(int *blk, unsigned short *mdec_rl) {
// B = 1.000 * (Y) + 1.765 * (Cb - 128)
#define MULR(a) ((1434 * (a)))
#define MULB(a) ((1807 * (a)))
#define MULG2(a, b) ((-351 * (a)-728 * (b)))
#define MULG2(a, b) ((-351 * (a) - 728 * (b)))
#define MULY(a) ((a) << 10)

#define MAKERGB15(r, g, b, a) (SWAP_LE16(a | ((b) << 10) | ((g) << 5) | (r)))
Expand Down
3 changes: 2 additions & 1 deletion src/core/patchmanager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
***************************************************************************/

#include "core/patchmanager.h"
#include "core/psxmem.h"

#include "core/psxemulator.h"
#include "core/psxmem.h"
#include "core/r3000a.h"

int PCSX::PatchManager::registerPatch(uint32_t address, Patch::Type type) {
Expand Down
1 change: 1 addition & 0 deletions src/core/patchmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#pragma once

#include <stdint.h>

#include <vector>

namespace PCSX {
Expand Down
14 changes: 7 additions & 7 deletions src/core/pgxp_cpu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ PGXP_value* const g_CP0_reg = s_CP0_reg_mem;

// Instruction register decoding
#define op(_instr) (_instr >> 26) // The op part of the instruction register
#define func(_instr) ((_instr)&0x3F) // The funct part of the instruction register
#define func(_instr) ((_instr) & 0x3F) // The funct part of the instruction register
#define sa(_instr) ((_instr >> 6) & 0x1F) // The sa part of the instruction register
#define rd(_instr) ((_instr >> 11) & 0x1F) // The rd part of the instruction register
#define rt(_instr) ((_instr >> 16) & 0x1F) // The rt part of the instruction register
Expand Down Expand Up @@ -427,9 +427,9 @@ void PGXP_CPU_SLT(uint32_t instr, uint32_t rdVal, uint32_t rsVal, uint32_t rtVal
ret.y = 0.f;
ret.compFlags[1] = VALID;

ret.x = (g_CPU_reg[rs(instr)].y < g_CPU_reg[rt(instr)].y)
? 1.f
: (f16Unsign(g_CPU_reg[rs(instr)].x) < f16Unsign(g_CPU_reg[rt(instr)].x)) ? 1.f : 0.f;
ret.x = (g_CPU_reg[rs(instr)].y < g_CPU_reg[rt(instr)].y) ? 1.f
: (f16Unsign(g_CPU_reg[rs(instr)].x) < f16Unsign(g_CPU_reg[rt(instr)].x)) ? 1.f
: 0.f;

ret.value = rdVal;
g_CPU_reg[rd(instr)] = ret;
Expand All @@ -452,9 +452,9 @@ void PGXP_CPU_SLTU(uint32_t instr, uint32_t rdVal, uint32_t rsVal, uint32_t rtVa
ret.y = 0.f;
ret.compFlags[1] = VALID;

ret.x = (f16Unsign(g_CPU_reg[rs(instr)].y) < f16Unsign(g_CPU_reg[rt(instr)].y))
? 1.f
: (f16Unsign(g_CPU_reg[rs(instr)].x) < f16Unsign(g_CPU_reg[rt(instr)].x)) ? 1.f : 0.f;
ret.x = (f16Unsign(g_CPU_reg[rs(instr)].y) < f16Unsign(g_CPU_reg[rt(instr)].y)) ? 1.f
: (f16Unsign(g_CPU_reg[rs(instr)].x) < f16Unsign(g_CPU_reg[rt(instr)].x)) ? 1.f
: 0.f;

ret.value = rdVal;
g_CPU_reg[rd(instr)] = ret;
Expand Down
2 changes: 1 addition & 1 deletion src/core/pgxp_debug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ unsigned int g_pgxp_debug = 0;

// Instruction register decoding
#define op(_instr) (_instr >> 26) // The op part of the instruction register
#define func(_instr) ((_instr)&0x3F) // The funct part of the instruction register
#define func(_instr) ((_instr) & 0x3F) // The funct part of the instruction register
#define sa(_instr) ((_instr >> 6) & 0x1F) // The sa part of the instruction register
#define rd(_instr) ((_instr >> 11) & 0x1F) // The rd part of the instruction register
#define rt(_instr) ((_instr >> 16) & 0x1F) // The rt part of the instruction register
Expand Down
8 changes: 4 additions & 4 deletions src/core/pgxp_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@

#include "psxemulator.h"

//#define PGXP_CPU_DEBUG
//#define PGXP_OUTPUT_ALL
//#define PGXP_FORCE_INPUT_VALUES
//#define PGXP_TEST_OUTPUT_VALUES
// #define PGXP_CPU_DEBUG
// #define PGXP_OUTPUT_ALL
// #define PGXP_FORCE_INPUT_VALUES
// #define PGXP_TEST_OUTPUT_VALUES

#define PGXP_DEBUG_TOLERANCE 2.f

Expand Down
2 changes: 1 addition & 1 deletion src/core/pgxp_gte.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void PGXP_InitGTE() {

// Instruction register decoding
#define op(_instr) (_instr >> 26) // The op part of the instruction register
#define func(_instr) ((_instr)&0x3F) // The funct part of the instruction register
#define func(_instr) ((_instr) & 0x3F) // The funct part of the instruction register
#define sa(_instr) ((_instr >> 6) & 0x1F) // The sa part of the instruction register
#define rd(_instr) ((_instr >> 11) & 0x1F) // The rd part of the instruction register
#define rt(_instr) ((_instr >> 16) & 0x1F) // The rt part of the instruction register
Expand Down
2 changes: 1 addition & 1 deletion src/core/pgxp_value.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ typedef enum { VALID_HALF = (1 << 0) } PGXP_half_flags;

// typedef enum
//{
//#define NONE 0
// #define NONE 0
#define ALL 0xFFFFFFFF
#define VALID 1
#define VALID_0 (VALID << 0)
Expand Down
2 changes: 1 addition & 1 deletion src/core/psxcounters.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "spu/interface.h"

template <typename... Args>
void verboseLog(int32_t level, const char *str, const Args &... args) {
void verboseLog(int32_t level, const char *str, const Args &...args) {
PSXHW_LOG(str, args...);
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/psxemulator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
#include "core/luaiso.h"
#include "core/mdec.h"
#include "core/pad.h"
#include "core/patchmanager.h"
#include "core/pcsxlua.h"
#include "core/pio-cart.h"
#include "core/r3000a.h"
#include "core/sio.h"
#include "core/sio1-server.h"
#include "core/sio1.h"
#include "core/web-server.h"
#include "core/patchmanager.h"
#include "gpu/soft/interface.h"
#include "lua/extra.h"
#include "lua/luafile.h"
Expand Down
6 changes: 2 additions & 4 deletions src/core/psxinterpreter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1584,10 +1584,8 @@ void InterpretedCPU::Execute() {
}
}

void InterpretedCPU::Clear(uint32_t Addr, uint32_t Size)
{
for (auto i = 0; i < Size ; i+=4)
{
void InterpretedCPU::Clear(uint32_t Addr, uint32_t Size) {
for (auto i = 0; i < Size; i += 4) {
flushICacheLine(Addr);
Addr += 16;
}
Expand Down
8 changes: 3 additions & 5 deletions src/core/r3000a.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ struct psxRegisters {
#define _PC_ PCSX::g_emulator->m_cpu->m_regs.pc // The next PC to be executed

#define _fOp_(code) ((code >> 26)) // The opcode part of the instruction register
#define _fFunct_(code) ((code)&0x3F) // The funct part of the instruction register
#define _fFunct_(code) ((code) & 0x3F) // The funct part of the instruction register
#define _fRd_(code) ((code >> 11) & 0x1F) // The rd part of the instruction register
#define _fRt_(code) ((code >> 16) & 0x1F) // The rt part of the instruction register
#define _fRs_(code) ((code >> 21) & 0x1F) // The rs part of the instruction register
Expand Down Expand Up @@ -461,11 +461,9 @@ Formula One 2001
memset(m_regs.iCacheCode, 0xff, sizeof(m_regs.iCacheCode));
}

inline void flushICacheLine(uint32_t pc)
{
inline void flushICacheLine(uint32_t pc) {
uint32_t pcBank = pc >> 24;
if (pcBank == 0x00 || pcBank == 0x80)
{
if (pcBank == 0x00 || pcBank == 0x80) {
uint32_t pcCache = pc & 0xfff;
pcCache &= ~0xf;

Expand Down
14 changes: 8 additions & 6 deletions src/core/web-server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,8 @@ class StateExecutor : public PCSX::WebExecutor {
message =
fmt::format("HTTP/1.1 200 OK\r\n\r\nState slot index {} {} successful.", slot, path);
} else {
message = fmt::format("HTTP/1.1 500 Internal Server Error\r\n\r\nState slot index {} {} failed.",
slot, path);
message = fmt::format(
"HTTP/1.1 500 Internal Server Error\r\n\r\nState slot index {} {} failed.", slot, path);
}
}
client->write(std::move(message));
Expand Down Expand Up @@ -634,8 +634,9 @@ class StateExecutor : public PCSX::WebExecutor {
message =
fmt::format("HTTP/1.1 200 OK\r\n\r\nState slot name \"{}\" {} successful.", name, path);
} else {
message = fmt::format("HTTP/1.1 500 Internal Server Error\r\n\r\nState slot name \"{}\" {} failed.",
name, path);
message = fmt::format(
"HTTP/1.1 500 Internal Server Error\r\n\r\nState slot name \"{}\" {} failed.", name,
path);
}
}
client->write(std::move(message));
Expand Down Expand Up @@ -683,8 +684,9 @@ class ScreenExecutor : public PCSX::WebExecutor {
message =
fmt::format("HTTP/1.1 200 OK\r\n\r\nScreenshot saved successfully to \"{}\".", path.string());
} else {
message = fmt::format("HTTP/1.1 500 Internal Server Error\r\n\r\nFailed to save screenshot to \"{}\".",
path.string());
message =
fmt::format("HTTP/1.1 500 Internal Server Error\r\n\r\nFailed to save screenshot to \"{}\".",
path.string());
}
client->write(std::move(message));
return true;
Expand Down
18 changes: 9 additions & 9 deletions src/gui/gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,15 @@ class GUI final : public UI {
Settings<Fullscreen, FullWindowRender, ShowMenu, ShowLog, WindowPosX, WindowPosY, WindowSizeX, WindowSizeY,
IdleSwapInterval, ShowLuaConsole, ShowLuaInspector, ShowLuaEditor, ShowMainVRAMViewer, ShowCLUTVRAMViewer,
ShowVRAMViewer1, ShowVRAMViewer2, ShowVRAMViewer3, ShowVRAMViewer4, ShowMemoryObserver, ShowTypedDebugger,
ShowPatches, ShowMemcardManager, ShowRegisters, ShowAssembly, ShowDisassembly, ShowBreakpoints, ShowNamedSaveStates,
ShowEvents, ShowHandlers, ShowKernelLog, ShowCallstacks, ShowSIO1, ShowIsoBrowser, ShowGPULogger,
MainFontSize, MonoFontSize, GUITheme, AllowMouseCaptureToggle, EnableRawMouseMotion, WidescreenRatio,
ShowPIOCartConfig, ShowMemoryEditor1, ShowMemoryEditor2, ShowMemoryEditor3, ShowMemoryEditor4,
ShowMemoryEditor5, ShowMemoryEditor6, ShowMemoryEditor7, ShowMemoryEditor8, ShowParallelPortEditor,
ShowScratchpadEditor, ShowHWRegsEditor, ShowBiosEditor, ShowVRAMEditor, MemoryEditor1Addr,
MemoryEditor2Addr, MemoryEditor3Addr, MemoryEditor4Addr, MemoryEditor5Addr, MemoryEditor6Addr,
MemoryEditor7Addr, MemoryEditor8Addr, ParallelPortEditorAddr, ScratchpadEditorAddr, HWRegsEditorAddr,
BiosEditorAddr, VRAMEditorAddr>
ShowPatches, ShowMemcardManager, ShowRegisters, ShowAssembly, ShowDisassembly, ShowBreakpoints,
ShowNamedSaveStates, ShowEvents, ShowHandlers, ShowKernelLog, ShowCallstacks, ShowSIO1, ShowIsoBrowser,
ShowGPULogger, MainFontSize, MonoFontSize, GUITheme, AllowMouseCaptureToggle, EnableRawMouseMotion,
WidescreenRatio, ShowPIOCartConfig, ShowMemoryEditor1, ShowMemoryEditor2, ShowMemoryEditor3,
ShowMemoryEditor4, ShowMemoryEditor5, ShowMemoryEditor6, ShowMemoryEditor7, ShowMemoryEditor8,
ShowParallelPortEditor, ShowScratchpadEditor, ShowHWRegsEditor, ShowBiosEditor, ShowVRAMEditor,
MemoryEditor1Addr, MemoryEditor2Addr, MemoryEditor3Addr, MemoryEditor4Addr, MemoryEditor5Addr,
MemoryEditor6Addr, MemoryEditor7Addr, MemoryEditor8Addr, ParallelPortEditorAddr, ScratchpadEditorAddr,
HWRegsEditorAddr, BiosEditorAddr, VRAMEditorAddr>
settings;

// imgui can't handle more than one "instance", so...
Expand Down
3 changes: 1 addition & 2 deletions src/gui/widgets/assembly.cc
Original file line number Diff line number Diff line change
Expand Up @@ -638,8 +638,7 @@ settings, otherwise debugging features may not work.)");
};
if (clipper.DisplayStart != 0) {
uint32_t addr = clipper.DisplayStart * 4 - 4;
process(
addr, [](uint32_t, const char*, uint32_t, uint32_t, uint32_t) {}, &dummy);
process(addr, [](uint32_t, const char*, uint32_t, uint32_t, uint32_t) {}, &dummy);
}
auto& tree = g_emulator->m_debug->getTree();
for (int x = clipper.DisplayStart; x < clipper.DisplayEnd; x++) {
Expand Down
6 changes: 3 additions & 3 deletions src/gui/widgets/memory_observer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,9 @@ void PCSX::Widgets::MemoryObserver::draw(const char* title) {
ImGui::TableHeadersRow();

bool as_uint = (m_scanValueType == ScanValueType::Uint);
const auto valueDisplayFormat =
m_hex ? "%x"
: (m_fixedPoint && stride > 1) ? (as_uint ? "%u.%u" : "%i.%i") : (as_uint ? "%u" : "%i");
const auto valueDisplayFormat = m_hex ? "%x"
: (m_fixedPoint && stride > 1) ? (as_uint ? "%u.%u" : "%i.%i")
: (as_uint ? "%u" : "%i");

ImGuiListClipper clipper;
clipper.Begin(m_addressValuePairs.size());
Expand Down
Loading

0 comments on commit 3ada28e

Please sign in to comment.