reformat all files with clang-format

This commit is contained in:
wwylele 2018-06-29 16:56:12 +03:00
parent 7c5a76e58b
commit 0eab948728
79 changed files with 659 additions and 707 deletions

View File

@ -177,8 +177,7 @@ void DspHle::Impl::PipeWrite(DspPipe pipe_number, const std::vector<u8>& buffer)
return;
}
default:
LOG_CRITICAL(Audio_DSP, "pipe_number = {} unimplemented",
static_cast<size_t>(pipe_number));
LOG_CRITICAL(Audio_DSP, "pipe_number = {} unimplemented", static_cast<size_t>(pipe_number));
UNIMPLEMENTED();
return;
}

View File

@ -134,8 +134,8 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) {
OnMinimalClientAreaChangeRequest(GetActiveConfig().min_client_area_size);
SDL_PumpEvents();
SDL_GL_SetSwapInterval(Settings::values.use_vsync);
LOG_INFO(Frontend, "Citra Version: {} | {}-{}", Common::g_build_fullname,
Common::g_scm_branch, Common::g_scm_desc);
LOG_INFO(Frontend, "Citra Version: {} | {}-{}", Common::g_build_fullname, Common::g_scm_branch,
Common::g_scm_desc);
DoneCurrent();
}

View File

@ -137,8 +137,8 @@ GMainWindow::GMainWindow() : config(new Config()), emu_thread(nullptr) {
ConnectWidgetEvents();
SetupUIStrings();
LOG_INFO(Frontend, "Citra Version: {} | {}-{}", Common::g_build_fullname,
Common::g_scm_branch, Common::g_scm_desc);
LOG_INFO(Frontend, "Citra Version: {} | {}-{}", Common::g_build_fullname, Common::g_scm_branch,
Common::g_scm_desc);
show();

View File

@ -37,8 +37,7 @@ __declspec(noinline, noreturn)
#define ASSERT_MSG(_a_, ...) \
do \
if (!(_a_)) { \
assert_noinline_call( \
[&] { LOG_CRITICAL(Debug, "Assertion Failed!\n" __VA_ARGS__); }); \
assert_noinline_call([&] { LOG_CRITICAL(Debug, "Assertion Failed!\n" __VA_ARGS__); }); \
} \
while (0)

View File

@ -2368,8 +2368,7 @@ MCRR_INST : {
if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) {
mcrr_inst* const inst_cream = (mcrr_inst*)inst_base->component;
LOG_ERROR(Core_ARM11,
"MCRR executed | Coprocessor: {}, CRm {}, opc1: {}, Rt: {}, Rt2: {}",
LOG_ERROR(Core_ARM11, "MCRR executed | Coprocessor: {}, CRm {}, opc1: {}, Rt: {}, Rt2: {}",
inst_cream->cp_num, inst_cream->crm, inst_cream->opcode_1, inst_cream->rt,
inst_cream->rt2);
}
@ -2452,8 +2451,7 @@ MRRC_INST : {
if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) {
mcrr_inst* const inst_cream = (mcrr_inst*)inst_base->component;
LOG_ERROR(Core_ARM11,
"MRRC executed | Coprocessor: {}, CRm {}, opc1: {}, Rt: {}, Rt2: {}",
LOG_ERROR(Core_ARM11, "MRRC executed | Coprocessor: {}, CRm {}, opc1: {}, Rt: {}, Rt2: {}",
inst_cream->cp_num, inst_cream->crm, inst_cream->opcode_1, inst_cream->rt,
inst_cream->rt2);
}

View File

@ -390,8 +390,7 @@ static u32 vfp_compare(ARMul_State* state, int dd, int signal_on_qnan, s64 m, u3
s64 d;
u32 ret = 0;
LOG_TRACE(Core_ARM11, "In {}, state=0x{}, fpscr=0x{:x}", __FUNCTION__, fmt::ptr(state),
fpscr);
LOG_TRACE(Core_ARM11, "In {}, state=0x{}, fpscr=0x{:x}", __FUNCTION__, fmt::ptr(state), fpscr);
if (vfp_double_packed_exponent(m) == 2047 && vfp_double_packed_mantissa(m)) {
ret |= FPSCR_CFLAG | FPSCR_VFLAG;
if (signal_on_qnan ||
@ -1230,8 +1229,7 @@ u32 vfp_double_cpdo(ARMul_State* state, u32 inst, u32 fpscr) {
vecitr >> FPSCR_LENGTH_BIT, type, dest, dn, FOP_TO_IDX(op), dm);
except = fop->fn(state, dest, dn, dm, fpscr);
LOG_TRACE(Core_ARM11, "VFP: itr{}: exceptions={:08x}", vecitr >> FPSCR_LENGTH_BIT,
except);
LOG_TRACE(Core_ARM11, "VFP: itr{}: exceptions={:08x}", vecitr >> FPSCR_LENGTH_BIT, except);
exceptions |= except & ~VFP_NAN_FLAG;

View File

@ -1246,8 +1246,8 @@ u32 vfp_single_cpdo(ARMul_State* state, u32 inst, u32 fpscr) {
type = (fop->flags & OP_DD) ? 'd' : 's';
if (op == FOP_EXT)
LOG_TRACE(Core_ARM11, "itr{} ({}{}) = op[{}] (s{}={:08x})",
vecitr >> FPSCR_LENGTH_BIT, type, dest, sn, sm, m);
LOG_TRACE(Core_ARM11, "itr{} ({}{}) = op[{}] (s{}={:08x})", vecitr >> FPSCR_LENGTH_BIT,
type, dest, sn, sm, m);
else
LOG_TRACE(Core_ARM11, "itr{} ({}{}) = (s{}) op[{}] (s{}={:08x})",
vecitr >> FPSCR_LENGTH_BIT, type, dest, sn, FOP_TO_IDX(op), sm, m);

View File

@ -140,8 +140,7 @@ ResultCode NCCHArchive::DeleteFile(const Path& path) const {
}
ResultCode NCCHArchive::RenameFile(const Path& src_path, const Path& dest_path) const {
LOG_CRITICAL(Service_FS, "Attempted to rename a file within an NCCH archive ({}).",
GetName());
LOG_CRITICAL(Service_FS, "Attempted to rename a file within an NCCH archive ({}).", GetName());
// TODO(wwylele): Use correct error code
return ResultCode(-1);
}
@ -168,15 +167,13 @@ ResultCode NCCHArchive::CreateFile(const Path& path, u64 size) const {
}
ResultCode NCCHArchive::CreateDirectory(const Path& path) const {
LOG_CRITICAL(Service_FS, "Attempted to create a directory in an NCCH archive ({}).",
GetName());
LOG_CRITICAL(Service_FS, "Attempted to create a directory in an NCCH archive ({}).", GetName());
// TODO(wwylele): Use correct error code
return ResultCode(-1);
}
ResultCode NCCHArchive::RenameDirectory(const Path& src_path, const Path& dest_path) const {
LOG_CRITICAL(Service_FS, "Attempted to rename a file within an NCCH archive ({}).",
GetName());
LOG_CRITICAL(Service_FS, "Attempted to rename a file within an NCCH archive ({}).", GetName());
// TODO(wwylele): Use correct error code
return ResultCode(-1);
}

View File

@ -36,8 +36,7 @@ ResultCode IVFCArchive::DeleteFile(const Path& path) const {
}
ResultCode IVFCArchive::RenameFile(const Path& src_path, const Path& dest_path) const {
LOG_CRITICAL(Service_FS, "Attempted to rename a file within an IVFC archive ({}).",
GetName());
LOG_CRITICAL(Service_FS, "Attempted to rename a file within an IVFC archive ({}).", GetName());
// TODO(wwylele): Use correct error code
return ResultCode(-1);
}
@ -64,15 +63,13 @@ ResultCode IVFCArchive::CreateFile(const Path& path, u64 size) const {
}
ResultCode IVFCArchive::CreateDirectory(const Path& path) const {
LOG_CRITICAL(Service_FS, "Attempted to create a directory in an IVFC archive ({}).",
GetName());
LOG_CRITICAL(Service_FS, "Attempted to create a directory in an IVFC archive ({}).", GetName());
// TODO(wwylele): Use correct error code
return ResultCode(-1);
}
ResultCode IVFCArchive::RenameDirectory(const Path& src_path, const Path& dest_path) const {
LOG_CRITICAL(Service_FS, "Attempted to rename a file within an IVFC archive ({}).",
GetName());
LOG_CRITICAL(Service_FS, "Attempted to rename a file within an IVFC archive ({}).", GetName());
// TODO(wwylele): Use correct error code
return ResultCode(-1);
}

View File

@ -162,8 +162,7 @@ Loader::ResultStatus NCCHContainer::Load() {
LOG_DEBUG(Service_FS, "Name: {}",
exheader_header.codeset_info.name);
LOG_DEBUG(Service_FS, "Program ID: {:016X}", ncch_header.program_id);
LOG_DEBUG(Service_FS, "Code compressed: {}",
is_compressed ? "yes" : "no");
LOG_DEBUG(Service_FS, "Code compressed: {}", is_compressed ? "yes" : "no");
LOG_DEBUG(Service_FS, "Entry point: 0x{:08X}", entry_point);
LOG_DEBUG(Service_FS, "Code size: 0x{:08X}", code_size);
LOG_DEBUG(Service_FS, "Stack size: 0x{:08X}", stack_size);
@ -287,8 +286,8 @@ Loader::ResultStatus NCCHContainer::LoadSectionExeFS(const char* name, std::vect
// Load the specified section...
if (strcmp(section.name, name) == 0) {
LOG_DEBUG(Service_FS, "{} - offset: 0x{:08X}, size: 0x{:08X}, name: {}",
section_number, section.offset, section.size, section.name);
LOG_DEBUG(Service_FS, "{} - offset: 0x{:08X}, size: 0x{:08X}, name: {}", section_number,
section.offset, section.size, section.name);
s64 section_offset =
(section.offset + exefs_offset + sizeof(ExeFs_Header) + ncch_offset);

View File

@ -624,9 +624,8 @@ static ResultCode CreateAddressArbiter(Handle* out_handle) {
/// Arbitrate address
static ResultCode ArbitrateAddress(Handle handle, u32 address, u32 type, u32 value,
s64 nanoseconds) {
LOG_TRACE(Kernel_SVC,
"called handle=0x{:08X}, address=0x{:08X}, type=0x{:08X}, value=0x{:08X}", handle,
address, type, value);
LOG_TRACE(Kernel_SVC, "called handle=0x{:08X}, address=0x{:08X}, type=0x{:08X}, value=0x{:08X}",
handle, address, type, value);
SharedPtr<AddressArbiter> arbiter = g_handle_table.Get<AddressArbiter>(handle);
if (arbiter == nullptr)

View File

@ -153,8 +153,8 @@ void Module::Interface::IsConnected(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push(ac->ac_connected);
LOG_WARNING(Service_AC, "(STUBBED) called unk=0x{:08X} descriptor=0x{:08X} param=0x{:08X}",
unk, unk_descriptor, unk_param);
LOG_WARNING(Service_AC, "(STUBBED) called unk=0x{:08X} descriptor=0x{:08X} param=0x{:08X}", unk,
unk_descriptor, unk_param);
}
void Module::Interface::SetClientVersion(Kernel::HLERequestContext& ctx) {

View File

@ -32,8 +32,8 @@ void Module::Interface::Initialize(Kernel::HLERequestContext& ctx) {
AppletId app_id = rp.PopEnum<AppletId>();
u32 attributes = rp.Pop<u32>();
LOG_DEBUG(Service_APT, "called app_id={:#010X}, attributes={:#010X}",
static_cast<u32>(app_id), attributes);
LOG_DEBUG(Service_APT, "called app_id={:#010X}, attributes={:#010X}", static_cast<u32>(app_id),
attributes);
auto result = apt->applet_manager->Initialize(app_id, attributes);
if (result.Failed()) {
@ -329,8 +329,8 @@ void Module::Interface::ReceiveParameter(Kernel::HLERequestContext& ctx) {
AppletId app_id = rp.PopEnum<AppletId>();
u32 buffer_size = rp.Pop<u32>();
LOG_DEBUG(Service_APT, "called app_id={:#010X}, buffer_size={:#010X}",
static_cast<u32>(app_id), buffer_size);
LOG_DEBUG(Service_APT, "called app_id={:#010X}, buffer_size={:#010X}", static_cast<u32>(app_id),
buffer_size);
auto next_parameter = apt->applet_manager->ReceiveParameter(app_id);
@ -357,8 +357,8 @@ void Module::Interface::GlanceParameter(Kernel::HLERequestContext& ctx) {
AppletId app_id = rp.PopEnum<AppletId>();
u32 buffer_size = rp.Pop<u32>();
LOG_DEBUG(Service_APT, "called app_id={:#010X}, buffer_size={:#010X}",
static_cast<u32>(app_id), buffer_size);
LOG_DEBUG(Service_APT, "called app_id={:#010X}, buffer_size={:#010X}", static_cast<u32>(app_id),
buffer_size);
auto next_parameter = apt->applet_manager->GlanceParameter(app_id);
@ -415,8 +415,7 @@ void Module::Interface::PrepareToStartApplication(Kernel::HLERequestContext& ctx
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS); // No error
LOG_WARNING(
Service_APT,
LOG_WARNING(Service_APT,
"(STUBBED) called title_info1={:#010X}, title_info2={:#010X}, title_info3={:#010X},"
"title_info4={:#010X}, flags={:#010X}",
title_info1, title_info2, title_info3, title_info4, flags);
@ -467,8 +466,7 @@ void Module::Interface::SetAppCpuTimeLimit(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS); // No error
LOG_WARNING(Service_APT, "(STUBBED) called, cpu_percent={}, value={}", apt->cpu_percent,
value);
LOG_WARNING(Service_APT, "(STUBBED) called, cpu_percent={}, value={}", apt->cpu_percent, value);
}
void Module::Interface::GetAppCpuTimeLimit(Kernel::HLERequestContext& ctx) {
@ -632,8 +630,7 @@ void Module::Interface::GetStartupArgument(Kernel::HLERequestContext& ctx) {
std::vector<u8> parameter(parameter_size, 0);
LOG_WARNING(Service_APT,
"(STUBBED) called, startup_argument_type={}, parameter_size={:#010X}",
LOG_WARNING(Service_APT, "(STUBBED) called, startup_argument_type={}, parameter_size={:#010X}",
static_cast<u32>(startup_argument_type), parameter_size);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 2);
@ -658,8 +655,7 @@ void Module::Interface::Wrap(Kernel::HLERequestContext& ctx) {
ASSERT_MSG(output_size == input_size + HW::AES::CCM_MAC_SIZE,
"input_size ({}) doesn't match to output_size ({})", input_size, output_size);
LOG_DEBUG(Service_APT,
"called, output_size={}, input_size={}, nonce_offset={}, nonce_size={}",
LOG_DEBUG(Service_APT, "called, output_size={}, input_size={}, nonce_offset={}, nonce_size={}",
output_size, input_size, nonce_offset, nonce_size);
// Note: This weird nonce size modification is verified against real 3DS
@ -704,8 +700,7 @@ void Module::Interface::Unwrap(Kernel::HLERequestContext& ctx) {
ASSERT_MSG(output_size == input_size - HW::AES::CCM_MAC_SIZE,
"input_size ({}) doesn't match to output_size ({})", input_size, output_size);
LOG_DEBUG(Service_APT,
"called, output_size={}, input_size={}, nonce_offset={}, nonce_size={}",
LOG_DEBUG(Service_APT, "called, output_size={}, input_size={}, nonce_offset={}, nonce_size={}",
output_size, input_size, nonce_offset, nonce_size);
// Note: This weird nonce size modification is verified against real 3DS

View File

@ -273,8 +273,7 @@ void GetNsDataIdList(Service::Interface* self) {
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"unk_param4={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr,
buff_size);
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr, buff_size);
}
void GetOwnNsDataIdList(Service::Interface* self) {
@ -299,8 +298,7 @@ void GetOwnNsDataIdList(Service::Interface* self) {
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"unk_param4={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr,
buff_size);
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr, buff_size);
}
void GetNewDataNsDataIdList(Service::Interface* self) {
@ -325,8 +323,7 @@ void GetNewDataNsDataIdList(Service::Interface* self) {
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"unk_param4={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr,
buff_size);
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr, buff_size);
}
void GetOwnNewDataNsDataIdList(Service::Interface* self) {
@ -351,8 +348,7 @@ void GetOwnNewDataNsDataIdList(Service::Interface* self) {
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"unk_param4={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr,
buff_size);
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr, buff_size);
}
void SendProperty(Service::Interface* self) {
@ -764,8 +760,7 @@ void ReadNsData(Service::Interface* self) {
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
"unk_param4={:#010X}, translation={:#010X}, "
"buff_addr={:#010X}, buff_size={:#010X}",
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr,
buff_size);
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr, buff_size);
}
void SetNsDataAdditionalInfo(Service::Interface* self) {

View File

@ -564,8 +564,8 @@ void Module::Interface::SetTrimmingParams(Kernel::HLERequestContext& ctx) {
rb.Push(ERROR_INVALID_ENUM_VALUE);
}
LOG_DEBUG(Service_CAM, "called, port_select={}, x0={}, y0={}, x1={}, y1={}",
port_select.m_val, x0, y0, x1, y1);
LOG_DEBUG(Service_CAM, "called, port_select={}, x0={}, y0={}, x1={}, y1={}", port_select.m_val,
x0, y0, x1, y1);
}
void Module::Interface::GetTrimmingParams(Kernel::HLERequestContext& ctx) {
@ -918,8 +918,8 @@ ResultCode Module::SetPackageParameter(const PackageParameterType& package) {
}
return RESULT_SUCCESS;
} else {
LOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}",
package.camera_select, package.context_select);
LOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", package.camera_select,
package.context_select);
return ERROR_INVALID_ENUM_VALUE;
}
}

View File

@ -198,8 +198,8 @@ static void FlushDataCache(Service::Interface* self) {
cmd_buff[0] = IPC::MakeHeader(0x13, 1, 0);
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
LOG_TRACE(Service_DSP, "called address=0x{:08X}, size=0x{:X}, process=0x{:08X}", address,
size, process);
LOG_TRACE(Service_DSP, "called address=0x{:08X}, size=0x{:X}, process=0x{:08X}", address, size,
process);
}
/**

View File

@ -154,8 +154,7 @@ void ERR_F::ThrowFatalError(Kernel::HLERequestContext& ctx) {
LOG_CRITICAL(Service_ERR, "Fatal error");
const ErrInfo errinfo = rp.PopRaw<ErrInfo>();
LOG_CRITICAL(Service_ERR, "Fatal error type: {}",
GetErrType(errinfo.errinfo_common.specifier));
LOG_CRITICAL(Service_ERR, "Fatal error type: {}", GetErrType(errinfo.errinfo_common.specifier));
Core::System::GetInstance().SetStatus(Core::System::ResultStatus::ErrorUnknown);
// Generic Info

View File

@ -676,8 +676,7 @@ void RegisterArchiveTypes() {
void RegisterSelfNCCH(Loader::AppLoader& app_loader) {
auto itr = id_code_map.find(ArchiveIdCode::SelfNCCH);
if (itr == id_code_map.end()) {
LOG_ERROR(
Service_FS,
LOG_ERROR(Service_FS,
"Could not register a new NCCH because the SelfNCCH archive hasn't been created");
return;
}

View File

@ -54,8 +54,7 @@ void FS_USER::OpenFile(Kernel::HLERequestContext& ctx) {
ASSERT(filename.size() == filename_size);
FileSys::Path file_path(filename_type, filename);
LOG_DEBUG(Service_FS, "path={}, mode={} attrs={}", file_path.DebugStr(), mode.hex,
attributes);
LOG_DEBUG(Service_FS, "path={}, mode={} attrs={}", file_path.DebugStr(), mode.hex, attributes);
ResultVal<std::shared_ptr<File>> file_res =
OpenFileFromArchive(archive_handle, file_path, mode);
@ -88,10 +87,9 @@ void FS_USER::OpenFileDirectly(Kernel::HLERequestContext& ctx) {
FileSys::Path archive_path(archivename_type, archivename);
FileSys::Path file_path(filename_type, filename);
LOG_DEBUG(Service_FS,
"archive_id=0x{:08X} archive_path={} file_path={}, mode={} attributes={}",
static_cast<u32>(archive_id), archive_path.DebugStr(), file_path.DebugStr(),
mode.hex, attributes);
LOG_DEBUG(Service_FS, "archive_id=0x{:08X} archive_path={} file_path={}, mode={} attributes={}",
static_cast<u32>(archive_id), archive_path.DebugStr(), file_path.DebugStr(), mode.hex,
attributes);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
@ -130,8 +128,8 @@ void FS_USER::DeleteFile(Kernel::HLERequestContext& ctx) {
FileSys::Path file_path(filename_type, filename);
LOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(filename_type),
filename_size, file_path.DebugStr());
LOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(filename_type), filename_size,
file_path.DebugStr());
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(DeleteFileFromArchive(archive_handle, file_path));
@ -155,8 +153,8 @@ void FS_USER::RenameFile(Kernel::HLERequestContext& ctx) {
FileSys::Path src_file_path(src_filename_type, src_filename);
FileSys::Path dest_file_path(dest_filename_type, dest_filename);
LOG_DEBUG(
Service_FS, "src_type={} src_size={} src_data={} dest_type={} dest_size={} dest_data={}",
LOG_DEBUG(Service_FS,
"src_type={} src_size={} src_data={} dest_type={} dest_size={} dest_data={}",
static_cast<u32>(src_filename_type), src_filename_size, src_file_path.DebugStr(),
static_cast<u32>(dest_filename_type), dest_filename_size, dest_file_path.DebugStr());

View File

@ -120,8 +120,7 @@ static ResultCode WriteHWRegs(u32 base_address, u32 size_in_bytes, const std::ve
const u32 max_size_in_bytes = 0x80;
if (base_address & 3 || base_address >= 0x420000) {
LOG_ERROR(
Service_GSP,
LOG_ERROR(Service_GSP,
"Write address was out of range or misaligned! (address=0x{:08x}, size=0x{:08x})",
base_address, size_in_bytes);
return ERR_REGS_OUTOFRANGE_OR_MISALIGNED;
@ -165,8 +164,7 @@ static ResultCode WriteHWRegsWithMask(u32 base_address, u32 size_in_bytes,
const u32 max_size_in_bytes = 0x80;
if (base_address & 3 || base_address >= 0x420000) {
LOG_ERROR(
Service_GSP,
LOG_ERROR(Service_GSP,
"Write address was out of range or misaligned! (address=0x{:08x}, size=0x{:08x})",
base_address, size_in_bytes);
return ERR_REGS_OUTOFRANGE_OR_MISALIGNED;
@ -319,8 +317,8 @@ void GSP_GPU::FlushDataCache(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
LOG_DEBUG(Service_GSP, "(STUBBED) called address=0x{:08X}, size=0x{:08X}, process={}",
address, size, process->process_id);
LOG_DEBUG(Service_GSP, "(STUBBED) called address=0x{:08X}, size=0x{:08X}, process={}", address,
size, process->process_id);
}
void GSP_GPU::InvalidateDataCache(Kernel::HLERequestContext& ctx) {
@ -334,8 +332,8 @@ void GSP_GPU::InvalidateDataCache(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
LOG_DEBUG(Service_GSP, "(STUBBED) called address=0x{:08X}, size=0x{:08X}, process={}",
address, size, process->process_id);
LOG_DEBUG(Service_GSP, "(STUBBED) called address=0x{:08X}, size=0x{:08X}, process={}", address,
size, process->process_id);
}
void GSP_GPU::SetAxiConfigQoSMode(Kernel::HLERequestContext& ctx) {
@ -726,8 +724,8 @@ void GSP_GPU::StoreDataCache(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
LOG_DEBUG(Service_GSP, "(STUBBED) called address=0x{:08X}, size=0x{:08X}, process={}",
address, size, process->process_id);
LOG_DEBUG(Service_GSP, "(STUBBED) called address=0x{:08X}, size=0x{:08X}, process={}", address,
size, process->process_id);
}
void GSP_GPU::SetLedForceOff(Kernel::HLERequestContext& ctx) {

View File

@ -183,8 +183,7 @@ private:
/// Wraps the payload into packet and puts it to the receive buffer
void IR_USER::PutToReceive(const std::vector<u8>& payload) {
LOG_TRACE(Service_IR, "called, data={}",
Common::ArrayToString(payload.data(), payload.size()));
LOG_TRACE(Service_IR, "called, data={}", Common::ArrayToString(payload.data(), payload.size()));
size_t size = payload.size();
std::vector<u8> packet;

View File

@ -877,8 +877,7 @@ ResultCode CROHelper::ApplyModuleImport(VAddr crs_address) {
}
}
LOG_INFO(Service_LDR, "CRO \"{}\" imports {} anonymous symbols from \"{}\"",
ModuleName(), entry.import_anonymous_symbol_num,
source.ModuleName());
ModuleName(), entry.import_anonymous_symbol_num, source.ModuleName());
for (u32 j = 0; j < entry.import_anonymous_symbol_num; ++j) {
ImportAnonymousSymbolEntry im;
entry.GetImportAnonymousSymbolEntry(j, im);

View File

@ -58,8 +58,7 @@ void RO::Initialize(Kernel::HLERequestContext& ctx) {
// All other service functions below have the same issue.
auto process = rp.PopObject<Kernel::Process>();
LOG_DEBUG(Service_LDR,
"called, crs_buffer_ptr=0x{:08X}, crs_address=0x{:08X}, crs_size=0x{:X}",
LOG_DEBUG(Service_LDR, "called, crs_buffer_ptr=0x{:08X}, crs_address=0x{:08X}, crs_size=0x{:X}",
crs_buffer_ptr, crs_address, crs_size);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -202,8 +201,8 @@ void RO::LoadCRO(Kernel::HLERequestContext& ctx, bool link_on_load_bug_fix) {
"bss_segment_address=0x{:08X}, bss_segment_size=0x{:X}, auto_link={}, "
"fix_level={}, crr_address=0x{:08X}",
link_on_load_bug_fix ? "new" : "old", cro_buffer_ptr, cro_address, cro_size,
data_segment_address, zero, data_segment_size, bss_segment_address,
bss_segment_size, auto_link ? "true" : "false", fix_level, crr_address);
data_segment_address, zero, data_segment_size, bss_segment_address, bss_segment_size,
auto_link ? "true" : "false", fix_level, crr_address);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);

View File

@ -66,8 +66,8 @@ struct MIC_U::Impl {
LOG_WARNING(Service_MIC,
"(STUBBED) called, encoding={}, sample_rate={}, "
"audio_buffer_offset={}, audio_buffer_size={}, audio_buffer_loop={}",
static_cast<u32>(encoding), static_cast<u32>(sample_rate),
audio_buffer_offset, audio_buffer_size, audio_buffer_loop);
static_cast<u32>(encoding), static_cast<u32>(sample_rate), audio_buffer_offset,
audio_buffer_size, audio_buffer_loop);
}
void AdjustSampling(Kernel::HLERequestContext& ctx) {
@ -76,8 +76,7 @@ struct MIC_U::Impl {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
LOG_WARNING(Service_MIC, "(STUBBED) called, sample_rate={}",
static_cast<u32>(sample_rate));
LOG_WARNING(Service_MIC, "(STUBBED) called, sample_rate={}", static_cast<u32>(sample_rate));
}
void StopSampling(Kernel::HLERequestContext& ctx) {

View File

@ -120,16 +120,14 @@ void CheckNew3DS(IPC::RequestBuilder& rb) {
const bool is_new_3ds = Settings::values.is_new_3ds;
if (is_new_3ds) {
LOG_CRITICAL(Service_PTM,
"The option 'is_new_3ds' is enabled as part of the 'System' "
LOG_CRITICAL(Service_PTM, "The option 'is_new_3ds' is enabled as part of the 'System' "
"settings. Citra does not fully support New 3DS emulation yet!");
}
rb.Push(RESULT_SUCCESS);
rb.Push(is_new_3ds);
LOG_WARNING(Service_PTM, "(STUBBED) called isNew3DS = 0x{:08x}",
static_cast<u32>(is_new_3ds));
LOG_WARNING(Service_PTM, "(STUBBED) called isNew3DS = 0x{:08x}", static_cast<u32>(is_new_3ds));
}
void Module::Interface::CheckNew3DS(Kernel::HLERequestContext& ctx) {

View File

@ -101,8 +101,7 @@ void Interface::HandleSyncRequest(SharedPtr<ServerSession> server_session) {
cmd_buff[1] = 0;
return;
}
LOG_TRACE(Service, "{}",
MakeFunctionString(itr->second.name, GetPortName().c_str(), cmd_buff));
LOG_TRACE(Service, "{}", MakeFunctionString(itr->second.name, GetPortName().c_str(), cmd_buff));
itr->second.func(this);
}

View File

@ -103,15 +103,13 @@ void SRV::GetServiceHandle(Kernel::HLERequestContext& ctx) {
if (client_port.Failed()) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(client_port.Code());
LOG_ERROR(Service_SRV, "called service={} -> error 0x{:08X}", name,
client_port.Code().raw);
LOG_ERROR(Service_SRV, "called service={} -> error 0x{:08X}", name, client_port.Code().raw);
return;
}
auto session = client_port.Unwrap()->Connect();
if (session.Succeeded()) {
LOG_DEBUG(Service_SRV, "called service={} -> session={}", name,
(*session)->GetObjectId());
LOG_DEBUG(Service_SRV, "called service={} -> session={}", name, (*session)->GetObjectId());
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
rb.Push(session.Code());
rb.PushMoveObjects(std::move(session).Unwrap());
@ -179,8 +177,8 @@ void SRV::PublishToSubscriber(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
LOG_WARNING(Service_SRV, "(STUBBED) called, notification_id=0x{:X}, flags={}",
notification_id, flags);
LOG_WARNING(Service_SRV, "(STUBBED) called, notification_id=0x{:X}, flags={}", notification_id,
flags);
}
void SRV::RegisterService(Kernel::HLERequestContext& ctx) {

View File

@ -65,8 +65,7 @@ static Math::Vec4<u8> DecodePixel(Regs::PixelFormat input_format, const u8* src_
return Color::DecodeRGBA4(src_pixel);
default:
LOG_ERROR(HW_GPU, "Unknown source framebuffer format {:x}",
static_cast<u32>(input_format));
LOG_ERROR(HW_GPU, "Unknown source framebuffer format {:x}", static_cast<u32>(input_format));
return {0, 0, 0, 0};
}
}
@ -392,8 +391,7 @@ inline void Write(u32 addr, const T data) {
// Writes other than u32 are untested, so I'd rather have them abort than silently fail
if (index >= Regs::NumIds() || !std::is_same<T, u32>::value) {
LOG_ERROR(HW_GPU, "unknown Write{} {:#010X} @ {:#010X}", sizeof(data) * 8, (u32)data,
addr);
LOG_ERROR(HW_GPU, "unknown Write{} {:#010X} @ {:#010X}", sizeof(data) * 8, (u32)data, addr);
return;
}
@ -446,9 +444,8 @@ inline void Write(u32 addr, const T data) {
"TextureCopy: {:#X} bytes from {:#010X}({}+{})-> "
"{:#010X}({}+{}), flags {:#010X}",
config.texture_copy.size, config.GetPhysicalInputAddress(),
config.texture_copy.input_width * 16,
config.texture_copy.input_gap * 16, config.GetPhysicalOutputAddress(),
config.texture_copy.output_width * 16,
config.texture_copy.input_width * 16, config.texture_copy.input_gap * 16,
config.GetPhysicalOutputAddress(), config.texture_copy.output_width * 16,
config.texture_copy.output_gap * 16, config.flags);
} else {
DisplayTransfer(config);

View File

@ -35,8 +35,7 @@ inline void Write(u32 addr, const T data) {
// Writes other than u32 are untested, so I'd rather have them abort than silently fail
if (index >= 0x400 || !std::is_same<T, u32>::value) {
LOG_ERROR(HW_LCD, "unknown Write{} {:#010X} @ {:#010X}", sizeof(data) * 8, (u32)data,
addr);
LOG_ERROR(HW_LCD, "unknown Write{} {:#010X} @ {:#010X}", sizeof(data) * 8, (u32)data, addr);
return;
}

View File

@ -351,8 +351,8 @@ bool Movie::ValidateHeader(const CTMHeader& header) {
revision = Common::ToLower(revision);
if (revision != Common::g_scm_rev) {
LOG_WARNING(
Movie, "This movie was created on a different version of Citra, playback may desync");
LOG_WARNING(Movie,
"This movie was created on a different version of Citra, playback may desync");
}
u64 program_id;

View File

@ -43,8 +43,7 @@ RasterizerOpenGL::RasterizerOpenGL()
allow_shadow = GLAD_GL_ARB_shader_image_load_store && GLAD_GL_ARB_shader_image_size &&
GLAD_GL_ARB_framebuffer_no_attachments;
if (!allow_shadow) {
LOG_WARNING(
Render_OpenGL,
LOG_WARNING(Render_OpenGL,
"Shadow might not be able to render because of unsupported OpenGL extensions.");
}

View File

@ -494,8 +494,8 @@ static void APIENTRY DebugHandler(GLenum source, GLenum type, GLuint id, GLenum
level = Log::Level::Debug;
break;
}
LOG_GENERIC(Log::Class::Render_OpenGL, level, "{} {} {}: {}", GetSource(source),
GetType(type), id, message);
LOG_GENERIC(Log::Class::Render_OpenGL, level, "{} {} {}: {}", GetSource(source), GetType(type),
id, message);
}
/// Initialize the renderer

View File

@ -363,8 +363,7 @@ static void ProcessTriangleInternal(const Vertex& v0, const Vertex& v1, const Ve
}
default:
// TODO: Change to LOG_ERROR when more types are handled.
LOG_DEBUG(HW_GPU, "Unhandled texture type {:x}",
(int)texture.config.type);
LOG_DEBUG(HW_GPU, "Unhandled texture type {:x}", (int)texture.config.type);
UNIMPLEMENTED();
break;
}
@ -844,8 +843,7 @@ static void ProcessTriangleInternal(const Vertex& v0, const Vertex& v1, const Ve
return std::min(combiner_output.a(), static_cast<u8>(255 - dest.a()));
default:
LOG_CRITICAL(HW_GPU, "Unknown blend factor {:x}",
static_cast<u32>(factor));
LOG_CRITICAL(HW_GPU, "Unknown blend factor {:x}", static_cast<u32>(factor));
UNIMPLEMENTED();
break;
}

View File

@ -37,8 +37,7 @@ void VertexLoader::Setup(const PipelineRegs& regs) {
// TODO: What happens if a loader overwrites a previous one's data?
for (unsigned component = 0; component < loader_config.component_count; ++component) {
if (component >= 12) {
LOG_ERROR(
HW_GPU,
LOG_ERROR(HW_GPU,
"Overflow in the vertex attribute loader {} trying to load component {}",
loader, component);
continue;

View File

@ -175,8 +175,7 @@ std::future<T> GetJson(std::function<T(const std::string&)> func, const std::str
}
if (response.status >= 400) {
LOG_ERROR(WebService, "GET to {} returned error status code: {}", url,
response.status);
LOG_ERROR(WebService, "GET to {} returned error status code: {}", url, response.status);
return func("");
}