From 363811981da92ff8b929b29e444bd79130e354b7 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sat, 25 Aug 2018 15:39:00 +0300 Subject: [PATCH] Reintroduce LOG_CHANNEL Groundwork for further improvements --- Utilities/Config.cpp | 16 +++-- Utilities/GDBDebugServer.cpp | 2 +- Utilities/Log.h | 2 + rpcs3/Emu/Cell/Modules/cellAdec.cpp | 6 +- rpcs3/Emu/Cell/Modules/cellAtrac.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellAtracMulti.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellAudio.cpp | 6 +- rpcs3/Emu/Cell/Modules/cellAvconfExt.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellBgdl.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellCamera.cpp | 4 +- rpcs3/Emu/Cell/Modules/cellCelp8Enc.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellCelpEnc.cpp | 2 +- .../Emu/Cell/Modules/cellCrossController.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellDaisy.cpp | 4 +- rpcs3/Emu/Cell/Modules/cellDmux.cpp | 28 ++++----- rpcs3/Emu/Cell/Modules/cellFiber.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellFont.cpp | 12 ++-- rpcs3/Emu/Cell/Modules/cellFontFT.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellFs.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellGame.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellGameExec.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellGcmSys.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellGem.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellGifDec.cpp | 14 ++--- rpcs3/Emu/Cell/Modules/cellHttp.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellHttpUtil.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellImeJp.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellJpgDec.cpp | 12 ++-- rpcs3/Emu/Cell/Modules/cellJpgEnc.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellKey2char.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellL10n.cpp | 18 +++--- rpcs3/Emu/Cell/Modules/cellLibprof.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellMic.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellMusic.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellMusicDecode.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellMusicExport.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellNetCtl.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellOskDialog.cpp | 4 +- rpcs3/Emu/Cell/Modules/cellOvis.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellPamf.cpp | 42 ++++++------- rpcs3/Emu/Cell/Modules/cellPhotoDecode.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellPhotoExport.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellPhotoImport.cpp | 10 ++-- rpcs3/Emu/Cell/Modules/cellPngDec.cpp | 60 +++++++++---------- rpcs3/Emu/Cell/Modules/cellPngEnc.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellPrint.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellRec.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellRemotePlay.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellResc.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellRtc.cpp | 14 ++--- rpcs3/Emu/Cell/Modules/cellRtcAlarm.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellRudp.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellSail.cpp | 6 +- rpcs3/Emu/Cell/Modules/cellSailRec.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellSaveData.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellScreenshot.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellSearch.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellSheap.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellSpudll.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellSpurs.cpp | 24 ++++---- rpcs3/Emu/Cell/Modules/cellSpursJq.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellSsl.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellSubDisplay.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellSync.cpp | 6 +- rpcs3/Emu/Cell/Modules/cellSync2.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellSysconf.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellSysmodule.cpp | 4 +- rpcs3/Emu/Cell/Modules/cellSysutil.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellSysutilAp.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellSysutilAvc.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellSysutilAvc2.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellSysutilMisc.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellSysutilNpEula.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellUsbd.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellUsbpspcm.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellUserInfo.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellVdec.cpp | 4 +- rpcs3/Emu/Cell/Modules/cellVideoExport.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellVideoUpload.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellVoice.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellVpost.cpp | 2 +- rpcs3/Emu/Cell/Modules/cell_FreeType2.cpp | 2 +- rpcs3/Emu/Cell/Modules/libmedi.cpp | 2 +- rpcs3/Emu/Cell/Modules/libmixer.cpp | 14 ++--- rpcs3/Emu/Cell/Modules/libsnd3.cpp | 2 +- rpcs3/Emu/Cell/Modules/libsynth2.cpp | 2 +- rpcs3/Emu/Cell/Modules/sceNp.cpp | 10 ++-- rpcs3/Emu/Cell/Modules/sceNp2.cpp | 2 +- rpcs3/Emu/Cell/Modules/sceNpClans.cpp | 2 +- rpcs3/Emu/Cell/Modules/sceNpCommerce2.cpp | 2 +- rpcs3/Emu/Cell/Modules/sceNpMatchingInt.cpp | 2 +- rpcs3/Emu/Cell/Modules/sceNpSns.cpp | 2 +- rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp | 2 +- rpcs3/Emu/Cell/Modules/sceNpTus.cpp | 2 +- rpcs3/Emu/Cell/Modules/sceNpUtil.cpp | 2 +- rpcs3/Emu/Cell/Modules/sysPrxForUser.cpp | 2 +- rpcs3/Emu/Cell/Modules/sys_io.cpp | 2 +- rpcs3/Emu/Cell/Modules/sys_libc.cpp | 2 +- rpcs3/Emu/Cell/Modules/sys_lv2dbg.cpp | 2 +- rpcs3/Emu/Cell/Modules/sys_net_.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_cond.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_dbg.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_event.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_event_flag.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_fs.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_gamepad.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_interrupt.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_lwcond.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_lwmutex.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_memory.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_mmapper.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_mutex.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_net.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_process.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_prx.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_rsx.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_rwlock.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_semaphore.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_spu.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_ss.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_time.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_timer.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_trace.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_tty.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_usbd.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_vm.cpp | 2 +- rpcs3/Loader/PSF.cpp | 6 +- 128 files changed, 266 insertions(+), 268 deletions(-) diff --git a/Utilities/Config.cpp b/Utilities/Config.cpp index dd9bbc732f..635738af95 100644 --- a/Utilities/Config.cpp +++ b/Utilities/Config.cpp @@ -7,8 +7,6 @@ namespace cfg { - logs::channel cfg("CFG"); - _base::_base(type _type) : m_type(_type) { @@ -67,19 +65,19 @@ bool cfg::try_to_int64(s64* out, const std::string& value, s64 min, s64 max) } catch (const std::exception& e) { - if (out) cfg.error("cfg::try_to_int('%s'): exception: %s", value, e.what()); + if (out) LOG_ERROR(GENERAL, "cfg::try_to_int('%s'): exception: %s", value, e.what()); return false; } if (pos != value.size()) { - if (out) cfg.error("cfg::try_to_int('%s'): unexpected characters (pos=%zu)", value, pos); + if (out) LOG_ERROR(GENERAL, "cfg::try_to_int('%s'): unexpected characters (pos=%zu)", value, pos); return false; } if (result < min || result > max) { - if (out) cfg.error("cfg::try_to_int('%s'): out of bounds (%lld..%lld)", value, min, max); + if (out) LOG_ERROR(GENERAL, "cfg::try_to_int('%s'): out of bounds (%lld..%lld)", value, min, max); return false; } @@ -119,13 +117,13 @@ bool cfg::try_to_enum_value(u64* out, decltype(&fmt_class_string::format) f if (pos != value.size()) { - if (out) cfg.error("cfg::try_to_enum_value('%s'): unexpected characters (pos=%zu)", value, pos); + if (out) LOG_ERROR(GENERAL, "cfg::try_to_enum_value('%s'): unexpected characters (pos=%zu)", value, pos); return false; } if (val > max) { - if (out) cfg.error("cfg::try_to_enum_value('%s'): out of bounds(0..%u)", value, max); + if (out) LOG_ERROR(GENERAL, "cfg::try_to_enum_value('%s'): out of bounds(0..%u)", value, max); return false; } @@ -134,7 +132,7 @@ bool cfg::try_to_enum_value(u64* out, decltype(&fmt_class_string::format) f } catch (const std::exception& e) { - if (out) cfg.error("cfg::try_to_enum_value('%s'): invalid enum value: %s", value, e.what()); + if (out) LOG_ERROR(GENERAL, "cfg::try_to_enum_value('%s'): invalid enum value: %s", value, e.what()); return false; } } @@ -300,7 +298,7 @@ bool cfg::node::from_string(const std::string& value) try } catch (const std::exception& e) { - cfg.fatal("%s thrown: %s", typeid(e).name(), e.what()); + LOG_FATAL(GENERAL, "%s thrown: %s", typeid(e).name(), e.what()); return false; } diff --git a/Utilities/GDBDebugServer.cpp b/Utilities/GDBDebugServer.cpp index 8bba7e278d..eb3bf30f84 100644 --- a/Utilities/GDBDebugServer.cpp +++ b/Utilities/GDBDebugServer.cpp @@ -19,7 +19,7 @@ extern void ppu_set_breakpoint(u32 addr); extern void ppu_remove_breakpoint(u32 addr); -logs::channel gdbDebugServer("gdbDebugServer"); +LOG_CHANNEL(gdbDebugServer); int sock_init(void) { diff --git a/Utilities/Log.h b/Utilities/Log.h index 3b3efa46eb..3117ed2702 100644 --- a/Utilities/Log.h +++ b/Utilities/Log.h @@ -113,6 +113,8 @@ namespace logs void set_level(const std::string&, level); } +#define LOG_CHANNEL(ch, ...) ::logs::channel ch(#ch, ##__VA_ARGS__); + // Legacy: #define LOG_SUCCESS(ch, fmt, ...) logs::ch.success("" fmt, ##__VA_ARGS__) diff --git a/rpcs3/Emu/Cell/Modules/cellAdec.cpp b/rpcs3/Emu/Cell/Modules/cellAdec.cpp index 6fd028093b..bb9fee400b 100644 --- a/rpcs3/Emu/Cell/Modules/cellAdec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellAdec.cpp @@ -21,7 +21,7 @@ extern "C" extern std::mutex g_mutex_avcodec_open2; -logs::channel cellAdec("cellAdec"); +LOG_CHANNEL(cellAdec); class AudioDecoder : public ppu_thread { @@ -252,7 +252,7 @@ public: if (just_started && just_finished) { avcodec_flush_buffers(ctx); - + reader.init = true; // wrong just_finished = false; just_started = false; @@ -531,7 +531,7 @@ bool adecCheckType(s32 type) cellAdec.todo("Unimplemented audio codec type (%d)", type); Emu.Pause(); break; - } + } default: return false; } diff --git a/rpcs3/Emu/Cell/Modules/cellAtrac.cpp b/rpcs3/Emu/Cell/Modules/cellAtrac.cpp index 3a6afb2b2c..5cdcccfc87 100644 --- a/rpcs3/Emu/Cell/Modules/cellAtrac.cpp +++ b/rpcs3/Emu/Cell/Modules/cellAtrac.cpp @@ -4,7 +4,7 @@ #include "cellAtrac.h" -logs::channel cellAtrac("cellAtrac"); +LOG_CHANNEL(cellAtrac); s32 cellAtracSetDataAndGetMemSize(vm::ptr pHandle, vm::ptr pucBufferAddr, u32 uiReadByte, u32 uiBufferByte, vm::ptr puiWorkMemByte) { diff --git a/rpcs3/Emu/Cell/Modules/cellAtracMulti.cpp b/rpcs3/Emu/Cell/Modules/cellAtracMulti.cpp index 0b67119129..c82ba26dee 100644 --- a/rpcs3/Emu/Cell/Modules/cellAtracMulti.cpp +++ b/rpcs3/Emu/Cell/Modules/cellAtracMulti.cpp @@ -4,7 +4,7 @@ #include "cellAtracMulti.h" -logs::channel cellAtracMulti("cellAtracMulti"); +LOG_CHANNEL(cellAtracMulti); s32 cellAtracMultiSetDataAndGetMemSize(vm::ptr pHandle, vm::ptr pucBufferAddr, u32 uiReadByte, u32 uiBufferByte, u32 uiOutputChNum, vm::ptr piTrackArray, vm::ptr puiWorkMemByte) { diff --git a/rpcs3/Emu/Cell/Modules/cellAudio.cpp b/rpcs3/Emu/Cell/Modules/cellAudio.cpp index 732fe985bb..2355c1c60a 100644 --- a/rpcs3/Emu/Cell/Modules/cellAudio.cpp +++ b/rpcs3/Emu/Cell/Modules/cellAudio.cpp @@ -10,7 +10,7 @@ #include -logs::channel cellAudio("cellAudio"); +LOG_CHANNEL(cellAudio); template <> void fmt_class_string::format(std::string& out, u64 arg) @@ -326,7 +326,7 @@ void audio_config::on_task() { if (auto queue = lv2_event_queue::find(key)) { - queue->send(0, 0, 0, 0); // TODO: check arguments + queue->send(0, 0, 0, 0); // TODO: check arguments } } } @@ -790,7 +790,7 @@ error_code cellAudioRemoveNotifyEventQueue(u64 key) if (*i == key) { g_audio->keys.erase(i); - + return CELL_OK; } } diff --git a/rpcs3/Emu/Cell/Modules/cellAvconfExt.cpp b/rpcs3/Emu/Cell/Modules/cellAvconfExt.cpp index 7cf8be34a8..91f3e93068 100644 --- a/rpcs3/Emu/Cell/Modules/cellAvconfExt.cpp +++ b/rpcs3/Emu/Cell/Modules/cellAvconfExt.cpp @@ -9,7 +9,7 @@ #include "cellVideoOut.h" #include "cellSysutil.h" -logs::channel cellAvconfExt("cellAvconfExt"); +LOG_CHANNEL(cellAvconfExt); s32 cellAudioOutUnregisterDevice(u32 deviceNumber) { diff --git a/rpcs3/Emu/Cell/Modules/cellBgdl.cpp b/rpcs3/Emu/Cell/Modules/cellBgdl.cpp index d25cb76cf8..0cc157cecb 100644 --- a/rpcs3/Emu/Cell/Modules/cellBgdl.cpp +++ b/rpcs3/Emu/Cell/Modules/cellBgdl.cpp @@ -6,7 +6,7 @@ -logs::channel cellBGDL("cellBGDL"); +LOG_CHANNEL(cellBGDL); s32 cellBGDLGetInfo(vm::cptr content_id, vm::ptr info, s32 num) { diff --git a/rpcs3/Emu/Cell/Modules/cellCamera.cpp b/rpcs3/Emu/Cell/Modules/cellCamera.cpp index 65c5492b2d..83fdab24df 100644 --- a/rpcs3/Emu/Cell/Modules/cellCamera.cpp +++ b/rpcs3/Emu/Cell/Modules/cellCamera.cpp @@ -9,7 +9,7 @@ #include -logs::channel cellCamera("cellCamera"); +LOG_CHANNEL(cellCamera); // ************** // * Prototypes * @@ -392,7 +392,7 @@ s32 cellCameraOpenEx(s32 dev_num, vm::ptr info) { return CELL_CAMERA_ERROR_DEVICE_NOT_FOUND; } - + s32 status; if ((status = cellCameraSetAttribute(dev_num, CELL_CAMERA_READMODE, info->read_mode, 0)) != CELL_OK) { diff --git a/rpcs3/Emu/Cell/Modules/cellCelp8Enc.cpp b/rpcs3/Emu/Cell/Modules/cellCelp8Enc.cpp index 1183d94310..b6c91acdb9 100644 --- a/rpcs3/Emu/Cell/Modules/cellCelp8Enc.cpp +++ b/rpcs3/Emu/Cell/Modules/cellCelp8Enc.cpp @@ -4,7 +4,7 @@ #include "cellCelp8Enc.h" -logs::channel cellCelp8Enc("cellCelp8Enc"); +LOG_CHANNEL(cellCelp8Enc); s32 cellCelp8EncQueryAttr() diff --git a/rpcs3/Emu/Cell/Modules/cellCelpEnc.cpp b/rpcs3/Emu/Cell/Modules/cellCelpEnc.cpp index c8029f4e4f..63dd18ebb9 100644 --- a/rpcs3/Emu/Cell/Modules/cellCelpEnc.cpp +++ b/rpcs3/Emu/Cell/Modules/cellCelpEnc.cpp @@ -4,7 +4,7 @@ #include "cellCelpEnc.h" -logs::channel cellCelpEnc("cellCelpEnc"); +LOG_CHANNEL(cellCelpEnc); s32 cellCelpEncQueryAttr() diff --git a/rpcs3/Emu/Cell/Modules/cellCrossController.cpp b/rpcs3/Emu/Cell/Modules/cellCrossController.cpp index 3f27a864d6..25aa72f85b 100644 --- a/rpcs3/Emu/Cell/Modules/cellCrossController.cpp +++ b/rpcs3/Emu/Cell/Modules/cellCrossController.cpp @@ -5,7 +5,7 @@ -logs::channel cellCrossController("cellCrossController"); +LOG_CHANNEL(cellCrossController); enum { diff --git a/rpcs3/Emu/Cell/Modules/cellDaisy.cpp b/rpcs3/Emu/Cell/Modules/cellDaisy.cpp index 53f39dbddf..e55cca47ff 100644 --- a/rpcs3/Emu/Cell/Modules/cellDaisy.cpp +++ b/rpcs3/Emu/Cell/Modules/cellDaisy.cpp @@ -3,7 +3,7 @@ #include "cellDaisy.h" -logs::channel cellDaisy("cellDaisy"); +LOG_CHANNEL(cellDaisy); using LFQueue2 = struct CellDaisyLFQueue2; using Lock = struct CellDaisyLock; @@ -138,7 +138,7 @@ DECLARE(ppu_module_manager::cellDaisy)("cellDaisy", []() REG_FNID(cellDaisy, "_QN4cell5Daisy29LFQueue2HasUnfinishedConsumerEPNS0_8LFQueue2Ej", cellDaisyLFQueue2HasUnfinishedConsumer); REG_FNID(cellDaisy, "_ZN4cell5Daisy16LFQueue2PushOpenEPNS0_8LFQueue2E", cellDaisyLFQueue2PushOpen); REG_FNID(cellDaisy, "_QN4cell5Daisy16LFQueue2PushOpenEPNS0_8LFQueue2E", cellDaisyLFQueue2PushOpen); - REG_FNID(cellDaisy, "_ZN4cell5Daisy16LFQueue2PopCloseEPNS0_8LFQueue2EPFiPvjE", cellDaisyLFQueue2PopClose); + REG_FNID(cellDaisy, "_ZN4cell5Daisy16LFQueue2PopCloseEPNS0_8LFQueue2EPFiPvjE", cellDaisyLFQueue2PopClose); REG_FNID(cellDaisy, "_QN4cell5Daisy16LFQueue2PopCloseEPNS0_8LFQueue2EPFiPvjE", cellDaisyLFQueue2PopClose); REG_FNID(cellDaisy, "_ZN4cell5Daisy15LFQueue2PopOpenEPNS0_8LFQueue2E", cellDaisyLFQueue2PopOpen); REG_FNID(cellDaisy, "_QN4cell5Daisy15LFQueue2PopOpenEPNS0_8LFQueue2E", cellDaisyLFQueue2PopOpen); diff --git a/rpcs3/Emu/Cell/Modules/cellDmux.cpp b/rpcs3/Emu/Cell/Modules/cellDmux.cpp index ad1366e350..6898fe6b68 100644 --- a/rpcs3/Emu/Cell/Modules/cellDmux.cpp +++ b/rpcs3/Emu/Cell/Modules/cellDmux.cpp @@ -9,7 +9,7 @@ #include -logs::channel cellDmux("cellDmux"); +LOG_CHANNEL(cellDmux); /* Demuxer Thread Classes */ @@ -68,9 +68,9 @@ struct DemuxerStream u64 get_ts(u8 c) { - u8 v[4]; get((u32&)v); + u8 v[4]; get((u32&)v); return - (((u64)c & 0x0e) << 29) | + (((u64)c & 0x0e) << 29) | (((u64)v[0]) << 21) | (((u64)v[1] & 0x7e) << 15) | (((u64)v[2]) << 7) | ((u64)v[3] >> 1); @@ -226,14 +226,14 @@ public: { break; } - + if (!job.try_peek(task) && is_running && stream.addr) { // default task (demuxing) (if there is no other work) be_t code; be_t len; - if (!stream.peek(code)) + if (!stream.peek(code)) { // demuxing finished is_running = false; @@ -248,10 +248,10 @@ public: is_working = false; stream = {}; - + continue; } - + switch (code) { case PACK_START_CODE: @@ -338,7 +338,7 @@ public: fmt::throw_exception("End of block (PRIVATE_STREAM_1, PesHeader + fid_minor, len=%d)" HERE, len); } len -= pes.size + 4; - + u8 fid_minor; if (!stream.get(fid_minor)) { @@ -388,7 +388,7 @@ public: if (size < frame_size + 8) break; // skip non-complete AU if (es.isfull(frame_size + 8)) break; // skip if cannot push AU - + es.push_au(frame_size + 8, es.last_dts, es.last_pts, stream.userdata, false /* TODO: set correct value */, 0); //cellDmux.notice("ATX AU pushed (ats=0x%llx, frame_size=%d)", *(be_t*)data, frame_size); @@ -465,7 +465,7 @@ public: es.cbFunc(*this, id, es.id, esMsg, es.cbArg); lv2_obj::sleep(*this); } - + if (pes.has_ts) { // preserve dts/pts for next AU @@ -631,7 +631,7 @@ public: es.cbFunc(*this, id, es.id, esMsg, es.cbArg); lv2_obj::sleep(*this); } - + if (es.raw_data.size()) { cellDmux.error("dmuxFlushEs: 0x%x bytes lost (es_id=%d)", (u32)es.raw_data.size(), es.id); @@ -651,7 +651,7 @@ public: task.es.es_ptr->reset(); break; } - + case dmuxClose: { break; @@ -660,7 +660,7 @@ public: default: { fmt::throw_exception("Demuxer thread error: unknown task (0x%x)" HERE, (u32)task.type); - } + } } } @@ -689,7 +689,7 @@ PesHeader::PesHeader(DemuxerStream& stream) { fmt::throw_exception("End of stream (size=%d)" HERE, size); } - + u8 pos = 0; while (pos++ < size) { diff --git a/rpcs3/Emu/Cell/Modules/cellFiber.cpp b/rpcs3/Emu/Cell/Modules/cellFiber.cpp index fe7eddba74..6a07e23bd8 100644 --- a/rpcs3/Emu/Cell/Modules/cellFiber.cpp +++ b/rpcs3/Emu/Cell/Modules/cellFiber.cpp @@ -4,7 +4,7 @@ #include "cellFiber.h" -logs::channel cellFiber("cellFiber"); +LOG_CHANNEL(cellFiber); template <> void fmt_class_string::format(std::string& out, u64 arg) diff --git a/rpcs3/Emu/Cell/Modules/cellFont.cpp b/rpcs3/Emu/Cell/Modules/cellFont.cpp index 313205160c..bfa252d55f 100644 --- a/rpcs3/Emu/Cell/Modules/cellFont.cpp +++ b/rpcs3/Emu/Cell/Modules/cellFont.cpp @@ -8,13 +8,13 @@ #include "cellFont.h" -logs::channel cellFont("cellFont"); +LOG_CHANNEL(cellFont); // Functions s32 cellFontInitializeWithRevision(u64 revisionFlags, vm::ptr config) { cellFont.warning("cellFontInitializeWithRevision(revisionFlags=0x%llx, config=*0x%x)", revisionFlags, config); - + if (config->fc_size < 24) { return CELL_FONT_ERROR_INVALID_PARAMETER; @@ -90,7 +90,7 @@ s32 cellFontOpenFontset(ppu_thread& ppu, vm::ptr library, vm::p { cellFont.warning("cellFontOpenFontset: Only Unicode is supported"); } - + std::string file; switch((u32)fontType->type) { @@ -186,7 +186,7 @@ s32 cellFontSetFontOpenMode(u32 openMode) s32 cellFontCreateRenderer(vm::ptr library, vm::ptr config, vm::ptr Renderer) { cellFont.todo("cellFontCreateRenderer(library=*0x%x, config=*0x%x, Renderer=*0x%x)", library, config, Renderer); - + //Write data in Renderer return CELL_OK; @@ -255,7 +255,7 @@ s32 cellFontBindRenderer(vm::ptr font, vm::ptr rende s32 cellFontUnbindRenderer(vm::ptr font) { cellFont.warning("cellFontBindRenderer(font=*0x%x)", font); - + if (!font->renderer_addr) { return CELL_FONT_ERROR_RENDERER_UNBIND; @@ -403,7 +403,7 @@ s32 cellFontGetCharGlyphMetrics(vm::ptr font, u32 code, vm::ptrstbfont, font->scale_y); stbtt_GetCodepointBox(font->stbfont, code, &x0, &y0, &x1, &y1); stbtt_GetCodepointHMetrics(font->stbfont, code, &advanceWidth, &leftSideBearing); - + // TODO: Add the rest of the information metrics->width = (x1-x0) * scale; metrics->height = (y1-y0) * scale; diff --git a/rpcs3/Emu/Cell/Modules/cellFontFT.cpp b/rpcs3/Emu/Cell/Modules/cellFontFT.cpp index a5757fe472..41051c0c5a 100644 --- a/rpcs3/Emu/Cell/Modules/cellFontFT.cpp +++ b/rpcs3/Emu/Cell/Modules/cellFontFT.cpp @@ -3,7 +3,7 @@ #include "cellFontFT.h" -logs::channel cellFontFT("cellFontFT"); +LOG_CHANNEL(cellFontFT); s32 cellFontInitLibraryFreeTypeWithRevision(u64 revisionFlags, vm::ptr config, vm::pptr lib) { diff --git a/rpcs3/Emu/Cell/Modules/cellFs.cpp b/rpcs3/Emu/Cell/Modules/cellFs.cpp index 288581343b..5d2404e67f 100644 --- a/rpcs3/Emu/Cell/Modules/cellFs.cpp +++ b/rpcs3/Emu/Cell/Modules/cellFs.cpp @@ -13,7 +13,7 @@ -logs::channel cellFs("cellFs"); +LOG_CHANNEL(cellFs); error_code cellFsGetPath(u32 fd, vm::ptr out_path) { diff --git a/rpcs3/Emu/Cell/Modules/cellGame.cpp b/rpcs3/Emu/Cell/Modules/cellGame.cpp index bd253ad648..1b61cb66f1 100644 --- a/rpcs3/Emu/Cell/Modules/cellGame.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGame.cpp @@ -12,7 +12,7 @@ #include -logs::channel cellGame("cellGame"); +LOG_CHANNEL(cellGame); template<> void fmt_class_string::format(std::string& out, u64 arg) diff --git a/rpcs3/Emu/Cell/Modules/cellGameExec.cpp b/rpcs3/Emu/Cell/Modules/cellGameExec.cpp index aa0a3de7b1..96f82c32ed 100644 --- a/rpcs3/Emu/Cell/Modules/cellGameExec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGameExec.cpp @@ -3,7 +3,7 @@ #include "cellGame.h" -logs::channel cellGameExec("cellGameExec"); +LOG_CHANNEL(cellGameExec); s32 cellGameSetExitParam(u32 execdata) { diff --git a/rpcs3/Emu/Cell/Modules/cellGcmSys.cpp b/rpcs3/Emu/Cell/Modules/cellGcmSys.cpp index b6e86bb68e..aa22df2842 100644 --- a/rpcs3/Emu/Cell/Modules/cellGcmSys.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGcmSys.cpp @@ -10,7 +10,7 @@ #include -logs::channel cellGcmSys("cellGcmSys"); +LOG_CHANNEL(cellGcmSys); extern s32 cellGcmCallback(ppu_thread& ppu, vm::ptr context, u32 count); diff --git a/rpcs3/Emu/Cell/Modules/cellGem.cpp b/rpcs3/Emu/Cell/Modules/cellGem.cpp index aab532d661..944e7206a0 100644 --- a/rpcs3/Emu/Cell/Modules/cellGem.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGem.cpp @@ -8,7 +8,7 @@ #include "pad_thread.h" #include "Utilities/Timer.h" -logs::channel cellGem("cellGem"); +LOG_CHANNEL(cellGem); // ********************** // * HLE helper structs * diff --git a/rpcs3/Emu/Cell/Modules/cellGifDec.cpp b/rpcs3/Emu/Cell/Modules/cellGifDec.cpp index 10302f689e..6adf24ed09 100644 --- a/rpcs3/Emu/Cell/Modules/cellGifDec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGifDec.cpp @@ -9,7 +9,7 @@ #include "Emu/Cell/lv2/sys_fs.h" #include "cellGifDec.h" -logs::channel cellGifDec("cellGifDec"); +LOG_CHANNEL(cellGifDec); // cellGifDec aliases (only for cellGifDec.cpp) using PPMainHandle = vm::pptr; @@ -85,7 +85,7 @@ s32 cellGifDecReadHeader(PMainHandle mainHandle, PSubHandle subHandle, PInfo inf const u32& fd = subHandle->fd; const u64& fileSize = subHandle->fileSize; CellGifDecInfo& current_info = subHandle->info; - + // Write the header to buffer u8 buffer[13]; @@ -121,7 +121,7 @@ s32 cellGifDecReadHeader(PMainHandle mainHandle, PSubHandle subHandle, PInfo inf current_info.SPixelAspectRatio = buffer[12]; *info = current_info; - + return CELL_OK; } @@ -168,7 +168,7 @@ s32 cellGifDecDecodeData(PMainHandle mainHandle, PSubHandle subHandle, vm::ptrfd; const u64& fileSize = subHandle->fileSize; - const CellGifDecOutParam& current_outParam = subHandle->outParam; + const CellGifDecOutParam& current_outParam = subHandle->outParam; //Copy the GIF file to a buffer std::unique_ptr gif(new u8[fileSize]); @@ -251,14 +251,14 @@ s32 cellGifDecDecodeData(PMainHandle mainHandle, PSubHandle subHandle, vm::ptr> 24) | (val << 8); // set alpha (A8) as leftmost byte source_current++; dest_current++; } - memcpy(data.get_ptr(), img, image_size); + memcpy(data.get_ptr(), img, image_size); delete[] img; } } @@ -306,7 +306,7 @@ DECLARE(ppu_module_manager::cellGifDec)("cellGifDec", []() REG_FUNC(cellGifDec, cellGifDecDecodeData); REG_FUNC(cellGifDec, cellGifDecClose); REG_FUNC(cellGifDec, cellGifDecDestroy); - + REG_FUNC(cellGifDec, cellGifDecExtOpen); REG_FUNC(cellGifDec, cellGifDecExtReadHeader); REG_FUNC(cellGifDec, cellGifDecExtSetParameter); diff --git a/rpcs3/Emu/Cell/Modules/cellHttp.cpp b/rpcs3/Emu/Cell/Modules/cellHttp.cpp index 36ce3fc89b..7525579337 100644 --- a/rpcs3/Emu/Cell/Modules/cellHttp.cpp +++ b/rpcs3/Emu/Cell/Modules/cellHttp.cpp @@ -3,7 +3,7 @@ #include "cellHttp.h" -logs::channel cellHttp("cellHttp"); +LOG_CHANNEL(cellHttp); s32 cellHttpAuthCacheExport() { diff --git a/rpcs3/Emu/Cell/Modules/cellHttpUtil.cpp b/rpcs3/Emu/Cell/Modules/cellHttpUtil.cpp index 60d42132c1..40d6383376 100644 --- a/rpcs3/Emu/Cell/Modules/cellHttpUtil.cpp +++ b/rpcs3/Emu/Cell/Modules/cellHttpUtil.cpp @@ -11,7 +11,7 @@ #pragma comment(lib, "Winhttp.lib") #endif -logs::channel cellHttpUtil("cellHttpUtil"); +LOG_CHANNEL(cellHttpUtil); s32 cellHttpUtilParseUri(vm::ptr uri, vm::cptr str, vm::ptr pool, u32 size, vm::ptr required) { diff --git a/rpcs3/Emu/Cell/Modules/cellImeJp.cpp b/rpcs3/Emu/Cell/Modules/cellImeJp.cpp index 6eac492b76..2947b096e4 100644 --- a/rpcs3/Emu/Cell/Modules/cellImeJp.cpp +++ b/rpcs3/Emu/Cell/Modules/cellImeJp.cpp @@ -2,7 +2,7 @@ #include "Emu/Cell/PPUModule.h" #include "cellImeJp.h" -logs::channel cellImeJp("cellImeJp"); +LOG_CHANNEL(cellImeJp); // Return Codes enum diff --git a/rpcs3/Emu/Cell/Modules/cellJpgDec.cpp b/rpcs3/Emu/Cell/Modules/cellJpgDec.cpp index a5420e404f..c896bb4ead 100644 --- a/rpcs3/Emu/Cell/Modules/cellJpgDec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellJpgDec.cpp @@ -9,7 +9,7 @@ #include "Emu/Cell/lv2/sys_fs.h" #include "cellJpgDec.h" -logs::channel cellJpgDec("cellJpgDec"); +LOG_CHANNEL(cellJpgDec); s32 cellJpgDecCreate(u32 mainHandle, u32 threadInParam, u32 threadOutParam) { @@ -120,11 +120,11 @@ s32 cellJpgDecReadHeader(u32 mainHandle, u32 subHandle, vm::ptr if ((le_t&)(buffer[0]) != 0xE0FFD8FF || // Error: Not a valid SOI header (le_t&)(buffer[6]) != 0x4649464A) // Error: Not a valid JFIF string { - return CELL_JPGDEC_ERROR_HEADER; + return CELL_JPGDEC_ERROR_HEADER; } u32 i = 4; - + if(i >= fileSize) return CELL_JPGDEC_ERROR_HEADER; @@ -176,7 +176,7 @@ s32 cellJpgDecDecodeData(u32 mainHandle, u32 subHandle, vm::ptr data, vm::cp const u32& fd = subHandle_data->fd; const u64& fileSize = subHandle_data->fileSize; - const CellJpgDecOutParam& current_outParam = subHandle_data->outParam; + const CellJpgDecOutParam& current_outParam = subHandle_data->outParam; //Copy the JPG file to a buffer std::unique_ptr jpg(new u8[fileSize]); @@ -264,14 +264,14 @@ s32 cellJpgDecDecodeData(u32 mainHandle, u32 subHandle, vm::ptr data, vm::cp uint* img = (uint*)new char[image_size]; uint* source_current = (uint*)&(image.get()[0]); uint* dest_current = img; - for (uint i = 0; i < image_size / nComponents; i++) + for (uint i = 0; i < image_size / nComponents; i++) { uint val = *source_current; *dest_current = (val >> 24) | (val << 8); // set alpha (A8) as leftmost byte source_current++; dest_current++; } - memcpy(data.get_ptr(), img, image_size); + memcpy(data.get_ptr(), img, image_size); delete[] img; } } diff --git a/rpcs3/Emu/Cell/Modules/cellJpgEnc.cpp b/rpcs3/Emu/Cell/Modules/cellJpgEnc.cpp index 25e7f019ba..1e96b56681 100644 --- a/rpcs3/Emu/Cell/Modules/cellJpgEnc.cpp +++ b/rpcs3/Emu/Cell/Modules/cellJpgEnc.cpp @@ -3,7 +3,7 @@ #include "cellJpgEnc.h" -logs::channel cellJpgEnc("cellJpgEnc"); +LOG_CHANNEL(cellJpgEnc); s32 cellJpgEncQueryAttr() diff --git a/rpcs3/Emu/Cell/Modules/cellKey2char.cpp b/rpcs3/Emu/Cell/Modules/cellKey2char.cpp index 58bd287588..fe3d9ebbf1 100644 --- a/rpcs3/Emu/Cell/Modules/cellKey2char.cpp +++ b/rpcs3/Emu/Cell/Modules/cellKey2char.cpp @@ -3,7 +3,7 @@ -logs::channel cellKey2char("cellKey2char"); +LOG_CHANNEL(cellKey2char); // Return Codes enum CellKey2CharError : u32 diff --git a/rpcs3/Emu/Cell/Modules/cellL10n.cpp b/rpcs3/Emu/Cell/Modules/cellL10n.cpp index dc5f93945e..5b7a47a3d0 100644 --- a/rpcs3/Emu/Cell/Modules/cellL10n.cpp +++ b/rpcs3/Emu/Cell/Modules/cellL10n.cpp @@ -15,7 +15,7 @@ typedef const char *HostCode; #include "cellL10n.h" -logs::channel cellL10n("cellL10n"); +LOG_CHANNEL(cellL10n); // Translate code id to code name. some codepage may has another name. // If this makes your compilation fail, try replace the string code with one in "iconv -l" @@ -53,8 +53,8 @@ bool _L10nCodeParse(s32 code, HostCode& retCode) case L10N_CODEPAGE_866: retCode = 866; return true; case L10N_CODEPAGE_932: retCode = 932; return true; case L10N_CODEPAGE_936: retCode = 936; return true; // GBK - case L10N_GBK: retCode = 936; return true; - case L10N_CODEPAGE_949: retCode = 949; return true; // UHC + case L10N_GBK: retCode = 936; return true; + case L10N_CODEPAGE_949: retCode = 949; return true; // UHC case L10N_UHC: retCode = 949; return true; // UHC case L10N_CODEPAGE_950: retCode = 950; return true; case L10N_CODEPAGE_1251: retCode = 1251; return true; // CYRL @@ -409,7 +409,7 @@ s32 jis2sjis() s32 jstrnchk(vm::cptr src, s32 src_len) { u8 r = 0; - + for (u32 len = 0; len < src_len; len++) { if (src != vm::null) @@ -418,14 +418,14 @@ s32 jstrnchk(vm::cptr src, s32 src_len) { cellL10n.warning("jstrnchk: EUCJP (src=*0x%x, src_len=*0x%x)", src, src_len); r |= L10N_STR_EUCJP; - } - else if( ((*src >= 0x81 && *src <= 0x9f) || (*src >= 0xe0 && *src <= 0xfc)) || (*src >= 0x40 && *src <= 0xfc && *src != 0x7f) ) + } + else if( ((*src >= 0x81 && *src <= 0x9f) || (*src >= 0xe0 && *src <= 0xfc)) || (*src >= 0x40 && *src <= 0xfc && *src != 0x7f) ) { cellL10n.warning("jstrnchk: SJIS (src=*0x%x, src_len=*0x%x)", src, src_len); r |= L10N_STR_SJIS; } // ISO-2022-JP. (JIS X 0202) That's an inaccurate general range which (contains ASCII and UTF-8 characters?). - else if (*src >= 0x21 && *src <= 0x7e) + else if (*src >= 0x21 && *src <= 0x7e) { cellL10n.warning("jstrnchk: JIS (src=*0x%x, src_len=*0x%x)", src, src_len); r |= L10N_STR_JIS; @@ -437,7 +437,7 @@ s32 jstrnchk(vm::cptr src, s32 src_len) // TODO: // L10N_STR_ASCII // L10N_STR_UTF8 - + // L10N_STR_UNKNOWN // L10N_STR_ILLEGAL // L10N_STR_ERROR @@ -683,7 +683,7 @@ s32 EUCKRtoUHC() s32 UCS2toSJIS(u16 ch, vm::ptr dst) { cellL10n.todo("UCS2toSJIS(ch=%d, dst=*0x%x)", ch, dst); - // Should be L10N_UCS2 (16bit) not L10N_UTF8 (8bit) and L10N_SHIFT_JIS + // Should be L10N_UCS2 (16bit) not L10N_UTF8 (8bit) and L10N_SHIFT_JIS // return _L10nConvertCharNoResult(L10N_UTF8, &ch, sizeof(ch), L10N_CODEPAGE_932, dst); return 0; } diff --git a/rpcs3/Emu/Cell/Modules/cellLibprof.cpp b/rpcs3/Emu/Cell/Modules/cellLibprof.cpp index 5d176dc680..cc2f04429d 100644 --- a/rpcs3/Emu/Cell/Modules/cellLibprof.cpp +++ b/rpcs3/Emu/Cell/Modules/cellLibprof.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" #include "Emu/Cell/PPUModule.h" -logs::channel cellLibprof("cellLibprof"); +LOG_CHANNEL(cellLibprof); s32 cellUserTraceInit() { diff --git a/rpcs3/Emu/Cell/Modules/cellMic.cpp b/rpcs3/Emu/Cell/Modules/cellMic.cpp index fe3928828d..2c1be4507a 100644 --- a/rpcs3/Emu/Cell/Modules/cellMic.cpp +++ b/rpcs3/Emu/Cell/Modules/cellMic.cpp @@ -4,7 +4,7 @@ #include "cellMic.h" -logs::channel cellMic("cellMic"); +LOG_CHANNEL(cellMic); s32 cellMicInit() { diff --git a/rpcs3/Emu/Cell/Modules/cellMusic.cpp b/rpcs3/Emu/Cell/Modules/cellMusic.cpp index 3a312b2308..2b70b8264d 100644 --- a/rpcs3/Emu/Cell/Modules/cellMusic.cpp +++ b/rpcs3/Emu/Cell/Modules/cellMusic.cpp @@ -11,7 +11,7 @@ #include "cellMusic.h" -logs::channel cellMusic("cellMusic"); +LOG_CHANNEL(cellMusic); struct music_t { diff --git a/rpcs3/Emu/Cell/Modules/cellMusicDecode.cpp b/rpcs3/Emu/Cell/Modules/cellMusicDecode.cpp index fc6d99dbb6..44a89ea34c 100644 --- a/rpcs3/Emu/Cell/Modules/cellMusicDecode.cpp +++ b/rpcs3/Emu/Cell/Modules/cellMusicDecode.cpp @@ -10,7 +10,7 @@ -logs::channel cellMusicDecode("cellMusicDecode"); +LOG_CHANNEL(cellMusicDecode); // Return Codes enum diff --git a/rpcs3/Emu/Cell/Modules/cellMusicExport.cpp b/rpcs3/Emu/Cell/Modules/cellMusicExport.cpp index 380cdc811c..b1cf3729fb 100644 --- a/rpcs3/Emu/Cell/Modules/cellMusicExport.cpp +++ b/rpcs3/Emu/Cell/Modules/cellMusicExport.cpp @@ -4,7 +4,7 @@ -logs::channel cellMusicExport("cellMusicExport"); +LOG_CHANNEL(cellMusicExport); // Return Codes enum diff --git a/rpcs3/Emu/Cell/Modules/cellNetCtl.cpp b/rpcs3/Emu/Cell/Modules/cellNetCtl.cpp index 798551bd5f..b1f2e61865 100644 --- a/rpcs3/Emu/Cell/Modules/cellNetCtl.cpp +++ b/rpcs3/Emu/Cell/Modules/cellNetCtl.cpp @@ -8,7 +8,7 @@ #include "Utilities/StrUtil.h" -logs::channel cellNetCtl("cellNetCtl"); +LOG_CHANNEL(cellNetCtl); template <> void fmt_class_string::format(std::string& out, u64 arg) diff --git a/rpcs3/Emu/Cell/Modules/cellOskDialog.cpp b/rpcs3/Emu/Cell/Modules/cellOskDialog.cpp index 52c5346612..8de3500c6c 100644 --- a/rpcs3/Emu/Cell/Modules/cellOskDialog.cpp +++ b/rpcs3/Emu/Cell/Modules/cellOskDialog.cpp @@ -6,7 +6,7 @@ #include "cellOskDialog.h" #include "cellMsgDialog.h" -logs::channel cellOskDialog("cellOskDialog"); +LOG_CHANNEL(cellOskDialog); static char16_t s_osk_text[CELL_OSKDIALOG_STRING_SIZE]; @@ -133,7 +133,7 @@ s32 cellOskDialogSetLayoutMode(s32 layoutMode) s32 cellOskDialogGetInputText(vm::ptr OutputInfo) { cellOskDialog.warning("cellOskDialogGetInputText(OutputInfo=*0x%x)", OutputInfo); - return cellOskDialogUnloadAsync(OutputInfo); //Same but for use with cellOskDialogSetSeparateWindowOption(). TODO. + return cellOskDialogUnloadAsync(OutputInfo); //Same but for use with cellOskDialogSetSeparateWindowOption(). TODO. } s32 cellOskDialogExtInputDeviceUnlock() diff --git a/rpcs3/Emu/Cell/Modules/cellOvis.cpp b/rpcs3/Emu/Cell/Modules/cellOvis.cpp index 05593f449f..1681d6f3a3 100644 --- a/rpcs3/Emu/Cell/Modules/cellOvis.cpp +++ b/rpcs3/Emu/Cell/Modules/cellOvis.cpp @@ -4,7 +4,7 @@ -logs::channel cellOvis("cellOvis"); +LOG_CHANNEL(cellOvis); // Return Codes enum diff --git a/rpcs3/Emu/Cell/Modules/cellPamf.cpp b/rpcs3/Emu/Cell/Modules/cellPamf.cpp index e72a0bbe0e..30b900d0d8 100644 --- a/rpcs3/Emu/Cell/Modules/cellPamf.cpp +++ b/rpcs3/Emu/Cell/Modules/cellPamf.cpp @@ -12,7 +12,7 @@ bool squeue_test_exit() return Emu.IsStopped(); } -logs::channel cellPamf("cellPamf"); +LOG_CHANNEL(cellPamf); s32 pamfStreamTypeToEsFilterId(u8 type, u8 ch, CellCodecEsFilterId& pEsFilterId) { @@ -20,7 +20,7 @@ s32 pamfStreamTypeToEsFilterId(u8 type, u8 ch, CellCodecEsFilterId& pEsFilterId) verify(HERE), (ch < 16); pEsFilterId.supplementalInfo1 = type == CELL_PAMF_STREAM_TYPE_AVC; pEsFilterId.supplementalInfo2 = 0; - + switch (type) { case CELL_PAMF_STREAM_TYPE_AVC: @@ -38,7 +38,7 @@ s32 pamfStreamTypeToEsFilterId(u8 type, u8 ch, CellCodecEsFilterId& pEsFilterId) pEsFilterId.filterIdMinor = 0; break; } - + case CELL_PAMF_STREAM_TYPE_ATRAC3PLUS: { // code = 0xdc @@ -46,7 +46,7 @@ s32 pamfStreamTypeToEsFilterId(u8 type, u8 ch, CellCodecEsFilterId& pEsFilterId) pEsFilterId.filterIdMinor = ch; break; } - + case CELL_PAMF_STREAM_TYPE_PAMF_LPCM: { // code = 0x80 @@ -62,7 +62,7 @@ s32 pamfStreamTypeToEsFilterId(u8 type, u8 ch, CellCodecEsFilterId& pEsFilterId) pEsFilterId.filterIdMinor = 0x30 | ch; break; } - + case CELL_PAMF_STREAM_TYPE_USER_DATA: { // code = 0xdd @@ -102,7 +102,7 @@ s32 pamfStreamTypeToEsFilterId(u8 type, u8 ch, CellCodecEsFilterId& pEsFilterId) pEsFilterId.filterIdMinor = 0x20 | ch; break; } - + default: { cellPamf.error("pamfStreamTypeToEsFilterId(): unknown type (%d, ch=%d)", type, ch); @@ -149,13 +149,13 @@ u8 pamfGetStreamChannel(vm::ptr pSelf, u32 stream) verify(HERE), (header.fid_major & 0xf0) == 0xe0, header.fid_minor == 0; return header.fid_major % 16; } - + case 0xdc: // ATRAC3PLUS { verify(HERE), header.fid_major == 0xbd, (header.fid_minor & 0xf0) == 0; return header.fid_minor % 16; } - + case 0x80: // LPCM { verify(HERE), header.fid_major == 0xbd, (header.fid_minor & 0xf0) == 0x40; @@ -224,7 +224,7 @@ s32 cellPamfVerify(vm::ptr pAddr, u64 fileSize) s32 cellPamfReaderInitialize(vm::ptr pSelf, vm::cptr pAddr, u64 fileSize, u32 attribute) { cellPamf.warning("cellPamfReaderInitialize(pSelf=*0x%x, pAddr=*0x%x, fileSize=0x%llx, attribute=0x%x)", pSelf, pAddr, fileSize, attribute); - + if (fileSize) { pSelf->fileSize = fileSize; @@ -286,7 +286,7 @@ u8 cellPamfReaderGetNumberOfStreams(vm::ptr pSelf) u8 cellPamfReaderGetNumberOfSpecificStreams(vm::ptr pSelf, u8 streamType) { cellPamf.warning("cellPamfReaderGetNumberOfSpecificStreams(pSelf=*0x%x, streamType=%d)", pSelf, streamType); - + // cannot return error code u8 counts[256] = {}; @@ -307,12 +307,12 @@ u8 cellPamfReaderGetNumberOfSpecificStreams(vm::ptr pSelf, u8 st { return counts[streamType]; } - + case CELL_PAMF_STREAM_TYPE_VIDEO: { return counts[CELL_PAMF_STREAM_TYPE_AVC] + counts[CELL_PAMF_STREAM_TYPE_M2V]; } - + case CELL_PAMF_STREAM_TYPE_AUDIO: { return counts[CELL_PAMF_STREAM_TYPE_ATRAC3PLUS] + counts[CELL_PAMF_STREAM_TYPE_PAMF_LPCM] + counts[CELL_PAMF_STREAM_TYPE_AC3]; @@ -351,7 +351,7 @@ s32 cellPamfReaderSetStreamWithTypeAndChannel(vm::ptr pSelf, u8 for (u8 i = 0; i < pSelf->pAddr->stream_count; i++) { - if (pamfGetStreamType(pSelf, i) == streamType) + if (pamfGetStreamType(pSelf, i) == streamType) { if (pamfGetStreamChannel(pSelf, i) == ch) { @@ -388,7 +388,7 @@ s32 cellPamfReaderSetStreamWithTypeAndIndex(vm::ptr pSelf, u8 st } break; } - + case CELL_PAMF_STREAM_TYPE_AUDIO: { if (type == CELL_PAMF_STREAM_TYPE_ATRAC3PLUS || type == CELL_PAMF_STREAM_TYPE_AC3 || type == CELL_PAMF_STREAM_TYPE_PAMF_LPCM) @@ -397,7 +397,7 @@ s32 cellPamfReaderSetStreamWithTypeAndIndex(vm::ptr pSelf, u8 st } break; } - + default: { if (streamType > 5) @@ -425,7 +425,7 @@ s32 cellPamfStreamTypeToEsFilterId(u8 type, u8 ch, vm::ptr { return CELL_PAMF_ERROR_INVALID_ARG; } - + return pamfStreamTypeToEsFilterId(type, ch, *pEsFilterId); } @@ -524,7 +524,7 @@ s32 cellPamfReaderGetStreamInfo(vm::ptr pSelf, vm::ptr pIn info->transferCharacteristics = 0; info->matrixCoefficients = 0; } - + info->entropyCodingModeFlag = (header.AVC.x18 & 0x80) >> 7; info->deblockingFilterFlag = (header.AVC.x18 & 0x40) >> 6; info->minNumSlicePerPictureIdc = (header.AVC.x18 & 0x30) >> 4; @@ -534,7 +534,7 @@ s32 cellPamfReaderGetStreamInfo(vm::ptr pSelf, vm::ptr pIn cellPamf.notice("cellPamfReaderGetStreamInfo(): CELL_PAMF_STREAM_TYPE_AVC"); break; } - + case CELL_PAMF_STREAM_TYPE_M2V: { if (size < sizeof(CellPamfM2vInfo)) @@ -592,8 +592,8 @@ s32 cellPamfReaderGetStreamInfo(vm::ptr pSelf, vm::ptr pIn cellPamf.notice("cellPamfReaderGetStreamInfo(): CELL_PAMF_STREAM_TYPE_M2V"); break; } - - case CELL_PAMF_STREAM_TYPE_ATRAC3PLUS: + + case CELL_PAMF_STREAM_TYPE_ATRAC3PLUS: { if (size < sizeof(CellPamfAtrac3plusInfo)) { @@ -694,7 +694,7 @@ s32 cellPamfReaderGetStreamInfo(vm::ptr pSelf, vm::ptr pIn return CELL_PAMF_ERROR_INVALID_PAMF; } } - + return CELL_OK; } diff --git a/rpcs3/Emu/Cell/Modules/cellPhotoDecode.cpp b/rpcs3/Emu/Cell/Modules/cellPhotoDecode.cpp index 1ed03427c3..996fe1b9ef 100644 --- a/rpcs3/Emu/Cell/Modules/cellPhotoDecode.cpp +++ b/rpcs3/Emu/Cell/Modules/cellPhotoDecode.cpp @@ -4,7 +4,7 @@ -logs::channel cellPhotoDecode("cellPhotoDecode"); +LOG_CHANNEL(cellPhotoDecode); // Return Codes enum diff --git a/rpcs3/Emu/Cell/Modules/cellPhotoExport.cpp b/rpcs3/Emu/Cell/Modules/cellPhotoExport.cpp index 093e1ab158..f480bed437 100644 --- a/rpcs3/Emu/Cell/Modules/cellPhotoExport.cpp +++ b/rpcs3/Emu/Cell/Modules/cellPhotoExport.cpp @@ -4,7 +4,7 @@ -logs::channel cellPhotoExport("cellPhotoExport"); +LOG_CHANNEL(cellPhotoExport); // Return Codes enum diff --git a/rpcs3/Emu/Cell/Modules/cellPhotoImport.cpp b/rpcs3/Emu/Cell/Modules/cellPhotoImport.cpp index 126e6877f9..59a855dd41 100644 --- a/rpcs3/Emu/Cell/Modules/cellPhotoImport.cpp +++ b/rpcs3/Emu/Cell/Modules/cellPhotoImport.cpp @@ -5,7 +5,7 @@ -logs::channel cellPhotoImportUtil("cellPhotoImportUtil"); +LOG_CHANNEL(cellPhotoImportUtil); // Return Codes enum @@ -46,15 +46,15 @@ enum CellPhotoImportTexRot }; struct CellPhotoImportFileDataSub -{ +{ be_t width; be_t height; be_t format; be_t rotate; -}; +}; struct CellPhotoImportFileData -{ +{ char dstFileName[CELL_FS_MAX_FS_FILE_NAME_LENGTH]; char photo_title[CELL_PHOTO_IMPORT_PHOTO_TITLE_MAX_LENGTH * 3]; char game_title[CELL_PHOTO_IMPORT_GAME_TITLE_MAX_SIZE]; @@ -65,7 +65,7 @@ struct CellPhotoImportFileData }; struct CellPhotoImportSetParam -{ +{ be_t fileSizeMax; vm::bptr reserved1; vm::bptr reserved2; diff --git a/rpcs3/Emu/Cell/Modules/cellPngDec.cpp b/rpcs3/Emu/Cell/Modules/cellPngDec.cpp index 962f36f2e2..4698cc26e1 100644 --- a/rpcs3/Emu/Cell/Modules/cellPngDec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellPngDec.cpp @@ -19,7 +19,7 @@ typedef png_bytep iCCP_profile_type; typedef png_charp iCCP_profile_type; #endif -logs::channel cellPngDec("cellPngDec"); +LOG_CHANNEL(cellPngDec); // cellPngDec aliases to improve readability using PPHandle = vm::pptr; @@ -86,7 +86,7 @@ void pngDecReadBuffer(png_structp png_ptr, png_bytep out, png_size_t length) void pngDecRowCallback(png_structp png_ptr, png_bytep new_row, png_uint_32 row_num, int pass) { PngStream* stream = (PngStream*)png_get_progressive_ptr(png_ptr); - if (!stream) + if (!stream) { cellPngDec.error("Failed to obtain streamPtr in rowCallback."); return; @@ -98,9 +98,9 @@ void pngDecRowCallback(png_structp png_ptr, png_bytep new_row, png_uint_32 row_n if (stream->ppuContext && (stream->nextRow == row_num || pass > 0)) { - if (pass > 0 ) + if (pass > 0 ) { - stream->cbDispInfo->scanPassCount = pass; + stream->cbDispInfo->scanPassCount = pass; stream->cbDispInfo->nextOutputStartY = row_num; } else { @@ -113,7 +113,7 @@ void pngDecRowCallback(png_structp png_ptr, png_bytep new_row, png_uint_32 row_n stream->cbDispInfo->outputStartY = row_num; } u8* data; - if (pass > 0) + if (pass > 0) data = static_cast(stream->cbDispParam->nextOutputImage.get_ptr()); else data = static_cast(stream->cbDispParam->nextOutputImage.get_ptr()) + ((row_num - stream->cbDispInfo->outputStartY) * stream->cbDispInfo->outputFrameWidthByte); @@ -121,10 +121,10 @@ void pngDecRowCallback(png_structp png_ptr, png_bytep new_row, png_uint_32 row_n png_progressive_combine_row(png_ptr, data, new_row); } -void pngDecInfoCallback(png_structp png_ptr, png_infop info) +void pngDecInfoCallback(png_structp png_ptr, png_infop info) { PngStream* stream = (PngStream*)png_get_progressive_ptr(png_ptr); - if (!stream) + if (!stream) { cellPngDec.error("Failed to obtain streamPtr in rowCallback."); return; @@ -137,7 +137,7 @@ void pngDecInfoCallback(png_structp png_ptr, png_infop info) void pngDecEndCallback(png_structp png_ptr, png_infop info) { PngStream* stream = (PngStream*)png_get_progressive_ptr(png_ptr); - if (!stream) + if (!stream) { cellPngDec.error("Failed to obtain streamPtr in endCallback."); return; @@ -411,7 +411,7 @@ s32 pngDecOpen(ppu_thread& ppu, PHandle handle, PPStream png_stream, PSrc source { // Open a file stream fs::file file_stream(vfs::get(stream->source.fileName.get_ptr())); - + // Check if opening of the PNG file failed if (!file_stream) { @@ -475,7 +475,7 @@ s32 pngDecOpen(ppu_thread& ppu, PHandle handle, PPStream png_stream, PSrc source } // Set the custom read function for decoding - if (control_stream) + if (control_stream) { if (open_param && open_param->selectChunk != 0) fmt::throw_exception("Partial Decoding with selectChunk not supported yet."); @@ -486,7 +486,7 @@ s32 pngDecOpen(ppu_thread& ppu, PHandle handle, PPStream png_stream, PSrc source png_set_progressive_read_fn(stream->png_ptr, (void *)stream.get_ptr(), pngDecInfoCallback, pngDecRowCallback, pngDecEndCallback); // push header tag to libpng to keep us in sync - try + try { png_process_data(stream->png_ptr, stream->info_ptr, header, 8); } @@ -495,7 +495,7 @@ s32 pngDecOpen(ppu_thread& ppu, PHandle handle, PPStream png_stream, PSrc source return CELL_PNGDEC_ERROR_HEADER; } } - else + else { png_set_read_fn(stream->png_ptr, buffer.get_ptr(), pngDecReadBuffer); @@ -559,7 +559,7 @@ s32 pngDecSetParameter(PStream stream, PInParam in_param, POutParam out_param, P png_set_keep_unknown_chunks(stream->png_ptr, PNG_HANDLE_CHUNK_IF_SAFE, 0, 0); // Scale 16 bit depth down to 8 bit depth. - if (stream->info.bitDepth == 16 && in_param->outputBitDepth == 8) + if (stream->info.bitDepth == 16 && in_param->outputBitDepth == 8) { // PS3 uses png_set_strip_16, since png_set_scale_16 wasn't available back then. png_set_strip_16(stream->png_ptr); @@ -570,24 +570,24 @@ s32 pngDecSetParameter(PStream stream, PInParam in_param, POutParam out_param, P cellPngDec.error("Output depth of 16 with non input depth of 16 specified!"); if (in_param->commandPtr != vm::null) cellPngDec.warning("Ignoring CommandPtr."); - - if (stream->info.colorSpace != in_param->outputColorSpace) + + if (stream->info.colorSpace != in_param->outputColorSpace) { - // check if we need to set alpha + // check if we need to set alpha const bool inputHasAlpha = cellPngColorSpaceHasAlpha(stream->info.colorSpace); const bool outputWantsAlpha = cellPngColorSpaceHasAlpha(in_param->outputColorSpace); - if (outputWantsAlpha && !inputHasAlpha) + if (outputWantsAlpha && !inputHasAlpha) { if (in_param->outputAlphaSelect == CELL_PNGDEC_FIX_ALPHA) png_set_add_alpha(stream->png_ptr, in_param->outputColorAlpha, in_param->outputColorSpace == CELL_PNGDEC_ARGB ? PNG_FILLER_BEFORE : PNG_FILLER_AFTER); - else + else { // Check if we can steal the alpha from a trns block if (png_get_valid(stream->png_ptr, stream->info_ptr, PNG_INFO_tRNS)) png_set_tRNS_to_alpha(stream->png_ptr); // if not, just set default of 0xff - else + else png_set_add_alpha(stream->png_ptr, 0xff, in_param->outputColorSpace == CELL_PNGDEC_ARGB ? PNG_FILLER_BEFORE : PNG_FILLER_AFTER); } } @@ -606,21 +606,21 @@ s32 pngDecSetParameter(PStream stream, PInParam in_param, POutParam out_param, P if (stream->info.colorSpace == CELL_PNGDEC_PALETTE) png_set_palette_to_rgb(stream->png_ptr); if ((stream->info.colorSpace == CELL_PNGDEC_GRAYSCALE || stream->info.colorSpace == CELL_PNGDEC_GRAYSCALE_ALPHA) - && stream->info.bitDepth < 8) + && stream->info.bitDepth < 8) png_set_expand_gray_1_2_4_to_8(stream->png_ptr); } // grayscale output - else + else { if (stream->info.colorSpace == CELL_PNGDEC_ARGB || stream->info.colorSpace == CELL_PNGDEC_RGBA - || stream->info.colorSpace == CELL_PNGDEC_RGB) + || stream->info.colorSpace == CELL_PNGDEC_RGB) { png_set_rgb_to_gray(stream->png_ptr, PNG_ERROR_ACTION_NONE, PNG_RGB_TO_GRAY_DEFAULT, PNG_RGB_TO_GRAY_DEFAULT); } else { - // not sure what to do here + // not sure what to do here cellPngDec.error("Grayscale / Palette to Grayscale / Palette conversion currently unsupported."); } } @@ -645,7 +645,7 @@ s32 pngDecSetParameter(PStream stream, PInParam in_param, POutParam out_param, P // Set the memory usage. We currently don't actually allocate memory for libpng through the callbacks, due to libpng needing a lot more memory compared to PS3 variant. stream->out_param.useMemorySpace = 0; - if (extra_in_param) + if (extra_in_param) { if (extra_in_param->bufferMode != CELL_PNGDEC_LINE_MODE) { @@ -664,14 +664,14 @@ s32 pngDecSetParameter(PStream stream, PInParam in_param, POutParam out_param, P { if (stream->outputCounts == 0) extra_out_param->outputHeight = stream->out_param.outputHeight; - else + else extra_out_param->outputHeight = std::min(stream->outputCounts, stream->out_param.outputHeight.value()); extra_out_param->outputWidthByte = stream->out_param.outputWidthByte; } } *out_param = stream->out_param; - + return CELL_OK; } @@ -729,7 +729,7 @@ s32 pngDecodeData(ppu_thread& ppu, PHandle handle, PStream stream, vm::ptr d if (stream->buffer->length > stream->buffer->cursor) { u8* data = static_cast(stream->buffer->data.get_ptr()) + stream->buffer->cursor; - try + try { png_process_data(stream->png_ptr, stream->info_ptr, data, stream->buffer->length - stream->buffer->cursor); } @@ -747,7 +747,7 @@ s32 pngDecodeData(ppu_thread& ppu, PHandle handle, PStream stream, vm::ptr d { stream->cbCtrlStream.cbCtrlStrmFunc(ppu, streamInfo, streamParam, stream->cbCtrlStream.cbCtrlStrmArg); streamInfo->decodedStrmSize += streamParam->strmSize; - try + try { png_process_data(stream->png_ptr, stream->info_ptr, static_cast(streamParam->strmPtr.get_ptr()), streamParam->strmSize); } @@ -767,7 +767,7 @@ s32 pngDecodeData(ppu_thread& ppu, PHandle handle, PStream stream, vm::ptr d // Decode the image // todo: commandptr - try + try { for (int j = 0; j < stream->passes; j++) { @@ -862,7 +862,7 @@ s32 cellPngDecExtReadHeader(PHandle handle, PStream stream, PInfo info, PExtInfo // lets push what we have so far u8* data = static_cast(stream->buffer->data.get_ptr()) + stream->buffer->cursor; - try + try { png_process_data(stream->png_ptr, stream->info_ptr, data, stream->buffer->length); } diff --git a/rpcs3/Emu/Cell/Modules/cellPngEnc.cpp b/rpcs3/Emu/Cell/Modules/cellPngEnc.cpp index 45a47a4ede..a1efb70795 100644 --- a/rpcs3/Emu/Cell/Modules/cellPngEnc.cpp +++ b/rpcs3/Emu/Cell/Modules/cellPngEnc.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" #include "Emu/Cell/PPUModule.h" -logs::channel cellPngEnc("cellPngEnc"); +LOG_CHANNEL(cellPngEnc); // Error Codes enum diff --git a/rpcs3/Emu/Cell/Modules/cellPrint.cpp b/rpcs3/Emu/Cell/Modules/cellPrint.cpp index 95f696e7d6..89d4f713cc 100644 --- a/rpcs3/Emu/Cell/Modules/cellPrint.cpp +++ b/rpcs3/Emu/Cell/Modules/cellPrint.cpp @@ -4,7 +4,7 @@ #include "Emu/Cell/PPUModule.h" #include "cellSysutil.h" -logs::channel cellPrint("cellPrint"); +LOG_CHANNEL(cellPrint); // Error Codes enum diff --git a/rpcs3/Emu/Cell/Modules/cellRec.cpp b/rpcs3/Emu/Cell/Modules/cellRec.cpp index 5a4f4d9338..c5d1d5351b 100644 --- a/rpcs3/Emu/Cell/Modules/cellRec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellRec.cpp @@ -5,7 +5,7 @@ -logs::channel cellRec("cellRec"); +LOG_CHANNEL(cellRec); enum { diff --git a/rpcs3/Emu/Cell/Modules/cellRemotePlay.cpp b/rpcs3/Emu/Cell/Modules/cellRemotePlay.cpp index a637c67aff..d07aef0868 100644 --- a/rpcs3/Emu/Cell/Modules/cellRemotePlay.cpp +++ b/rpcs3/Emu/Cell/Modules/cellRemotePlay.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" #include "Emu/Cell/PPUModule.h" -logs::channel cellRemotePlay("cellRemotePlay"); +LOG_CHANNEL(cellRemotePlay); s32 cellRemotePlayGetStatus() { diff --git a/rpcs3/Emu/Cell/Modules/cellResc.cpp b/rpcs3/Emu/Cell/Modules/cellResc.cpp index bf9d3b25ce..8f12a6bfdb 100644 --- a/rpcs3/Emu/Cell/Modules/cellResc.cpp +++ b/rpcs3/Emu/Cell/Modules/cellResc.cpp @@ -6,7 +6,7 @@ #include "Emu/RSX/GCM.h" #include "cellResc.h" -logs::channel cellResc("cellResc"); +LOG_CHANNEL(cellResc); s32 cellRescInit(vm::ptr initConfig) { diff --git a/rpcs3/Emu/Cell/Modules/cellRtc.cpp b/rpcs3/Emu/Cell/Modules/cellRtc.cpp index 7e3225436e..0277fcf179 100644 --- a/rpcs3/Emu/Cell/Modules/cellRtc.cpp +++ b/rpcs3/Emu/Cell/Modules/cellRtc.cpp @@ -3,11 +3,11 @@ #include "cellRtc.h" -logs::channel cellRtc("cellRtc"); +LOG_CHANNEL(cellRtc); s64 convertToUNIXTime(u16 seconds, u16 minutes, u16 hours, u16 days, s32 years) { - return (s64)seconds + (s64)minutes * 60 + (s64)hours * 3600 + (s64)days * 86400 + + return (s64)seconds + (s64)minutes * 60 + (s64)hours * 3600 + (s64)days * 86400 + (s64)(years - 70) * 31536000 + (s64)((years - 69) / 4) * 86400 - (s64)((years - 1) / 100) * 86400 + (s64)((years + 299) / 400) * 86400; } @@ -58,14 +58,14 @@ s32 cellRtcFormatRfc2822LocalTime(vm::ptr pszDateTime, vm::ptr pszDateTime, vm::ptr pUtc, s32 iTimeZone) { cellRtc.todo("cellRtcFormatRfc3339(pszDateTime=*0x%x, pUtc=*0x%x, iTimeZone=%d)", pszDateTime, pUtc, iTimeZone); - + return CELL_OK; } s32 cellRtcFormatRfc3339LocalTime(vm::ptr pszDateTime, vm::ptr pUtc) { cellRtc.todo("cellRtcFormatRfc3339LocalTime(pszDateTime=*0x%x, pUtc=*0x%x)", pszDateTime, pUtc); - + return CELL_OK; } @@ -93,7 +93,7 @@ s32 cellRtcGetTick(vm::ptr pTime, vm::ptr pTick) s32 cellRtcSetTick(vm::ptr pTime, vm::ptr pTick) { cellRtc.todo("cellRtcSetTick(pTime=*0x%x, pTick=*0x%x)", pTime, pTick); - + return CELL_OK; } @@ -107,7 +107,7 @@ s32 cellRtcTickAddTicks(vm::ptr pTick0, vm::ptr pTick1 s32 cellRtcTickAddMicroseconds(vm::ptr pTick0, vm::ptr pTick1, s64 lAdd) { cellRtc.todo("cellRtcTickAddMicroseconds(pTick0=*0x%x, pTick1=*0x%x, lAdd=%lld)", pTick0, pTick1, lAdd); - + return CELL_OK; } @@ -121,7 +121,7 @@ s32 cellRtcTickAddSeconds(vm::ptr pTick0, vm::ptr pTic s32 cellRtcTickAddMinutes(vm::ptr pTick0, vm::ptr pTick1, s64 lAdd) { cellRtc.todo("cellRtcTickAddMinutes(pTick0=*0x%x, pTick1=*0x%x, lAdd=%lld)", pTick0, pTick1, lAdd); - + return CELL_OK; } diff --git a/rpcs3/Emu/Cell/Modules/cellRtcAlarm.cpp b/rpcs3/Emu/Cell/Modules/cellRtcAlarm.cpp index 4b5f30c3c5..5015436312 100644 --- a/rpcs3/Emu/Cell/Modules/cellRtcAlarm.cpp +++ b/rpcs3/Emu/Cell/Modules/cellRtcAlarm.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" #include "Emu/Cell/PPUModule.h" -logs::channel cellRtcAlarm("cellRtcAlarm"); +LOG_CHANNEL(cellRtcAlarm); s32 cellRtcAlarmRegister() { diff --git a/rpcs3/Emu/Cell/Modules/cellRudp.cpp b/rpcs3/Emu/Cell/Modules/cellRudp.cpp index 4a813349b0..e773815465 100644 --- a/rpcs3/Emu/Cell/Modules/cellRudp.cpp +++ b/rpcs3/Emu/Cell/Modules/cellRudp.cpp @@ -5,7 +5,7 @@ #include "cellRudp.h" -logs::channel cellRudp("cellRudp"); +LOG_CHANNEL(cellRudp); struct rudp_t { diff --git a/rpcs3/Emu/Cell/Modules/cellSail.cpp b/rpcs3/Emu/Cell/Modules/cellSail.cpp index 4864b0e62e..143fb19e75 100644 --- a/rpcs3/Emu/Cell/Modules/cellSail.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSail.cpp @@ -5,7 +5,7 @@ #include "cellSail.h" #include "cellPamf.h" -logs::channel cellSail("cellSail"); +LOG_CHANNEL(cellSail); s32 cellSailMemAllocatorInitialize(vm::ptr pSelf, vm::ptr pCallbacks) { @@ -86,7 +86,7 @@ s32 cellSailDescriptorSetAutoSelection(vm::ptr pSelf, b8 aut s32 cellSailDescriptorIsAutoSelection(vm::ptr pSelf) { cellSail.warning("cellSailDescriptorIsAutoSelection(pSelf=*0x%x)", pSelf); - + if (pSelf) { return pSelf->autoSelection; @@ -787,7 +787,7 @@ s32 cellSailPlayerAddDescriptor(vm::ptr pSelf, vm::ptr pSelf, s32 streamType, vm::ptr pMediaInfo, vm::cptr pUri, vm::pptr ppDesc) { cellSail.todo("cellSailPlayerCreateDescriptor(pSelf=*0x%x, streamType=%d, pMediaInfo=*0x%x, pUri=%s, ppDesc=**0x%x)", pSelf, streamType, pMediaInfo, pUri, ppDesc); - + u32 descriptorAddress = vm::alloc(sizeof(CellSailDescriptor), vm::main); auto descriptor = vm::ptr::make(descriptorAddress); *ppDesc = descriptor; diff --git a/rpcs3/Emu/Cell/Modules/cellSailRec.cpp b/rpcs3/Emu/Cell/Modules/cellSailRec.cpp index dc4c5b267f..4bb158681d 100644 --- a/rpcs3/Emu/Cell/Modules/cellSailRec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSailRec.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" #include "Emu/Cell/PPUModule.h" -logs::channel cellSailRec("cellSailRec"); +LOG_CHANNEL(cellSailRec); // Error Codes enum diff --git a/rpcs3/Emu/Cell/Modules/cellSaveData.cpp b/rpcs3/Emu/Cell/Modules/cellSaveData.cpp index 9b0897487a..b2e106518a 100644 --- a/rpcs3/Emu/Cell/Modules/cellSaveData.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSaveData.cpp @@ -11,7 +11,7 @@ #include #include -logs::channel cellSaveData("cellSaveData"); +LOG_CHANNEL(cellSaveData); SaveDialogBase::~SaveDialogBase() { diff --git a/rpcs3/Emu/Cell/Modules/cellScreenshot.cpp b/rpcs3/Emu/Cell/Modules/cellScreenshot.cpp index f0f67d88fa..17a01edb86 100644 --- a/rpcs3/Emu/Cell/Modules/cellScreenshot.cpp +++ b/rpcs3/Emu/Cell/Modules/cellScreenshot.cpp @@ -6,7 +6,7 @@ -logs::channel cellScreenshot("cellScreenshot"); +LOG_CHANNEL(cellScreenshot); s32 cellScreenShotSetParameter(vm::cptr param) { diff --git a/rpcs3/Emu/Cell/Modules/cellSearch.cpp b/rpcs3/Emu/Cell/Modules/cellSearch.cpp index f27b7e3abe..67668d45b5 100644 --- a/rpcs3/Emu/Cell/Modules/cellSearch.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSearch.cpp @@ -7,7 +7,7 @@ #include "cellSearch.h" -logs::channel cellSearch("cellSearch"); +LOG_CHANNEL(cellSearch); template<> void fmt_class_string::format(std::string& out, u64 arg) diff --git a/rpcs3/Emu/Cell/Modules/cellSheap.cpp b/rpcs3/Emu/Cell/Modules/cellSheap.cpp index d8228a2711..fe8ac83558 100644 --- a/rpcs3/Emu/Cell/Modules/cellSheap.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSheap.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" #include "Emu/Cell/PPUModule.h" -logs::channel cellSheap("cellSheap"); +LOG_CHANNEL(cellSheap); // Return Codes enum diff --git a/rpcs3/Emu/Cell/Modules/cellSpudll.cpp b/rpcs3/Emu/Cell/Modules/cellSpudll.cpp index 3295732921..d2d8b12ae1 100644 --- a/rpcs3/Emu/Cell/Modules/cellSpudll.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSpudll.cpp @@ -5,7 +5,7 @@ -logs::channel cellSpudll("cellSpudll"); +LOG_CHANNEL(cellSpudll); template<> void fmt_class_string::format(std::string& out, u64 arg) diff --git a/rpcs3/Emu/Cell/Modules/cellSpurs.cpp b/rpcs3/Emu/Cell/Modules/cellSpurs.cpp index 8827959f2b..b5c78614e3 100644 --- a/rpcs3/Emu/Cell/Modules/cellSpurs.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSpurs.cpp @@ -15,7 +15,7 @@ #include "sysPrxForUser.h" #include "cellSpurs.h" -logs::channel cellSpurs("cellSpurs"); +LOG_CHANNEL(cellSpurs); error_code sys_spu_image_close(vm::ptr img); @@ -234,7 +234,7 @@ namespace _spurs { // Create task s32 create_task(vm::ptr taskset, vm::ptr task_id, vm::cptr elf, vm::cptr context, u32 size, vm::ptr ls_pattern, vm::ptr arg); - + // Start task s32 task_start(ppu_thread& ppu, vm::ptr taskset, u32 taskId); } @@ -1194,7 +1194,7 @@ s32 _spurs::initialize(ppu_thread& ppu, vm::ptr spurs, u32 revision, } spurs->traceBuffer = vm::null; - // TODO: Register libprof for user trace + // TODO: Register libprof for user trace // Initialise the event port multiplexor _spurs::init_event_port_mux(spurs.ptr(&CellSpurs::eventPortMux), spurs->spuPort, spurs->eventPort, 3); @@ -1210,7 +1210,7 @@ s32 _spurs::initialize(ppu_thread& ppu, vm::ptr spurs, u32 revision, return cellSpursWakeUp(ppu, spurs); } - return CELL_OK; + return CELL_OK; } /// Initialize SPURS @@ -2047,7 +2047,7 @@ s32 _cellSpursWorkloadAttributeInitialize(vm::ptr at { return CELL_SPURS_POLICY_MODULE_ERROR_INVAL; } - + memset(attr.get_ptr(), 0, sizeof(CellSpursWorkloadAttribute)); attr->revision = revision; attr->sdkVersion = sdkVersion; @@ -2121,7 +2121,7 @@ s32 _spurs::add_workload(vm::ptr spurs, vm::ptr wid, vm::cptrflags1 & SF1_32_WORKLOADS ? 0x20u : 0x10u; // TODO: check if can be changed spurs->wklEnabled.atomic_op([spurs, wmax, &wnum](be_t& value) @@ -2349,7 +2349,7 @@ s32 cellSpursWakeUp(ppu_thread& ppu, vm::ptr spurs) { _spurs::signal_to_handler_thread(ppu, spurs); } - + return CELL_OK; } @@ -2763,7 +2763,7 @@ s32 cellSpursEventFlagSet(ppu_thread& ppu, vm::ptr eventFlag // Unblock the waiting SPU task if either all the bits being waited by the task have been set or // if the wait mode of the task is OR and atleast one bit the thread is waiting on has been set - if ((eventFlag->spuTaskWaitMask[i] & ~spuTaskRelevantEvents) == 0 || + if ((eventFlag->spuTaskWaitMask[i] & ~spuTaskRelevantEvents) == 0 || (((eventFlag->spuTaskWaitMode >> j) & 0x0001) == CELL_SPURS_EVENT_FLAG_OR && spuTaskRelevantEvents != 0)) { eventsToClear |= spuTaskRelevantEvents; @@ -3560,13 +3560,13 @@ s32 cellSpursCreateTask(ppu_thread& ppu, vm::ptr taskset, vm:: } auto rc = _spurs::create_task(taskset, taskId, elf, context, size, lsPattern, argument); - if (rc != CELL_OK) + if (rc != CELL_OK) { return rc; } rc = _spurs::task_start(ppu, taskset, *taskId); - if (rc != CELL_OK) + if (rc != CELL_OK) { return rc; } @@ -4138,7 +4138,7 @@ s32 cellSpursSemaphoreGetTasksetAddress() DECLARE(ppu_module_manager::cellSpurs)("cellSpurs", []() { - // Core + // Core REG_FUNC(cellSpurs, cellSpursInitialize); REG_FUNC(cellSpurs, cellSpursInitializeWithAttribute); REG_FUNC(cellSpurs, cellSpursInitializeWithAttribute2); @@ -4235,7 +4235,7 @@ DECLARE(ppu_module_manager::cellSpurs)("cellSpurs", []() REG_FUNC(cellSpurs, cellSpursJobGuardInitialize); REG_FUNC(cellSpurs, cellSpursJobGuardNotify); REG_FUNC(cellSpurs, cellSpursJobGuardReset); - + // LFQueue REG_FUNC(cellSpurs, _cellSpursLFQueueInitialize); REG_FUNC(cellSpurs, _cellSpursLFQueuePushBody); diff --git a/rpcs3/Emu/Cell/Modules/cellSpursJq.cpp b/rpcs3/Emu/Cell/Modules/cellSpursJq.cpp index 4c7d521efd..b5d85f2d5c 100644 --- a/rpcs3/Emu/Cell/Modules/cellSpursJq.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSpursJq.cpp @@ -8,7 +8,7 @@ #include "cellSpurs.h" #include "cellSpursJq.h" -logs::channel cellSpursJq("cellSpursJq"); +LOG_CHANNEL(cellSpursJq); s32 cellSpursJobQueueAttributeInitialize() { diff --git a/rpcs3/Emu/Cell/Modules/cellSsl.cpp b/rpcs3/Emu/Cell/Modules/cellSsl.cpp index 832d09d057..0ed91ad13e 100644 --- a/rpcs3/Emu/Cell/Modules/cellSsl.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSsl.cpp @@ -7,7 +7,7 @@ #include "Utilities/File.h" #include "Emu/VFS.h" -logs::channel cellSsl("cellSsl"); +LOG_CHANNEL(cellSsl); diff --git a/rpcs3/Emu/Cell/Modules/cellSubDisplay.cpp b/rpcs3/Emu/Cell/Modules/cellSubDisplay.cpp index 0b686a20bb..e2155cca63 100644 --- a/rpcs3/Emu/Cell/Modules/cellSubDisplay.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSubDisplay.cpp @@ -3,7 +3,7 @@ #include "cellSubDisplay.h" -logs::channel cellSubDisplay("cellSubDisplay"); +LOG_CHANNEL(cellSubDisplay); template<> void fmt_class_string::format(std::string& out, u64 arg) diff --git a/rpcs3/Emu/Cell/Modules/cellSync.cpp b/rpcs3/Emu/Cell/Modules/cellSync.cpp index 06d21222ba..933b383ab7 100644 --- a/rpcs3/Emu/Cell/Modules/cellSync.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSync.cpp @@ -6,7 +6,7 @@ #include "Emu/Cell/lv2/sys_process.h" #include "cellSync.h" -logs::channel cellSync("cellSync"); +LOG_CHANNEL(cellSync); template<> void fmt_class_string::format(std::string& out, u64 arg) @@ -516,7 +516,7 @@ error_code cellSyncQueuePop(ppu_thread& ppu, vm::ptr queue, vm::p } const u32 depth = queue->check_depth(); - + u32 position; while (!queue->ctrl.atomic_op(&CellSyncQueue::try_pop_begin, depth, &position)) @@ -549,7 +549,7 @@ error_code cellSyncQueueTryPop(vm::ptr queue, vm::ptr buffe const u32 depth = queue->check_depth(); u32 position; - + if (!queue->ctrl.atomic_op(&CellSyncQueue::try_pop_begin, depth, &position)) { return not_an_error(CELL_SYNC_ERROR_BUSY); diff --git a/rpcs3/Emu/Cell/Modules/cellSync2.cpp b/rpcs3/Emu/Cell/Modules/cellSync2.cpp index 8b0bf58ad1..1b8447e4a8 100644 --- a/rpcs3/Emu/Cell/Modules/cellSync2.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSync2.cpp @@ -6,7 +6,7 @@ #include "Utilities/StrUtil.h" -logs::channel cellSync2("cellSync2"); +LOG_CHANNEL(cellSync2); vm::gvar gCellSync2CallerThreadTypePpuThread; vm::gvar gCellSync2NotifierPpuThread; diff --git a/rpcs3/Emu/Cell/Modules/cellSysconf.cpp b/rpcs3/Emu/Cell/Modules/cellSysconf.cpp index a59e23e70b..5e9038ca35 100644 --- a/rpcs3/Emu/Cell/Modules/cellSysconf.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSysconf.cpp @@ -4,7 +4,7 @@ #include "cellSysconf.h" -logs::channel cellSysconf("cellSysconf"); +LOG_CHANNEL(cellSysconf); s32 cellSysconfAbort() { diff --git a/rpcs3/Emu/Cell/Modules/cellSysmodule.cpp b/rpcs3/Emu/Cell/Modules/cellSysmodule.cpp index 0c3a9f8925..52e32c88de 100644 --- a/rpcs3/Emu/Cell/Modules/cellSysmodule.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSysmodule.cpp @@ -2,7 +2,7 @@ #include "Emu/System.h" #include "Emu/Cell/PPUModule.h" -logs::channel cellSysmodule("cellSysmodule"); +LOG_CHANNEL(cellSysmodule); enum { @@ -321,7 +321,7 @@ s32 cellSysmoduleUnloadModule(u16 id) // m->Unload(); //} - + return CELL_OK; } diff --git a/rpcs3/Emu/Cell/Modules/cellSysutil.cpp b/rpcs3/Emu/Cell/Modules/cellSysutil.cpp index f29a6939d5..549753cc67 100644 --- a/rpcs3/Emu/Cell/Modules/cellSysutil.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSysutil.cpp @@ -10,7 +10,7 @@ #include #include -logs::channel cellSysutil("cellSysutil"); +LOG_CHANNEL(cellSysutil); struct sysutil_cb_manager { diff --git a/rpcs3/Emu/Cell/Modules/cellSysutilAp.cpp b/rpcs3/Emu/Cell/Modules/cellSysutilAp.cpp index 66dca3633b..1b36b80a53 100644 --- a/rpcs3/Emu/Cell/Modules/cellSysutilAp.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSysutilAp.cpp @@ -3,7 +3,7 @@ -logs::channel cellSysutilAp("cellSysutilAp"); +LOG_CHANNEL(cellSysutilAp); // Return Codes enum diff --git a/rpcs3/Emu/Cell/Modules/cellSysutilAvc.cpp b/rpcs3/Emu/Cell/Modules/cellSysutilAvc.cpp index 951fb700ca..1469c370bc 100644 --- a/rpcs3/Emu/Cell/Modules/cellSysutilAvc.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSysutilAvc.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" #include "Emu/Cell/PPUModule.h" -logs::channel cellSysutilAvc("cellSysutilAvc"); +LOG_CHANNEL(cellSysutilAvc); s32 cellSysutilAvcByeRequest() { diff --git a/rpcs3/Emu/Cell/Modules/cellSysutilAvc2.cpp b/rpcs3/Emu/Cell/Modules/cellSysutilAvc2.cpp index 9ec1736f07..6d63c04c3a 100644 --- a/rpcs3/Emu/Cell/Modules/cellSysutilAvc2.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSysutilAvc2.cpp @@ -5,7 +5,7 @@ #include "sceNp2.h" #include "cellSysutilAvc2.h" -logs::channel cellSysutilAvc2("cellSysutilAvc2"); +LOG_CHANNEL(cellSysutilAvc2); template<> void fmt_class_string::format(std::string& out, u64 arg) diff --git a/rpcs3/Emu/Cell/Modules/cellSysutilMisc.cpp b/rpcs3/Emu/Cell/Modules/cellSysutilMisc.cpp index e807d52ae7..e009f8e0bc 100644 --- a/rpcs3/Emu/Cell/Modules/cellSysutilMisc.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSysutilMisc.cpp @@ -2,7 +2,7 @@ #include "Emu/System.h" #include "Emu/Cell/PPUModule.h" -logs::channel cellSysutilMisc("cellSysutilMisc"); +LOG_CHANNEL(cellSysutilMisc); // License areas enum diff --git a/rpcs3/Emu/Cell/Modules/cellSysutilNpEula.cpp b/rpcs3/Emu/Cell/Modules/cellSysutilNpEula.cpp index e809c51770..dc783aef40 100644 --- a/rpcs3/Emu/Cell/Modules/cellSysutilNpEula.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSysutilNpEula.cpp @@ -2,7 +2,7 @@ #include "Emu/System.h" #include "Emu/Cell/PPUModule.h" -logs::channel cellSysutilNpEula("cellSysutilNpEula"); +LOG_CHANNEL(cellSysutilNpEula); s32 cellSysutilNpEula_59D1629A() // Resistance 3, Uncharted 2 { diff --git a/rpcs3/Emu/Cell/Modules/cellUsbd.cpp b/rpcs3/Emu/Cell/Modules/cellUsbd.cpp index 0babda3438..d0b8b93fca 100644 --- a/rpcs3/Emu/Cell/Modules/cellUsbd.cpp +++ b/rpcs3/Emu/Cell/Modules/cellUsbd.cpp @@ -3,7 +3,7 @@ #include "Emu/Cell/PPUModule.h" #include "cellUsbd.h" -logs::channel cellUsbd("cellUsbd"); +LOG_CHANNEL(cellUsbd); s32 cellUsbdInit() { diff --git a/rpcs3/Emu/Cell/Modules/cellUsbpspcm.cpp b/rpcs3/Emu/Cell/Modules/cellUsbpspcm.cpp index a302dcfea0..ccd4cae8bb 100644 --- a/rpcs3/Emu/Cell/Modules/cellUsbpspcm.cpp +++ b/rpcs3/Emu/Cell/Modules/cellUsbpspcm.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" #include "Emu/Cell/PPUModule.h" -logs::channel cellUsbPspcm("cellUsbPspcm"); +LOG_CHANNEL(cellUsbPspcm); // Return Codes enum diff --git a/rpcs3/Emu/Cell/Modules/cellUserInfo.cpp b/rpcs3/Emu/Cell/Modules/cellUserInfo.cpp index c1aba93045..64f72f3498 100644 --- a/rpcs3/Emu/Cell/Modules/cellUserInfo.cpp +++ b/rpcs3/Emu/Cell/Modules/cellUserInfo.cpp @@ -7,7 +7,7 @@ #include "Utilities/StrUtil.h" #include "cellSysutil.h" -logs::channel cellUserInfo("cellUserInfo"); +LOG_CHANNEL(cellUserInfo); template<> void fmt_class_string::format(std::string& out, u64 arg) diff --git a/rpcs3/Emu/Cell/Modules/cellVdec.cpp b/rpcs3/Emu/Cell/Modules/cellVdec.cpp index 3c2f4ab03d..e030bd3dd9 100644 --- a/rpcs3/Emu/Cell/Modules/cellVdec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellVdec.cpp @@ -22,7 +22,7 @@ extern "C" std::mutex g_mutex_avcodec_open2; -logs::channel cellVdec("cellVdec"); +LOG_CHANNEL(cellVdec); vm::gvar _cell_vdec_prx_ver; // ??? @@ -345,7 +345,7 @@ struct vdec_thread : ppu_thread // Hack cellVdec.error("Unsupported time_base.num (%d/%d, tpf=%d)", ctx->time_base.den, ctx->time_base.num, ctx->ticks_per_frame); amend = u64{90000} / 30; - frame.frc = CELL_VDEC_FRC_30; + frame.frc = CELL_VDEC_FRC_30; } next_pts += amend; diff --git a/rpcs3/Emu/Cell/Modules/cellVideoExport.cpp b/rpcs3/Emu/Cell/Modules/cellVideoExport.cpp index 360fa39451..d3a8cdd83b 100644 --- a/rpcs3/Emu/Cell/Modules/cellVideoExport.cpp +++ b/rpcs3/Emu/Cell/Modules/cellVideoExport.cpp @@ -5,7 +5,7 @@ -logs::channel cellVideoExport("cellVideoExport"); +LOG_CHANNEL(cellVideoExport); struct CellVideoExportSetParam { diff --git a/rpcs3/Emu/Cell/Modules/cellVideoUpload.cpp b/rpcs3/Emu/Cell/Modules/cellVideoUpload.cpp index 54de45608e..974f1cb41c 100644 --- a/rpcs3/Emu/Cell/Modules/cellVideoUpload.cpp +++ b/rpcs3/Emu/Cell/Modules/cellVideoUpload.cpp @@ -4,7 +4,7 @@ #include "cellVideoUpload.h" #include "cellSysutil.h" -logs::channel cellVideoUpload("cellVideoUpload"); +LOG_CHANNEL(cellVideoUpload); error_code cellVideoUploadInitialize(vm::cptr pParam, vm::ptr cb, vm::ptr userdata) { diff --git a/rpcs3/Emu/Cell/Modules/cellVoice.cpp b/rpcs3/Emu/Cell/Modules/cellVoice.cpp index 91f912f189..8da8a74389 100644 --- a/rpcs3/Emu/Cell/Modules/cellVoice.cpp +++ b/rpcs3/Emu/Cell/Modules/cellVoice.cpp @@ -4,7 +4,7 @@ #include "cellVoice.h" -logs::channel cellVoice("cellVoice"); +LOG_CHANNEL(cellVoice); s32 cellVoiceConnectIPortToOPort() diff --git a/rpcs3/Emu/Cell/Modules/cellVpost.cpp b/rpcs3/Emu/Cell/Modules/cellVpost.cpp index 9465a0b4c0..6110b84d7b 100644 --- a/rpcs3/Emu/Cell/Modules/cellVpost.cpp +++ b/rpcs3/Emu/Cell/Modules/cellVpost.cpp @@ -10,7 +10,7 @@ extern "C" #include "cellVpost.h" -logs::channel cellVpost("cellVpost"); +LOG_CHANNEL(cellVpost); s32 cellVpostQueryAttr(vm::cptr cfgParam, vm::ptr attr) { diff --git a/rpcs3/Emu/Cell/Modules/cell_FreeType2.cpp b/rpcs3/Emu/Cell/Modules/cell_FreeType2.cpp index 67f0b5c0ff..a897396d0c 100644 --- a/rpcs3/Emu/Cell/Modules/cell_FreeType2.cpp +++ b/rpcs3/Emu/Cell/Modules/cell_FreeType2.cpp @@ -2,7 +2,7 @@ #include "Emu/System.h" #include "Emu/Cell/PPUModule.h" -logs::channel cell_FreeType2("cell_FreeType2"); +LOG_CHANNEL(cell_FreeType2); // Functions s32 cellFreeType2Ex() diff --git a/rpcs3/Emu/Cell/Modules/libmedi.cpp b/rpcs3/Emu/Cell/Modules/libmedi.cpp index 47ac4e3420..4c3a7ed92a 100644 --- a/rpcs3/Emu/Cell/Modules/libmedi.cpp +++ b/rpcs3/Emu/Cell/Modules/libmedi.cpp @@ -2,7 +2,7 @@ #include "Emu/System.h" #include "Emu/Cell/PPUModule.h" -logs::channel libmedi("libmedi"); +LOG_CHANNEL(libmedi); s32 cellMediatorCloseContext() { diff --git a/rpcs3/Emu/Cell/Modules/libmixer.cpp b/rpcs3/Emu/Cell/Modules/libmixer.cpp index 1cdb7aae81..4068fd3b88 100644 --- a/rpcs3/Emu/Cell/Modules/libmixer.cpp +++ b/rpcs3/Emu/Cell/Modules/libmixer.cpp @@ -11,7 +11,7 @@ #include #include -logs::channel libmixer("libmixer"); +LOG_CHANNEL(libmixer); struct SurMixerConfig { @@ -91,7 +91,7 @@ s32 cellAANAddData(u32 aan_handle, u32 aan_port, u32 offset, vm::ptr addr const float center = addr[i]; g_surmx.mixdata[i * 8 + 0] += center; g_surmx.mixdata[i * 8 + 1] += center; - } + } } else if (type == CELL_SURMIXER_CHSTRIP_TYPE2A) { @@ -132,7 +132,7 @@ s32 cellAANAddData(u32 aan_handle, u32 aan_port, u32 offset, vm::ptr addr } } - return CELL_OK; + return CELL_OK; } s32 cellAANConnect(u32 receive, u32 receivePortNo, u32 source, u32 sourcePortNo) @@ -170,7 +170,7 @@ s32 cellAANDisconnect(u32 receive, u32 receivePortNo, u32 source, u32 sourcePort return CELL_OK; } - + s32 cellSSPlayerCreate(vm::ptr handle, vm::ptr config) { libmixer.warning("cellSSPlayerCreate(handle=*0x%x, config=*0x%x)", handle, config); @@ -188,7 +188,7 @@ s32 cellSSPlayerCreate(vm::ptr handle, vm::ptr config) p.m_connected = false; p.m_active = false; p.m_channels = config->channels; - + g_ssp.push_back(p); *handle = (u32)g_ssp.size() - 1; return CELL_OK; @@ -292,7 +292,7 @@ s32 cellSSPlayerSetParam(u32 handle, vm::ptr info) } // TODO: check parameters - + g_ssp[handle].m_level = info->level; g_ssp[handle].m_speed = info->speed; g_ssp[handle].m_x = info->position.x; @@ -301,7 +301,7 @@ s32 cellSSPlayerSetParam(u32 handle, vm::ptr info) return CELL_OK; } - + s32 cellSSPlayerGetState(u32 handle) { libmixer.warning("cellSSPlayerGetState(handle=0x%x)", handle); diff --git a/rpcs3/Emu/Cell/Modules/libsnd3.cpp b/rpcs3/Emu/Cell/Modules/libsnd3.cpp index 6223ac7d06..769f2cde9c 100644 --- a/rpcs3/Emu/Cell/Modules/libsnd3.cpp +++ b/rpcs3/Emu/Cell/Modules/libsnd3.cpp @@ -3,7 +3,7 @@ #include "libsnd3.h" -logs::channel libsnd3("libsnd3"); +LOG_CHANNEL(libsnd3); s32 cellSnd3Init(u32 maxVoice, u32 samples, vm::ptr queue) { diff --git a/rpcs3/Emu/Cell/Modules/libsynth2.cpp b/rpcs3/Emu/Cell/Modules/libsynth2.cpp index 425c63c6ae..9c518d00d6 100644 --- a/rpcs3/Emu/Cell/Modules/libsynth2.cpp +++ b/rpcs3/Emu/Cell/Modules/libsynth2.cpp @@ -5,7 +5,7 @@ -logs::channel libsynth2("libsynth2"); +LOG_CHANNEL(libsynth2); s32 cellSoundSynth2Config(s16 param, s32 value) { diff --git a/rpcs3/Emu/Cell/Modules/sceNp.cpp b/rpcs3/Emu/Cell/Modules/sceNp.cpp index 6a8b2f0c0a..c71a905253 100644 --- a/rpcs3/Emu/Cell/Modules/sceNp.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNp.cpp @@ -10,7 +10,7 @@ #include "sceNp.h" #include "cellSysutil.h" -logs::channel sceNp("sceNp"); +LOG_CHANNEL(sceNp); s32 g_psn_connection_status = SCE_NP_MANAGER_STATUS_OFFLINE; @@ -89,7 +89,7 @@ s32 npDrmIsAvailable(vm::cptr k_licensee_addr, vm::cptr drm_path) sceNp.error("npDrmIsAvailable(): Failed to verify sce file %s", enc_drm_path); return SCE_NP_DRM_ERROR_NO_ENTITLEMENT; } - + } else if (magic == "NPD\0"_u32) { @@ -204,7 +204,7 @@ s32 sceNpDrmProcessExitSpawn(ppu_thread& ppu, vm::cptr klicensee, vm::cptr klicensee, vm::cptr path, vm::cpptr argv, vm::cpptr envp, u32 data, u32 data_size, s32 prio, u64 flags) { sceNp.warning("sceNpDrmProcessExitSpawn2(klicensee=*0x%x, path=%s, argv=**0x%x, envp=**0x%x, data=*0x%x, data_size=0x%x, prio=%d, flags=0x%x)", klicensee, path, argv, envp, data, data_size, prio, flags); - + if (s32 error = npDrmIsAvailable(klicensee, path)) { return error; @@ -1190,12 +1190,12 @@ s32 sceNpManagerRequestTicket() s32 sceNpManagerRequestTicket2() { UNIMPLEMENTED_FUNC(sceNp); - + if (g_psn_connection_status == SCE_NP_MANAGER_STATUS_OFFLINE) { return SCE_NP_ERROR_OFFLINE; } - + return CELL_OK; } diff --git a/rpcs3/Emu/Cell/Modules/sceNp2.cpp b/rpcs3/Emu/Cell/Modules/sceNp2.cpp index cd6a038a57..5f030f7068 100644 --- a/rpcs3/Emu/Cell/Modules/sceNp2.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNp2.cpp @@ -4,7 +4,7 @@ #include "sceNp.h" #include "sceNp2.h" -logs::channel sceNp2("sceNp2"); +LOG_CHANNEL(sceNp2); s32 sceNp2Init(u32 poolsize, vm::ptr poolptr) { diff --git a/rpcs3/Emu/Cell/Modules/sceNpClans.cpp b/rpcs3/Emu/Cell/Modules/sceNpClans.cpp index 03d3e317b1..e3d7daca27 100644 --- a/rpcs3/Emu/Cell/Modules/sceNpClans.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNpClans.cpp @@ -5,7 +5,7 @@ #include "sceNp.h" #include "sceNpClans.h" -logs::channel sceNpClans("sceNpClans"); +LOG_CHANNEL(sceNpClans); s32 sceNpClansInit(vm::ptr commId, vm::ptr passphrase, vm::ptr pool, vm::ptr poolSize, u32 flags) { diff --git a/rpcs3/Emu/Cell/Modules/sceNpCommerce2.cpp b/rpcs3/Emu/Cell/Modules/sceNpCommerce2.cpp index 8e4fd0fc7f..1dbb2feb06 100644 --- a/rpcs3/Emu/Cell/Modules/sceNpCommerce2.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNpCommerce2.cpp @@ -3,7 +3,7 @@ #include "sceNpCommerce2.h" -logs::channel sceNpCommerce2("sceNpCommerce2"); +LOG_CHANNEL(sceNpCommerce2); s32 sceNpCommerce2ExecuteStoreBrowse() { diff --git a/rpcs3/Emu/Cell/Modules/sceNpMatchingInt.cpp b/rpcs3/Emu/Cell/Modules/sceNpMatchingInt.cpp index 569920a50d..3b2d112216 100644 --- a/rpcs3/Emu/Cell/Modules/sceNpMatchingInt.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNpMatchingInt.cpp @@ -4,7 +4,7 @@ -logs::channel sceNpMatchingInt("sceNpMatchingInt"); +LOG_CHANNEL(sceNpMatchingInt); s32 sceNpMatchingGetRoomMemberList() { diff --git a/rpcs3/Emu/Cell/Modules/sceNpSns.cpp b/rpcs3/Emu/Cell/Modules/sceNpSns.cpp index f97c65ee36..28951e6d69 100644 --- a/rpcs3/Emu/Cell/Modules/sceNpSns.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNpSns.cpp @@ -4,7 +4,7 @@ #include "sceNpSns.h" -logs::channel sceNpSns("sceNpSns"); +LOG_CHANNEL(sceNpSns); template<> void fmt_class_string::format(std::string& out, u64 arg) diff --git a/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp b/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp index 0784f4982e..0599d43c9c 100644 --- a/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp @@ -14,7 +14,7 @@ #include "Utilities/StrUtil.h" -logs::channel sceNpTrophy("sceNpTrophy"); +LOG_CHANNEL(sceNpTrophy); TrophyNotificationBase::~TrophyNotificationBase() { diff --git a/rpcs3/Emu/Cell/Modules/sceNpTus.cpp b/rpcs3/Emu/Cell/Modules/sceNpTus.cpp index 056d6c5102..9dd8de22ab 100644 --- a/rpcs3/Emu/Cell/Modules/sceNpTus.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNpTus.cpp @@ -4,7 +4,7 @@ #include "sceNp.h" #include "sceNpTus.h" -logs::channel sceNpTus("sceNpTus"); +LOG_CHANNEL(sceNpTus); s32 sceNpTusInit() { diff --git a/rpcs3/Emu/Cell/Modules/sceNpUtil.cpp b/rpcs3/Emu/Cell/Modules/sceNpUtil.cpp index 0253780533..0dc924f80a 100644 --- a/rpcs3/Emu/Cell/Modules/sceNpUtil.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNpUtil.cpp @@ -4,7 +4,7 @@ #include "sceNp.h" #include "sceNpUtil.h" -logs::channel sceNpUtil("sceNpUtil"); +LOG_CHANNEL(sceNpUtil); s32 sceNpUtilBandwidthTestInitStart(u32 prio, size_t stack) { diff --git a/rpcs3/Emu/Cell/Modules/sysPrxForUser.cpp b/rpcs3/Emu/Cell/Modules/sysPrxForUser.cpp index a8b512aad6..8e0b5c511a 100644 --- a/rpcs3/Emu/Cell/Modules/sysPrxForUser.cpp +++ b/rpcs3/Emu/Cell/Modules/sysPrxForUser.cpp @@ -9,7 +9,7 @@ #include "Emu/Cell/lv2/sys_tty.h" #include "sysPrxForUser.h" -logs::channel sysPrxForUser("sysPrxForUser"); +LOG_CHANNEL(sysPrxForUser); extern u64 get_system_time(); diff --git a/rpcs3/Emu/Cell/Modules/sys_io.cpp b/rpcs3/Emu/Cell/Modules/sys_io.cpp index 845f10957d..0ffde3687b 100644 --- a/rpcs3/Emu/Cell/Modules/sys_io.cpp +++ b/rpcs3/Emu/Cell/Modules/sys_io.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" #include "Emu/Cell/PPUModule.h" -logs::channel sys_io("sys_io"); +LOG_CHANNEL(sys_io); extern void cellPad_init(); extern void cellKb_init(); diff --git a/rpcs3/Emu/Cell/Modules/sys_libc.cpp b/rpcs3/Emu/Cell/Modules/sys_libc.cpp index 7f4bf9635e..edadbcbf74 100644 --- a/rpcs3/Emu/Cell/Modules/sys_libc.cpp +++ b/rpcs3/Emu/Cell/Modules/sys_libc.cpp @@ -5,7 +5,7 @@ -logs::channel sys_libc("sys_libc"); +LOG_CHANNEL(sys_libc); void sys_libc_memcpy(vm::ptr dst, vm::cptr src, u32 size) { diff --git a/rpcs3/Emu/Cell/Modules/sys_lv2dbg.cpp b/rpcs3/Emu/Cell/Modules/sys_lv2dbg.cpp index c461ad1364..853228fe7d 100644 --- a/rpcs3/Emu/Cell/Modules/sys_lv2dbg.cpp +++ b/rpcs3/Emu/Cell/Modules/sys_lv2dbg.cpp @@ -5,7 +5,7 @@ #include "sys_lv2dbg.h" -logs::channel sys_lv2dbg("sys_lv2dbg"); +LOG_CHANNEL(sys_lv2dbg); template <> void fmt_class_string::format(std::string& out, u64 arg) diff --git a/rpcs3/Emu/Cell/Modules/sys_net_.cpp b/rpcs3/Emu/Cell/Modules/sys_net_.cpp index 95bf687575..f94a580f24 100644 --- a/rpcs3/Emu/Cell/Modules/sys_net_.cpp +++ b/rpcs3/Emu/Cell/Modules/sys_net_.cpp @@ -6,7 +6,7 @@ -logs::channel libnet("libnet"); +LOG_CHANNEL(libnet); struct sys_net_tls_data { diff --git a/rpcs3/Emu/Cell/lv2/sys_cond.cpp b/rpcs3/Emu/Cell/lv2/sys_cond.cpp index 37edec6038..bb1cd7f66c 100644 --- a/rpcs3/Emu/Cell/lv2/sys_cond.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_cond.cpp @@ -11,7 +11,7 @@ -logs::channel sys_cond("sys_cond"); +LOG_CHANNEL(sys_cond); template<> DECLARE(ipc_manager::g_ipc) {}; diff --git a/rpcs3/Emu/Cell/lv2/sys_dbg.cpp b/rpcs3/Emu/Cell/lv2/sys_dbg.cpp index f3952b59d1..01bf476c1c 100644 --- a/rpcs3/Emu/Cell/lv2/sys_dbg.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_dbg.cpp @@ -5,7 +5,7 @@ #include "sys_dbg.h" #include "Emu/Cell/Modules/sys_lv2dbg.h" -logs::channel sys_dbg("sys_dbg"); +LOG_CHANNEL(sys_dbg); error_code sys_dbg_read_process_memory(s32 pid, u32 address, u32 size, vm::ptr data) { diff --git a/rpcs3/Emu/Cell/lv2/sys_event.cpp b/rpcs3/Emu/Cell/lv2/sys_event.cpp index a449e28b79..2c520e762a 100644 --- a/rpcs3/Emu/Cell/lv2/sys_event.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_event.cpp @@ -12,7 +12,7 @@ -logs::channel sys_event("sys_event"); +LOG_CHANNEL(sys_event); template<> DECLARE(ipc_manager::g_ipc) {}; diff --git a/rpcs3/Emu/Cell/lv2/sys_event_flag.cpp b/rpcs3/Emu/Cell/lv2/sys_event_flag.cpp index 0f03444c37..d084438a69 100644 --- a/rpcs3/Emu/Cell/lv2/sys_event_flag.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_event_flag.cpp @@ -12,7 +12,7 @@ -logs::channel sys_event_flag("sys_event_flag"); +LOG_CHANNEL(sys_event_flag); template<> DECLARE(ipc_manager::g_ipc) {}; diff --git a/rpcs3/Emu/Cell/lv2/sys_fs.cpp b/rpcs3/Emu/Cell/lv2/sys_fs.cpp index 72fa688835..eed04f3ce7 100644 --- a/rpcs3/Emu/Cell/lv2/sys_fs.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_fs.cpp @@ -11,7 +11,7 @@ -logs::channel sys_fs("sys_fs"); +LOG_CHANNEL(sys_fs); struct lv2_fs_mount_point { diff --git a/rpcs3/Emu/Cell/lv2/sys_gamepad.cpp b/rpcs3/Emu/Cell/lv2/sys_gamepad.cpp index b1af71a926..4a479ce210 100644 --- a/rpcs3/Emu/Cell/lv2/sys_gamepad.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_gamepad.cpp @@ -9,7 +9,7 @@ -logs::channel sys_gamepad("sys_gamepad"); +LOG_CHANNEL(sys_gamepad); u32 sys_gamepad_ycon_initalize(vm::ptr in, vm::ptr out) { diff --git a/rpcs3/Emu/Cell/lv2/sys_interrupt.cpp b/rpcs3/Emu/Cell/lv2/sys_interrupt.cpp index 4685248345..86ee683de9 100644 --- a/rpcs3/Emu/Cell/lv2/sys_interrupt.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_interrupt.cpp @@ -10,7 +10,7 @@ -logs::channel sys_interrupt("sys_interrupt"); +LOG_CHANNEL(sys_interrupt); void lv2_int_serv::exec() { diff --git a/rpcs3/Emu/Cell/lv2/sys_lwcond.cpp b/rpcs3/Emu/Cell/lv2/sys_lwcond.cpp index ada6da2861..9f82a707c5 100644 --- a/rpcs3/Emu/Cell/lv2/sys_lwcond.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_lwcond.cpp @@ -10,7 +10,7 @@ -logs::channel sys_lwcond("sys_lwcond"); +LOG_CHANNEL(sys_lwcond); extern u64 get_system_time(); diff --git a/rpcs3/Emu/Cell/lv2/sys_lwmutex.cpp b/rpcs3/Emu/Cell/lv2/sys_lwmutex.cpp index cc0137bf8e..24d2ef4984 100644 --- a/rpcs3/Emu/Cell/lv2/sys_lwmutex.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_lwmutex.cpp @@ -9,7 +9,7 @@ -logs::channel sys_lwmutex("sys_lwmutex"); +LOG_CHANNEL(sys_lwmutex); extern u64 get_system_time(); diff --git a/rpcs3/Emu/Cell/lv2/sys_memory.cpp b/rpcs3/Emu/Cell/lv2/sys_memory.cpp index e598e7d820..71cba08916 100644 --- a/rpcs3/Emu/Cell/lv2/sys_memory.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_memory.cpp @@ -3,7 +3,7 @@ #include "Emu/IdManager.h" #include "sys_memory.h" -logs::channel sys_memory("sys_memory"); +LOG_CHANNEL(sys_memory); lv2_memory_alloca::lv2_memory_alloca(u32 size, u32 align, u64 flags, const std::shared_ptr& ct) : size(size) diff --git a/rpcs3/Emu/Cell/lv2/sys_mmapper.cpp b/rpcs3/Emu/Cell/lv2/sys_mmapper.cpp index 5c33825b4f..730a1dbfff 100644 --- a/rpcs3/Emu/Cell/lv2/sys_mmapper.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_mmapper.cpp @@ -6,7 +6,7 @@ #include "sys_memory.h" #include "sys_mmapper.h" -logs::channel sys_mmapper("sys_mmapper"); +LOG_CHANNEL(sys_mmapper); lv2_memory::lv2_memory(u32 size, u32 align, u64 flags, const std::shared_ptr& ct) : size(size) diff --git a/rpcs3/Emu/Cell/lv2/sys_mutex.cpp b/rpcs3/Emu/Cell/lv2/sys_mutex.cpp index 9801912ebd..28a870202a 100644 --- a/rpcs3/Emu/Cell/lv2/sys_mutex.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_mutex.cpp @@ -10,7 +10,7 @@ -logs::channel sys_mutex("sys_mutex"); +LOG_CHANNEL(sys_mutex); template<> DECLARE(ipc_manager::g_ipc) {}; diff --git a/rpcs3/Emu/Cell/lv2/sys_net.cpp b/rpcs3/Emu/Cell/lv2/sys_net.cpp index 55ac7d89a2..aae0f1a4f0 100644 --- a/rpcs3/Emu/Cell/lv2/sys_net.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_net.cpp @@ -26,7 +26,7 @@ -logs::channel sys_net("sys_net"); +LOG_CHANNEL(sys_net); static std::vector s_to_awake; diff --git a/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp b/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp index 9cedff77d9..ab97b21f21 100644 --- a/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp @@ -11,7 +11,7 @@ -logs::channel sys_ppu_thread("sys_ppu_thread"); +LOG_CHANNEL(sys_ppu_thread); void _sys_ppu_thread_exit(ppu_thread& ppu, u64 errorcode) { diff --git a/rpcs3/Emu/Cell/lv2/sys_process.cpp b/rpcs3/Emu/Cell/lv2/sys_process.cpp index 1f3f5b7acc..a706e16f2c 100644 --- a/rpcs3/Emu/Cell/lv2/sys_process.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_process.cpp @@ -25,7 +25,7 @@ -logs::channel sys_process("sys_process"); +LOG_CHANNEL(sys_process); u32 g_ps3_sdk_version; diff --git a/rpcs3/Emu/Cell/lv2/sys_prx.cpp b/rpcs3/Emu/Cell/lv2/sys_prx.cpp index 6422aaf098..44980dc627 100644 --- a/rpcs3/Emu/Cell/lv2/sys_prx.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_prx.cpp @@ -16,7 +16,7 @@ extern std::shared_ptr ppu_load_prx(const ppu_prx_object&, const std::s extern void ppu_unload_prx(const lv2_prx& prx); extern void ppu_initialize(const ppu_module&); -logs::channel sys_prx("sys_prx"); +LOG_CHANNEL(sys_prx); static const std::unordered_map s_prx_ignore { diff --git a/rpcs3/Emu/Cell/lv2/sys_rsx.cpp b/rpcs3/Emu/Cell/lv2/sys_rsx.cpp index 788402e573..eb6db1715e 100644 --- a/rpcs3/Emu/Cell/lv2/sys_rsx.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_rsx.cpp @@ -9,7 +9,7 @@ #include "sys_event.h" -logs::channel sys_rsx("sys_rsx"); +LOG_CHANNEL(sys_rsx); extern u64 get_timebased_time(); diff --git a/rpcs3/Emu/Cell/lv2/sys_rwlock.cpp b/rpcs3/Emu/Cell/lv2/sys_rwlock.cpp index 9a83fbe559..10f33770f6 100644 --- a/rpcs3/Emu/Cell/lv2/sys_rwlock.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_rwlock.cpp @@ -10,7 +10,7 @@ -logs::channel sys_rwlock("sys_rwlock"); +LOG_CHANNEL(sys_rwlock); template<> DECLARE(ipc_manager::g_ipc) {}; diff --git a/rpcs3/Emu/Cell/lv2/sys_semaphore.cpp b/rpcs3/Emu/Cell/lv2/sys_semaphore.cpp index bc0766248d..9ea7e210dd 100644 --- a/rpcs3/Emu/Cell/lv2/sys_semaphore.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_semaphore.cpp @@ -10,7 +10,7 @@ -logs::channel sys_semaphore("sys_semaphore"); +LOG_CHANNEL(sys_semaphore); template<> DECLARE(ipc_manager::g_ipc) {}; diff --git a/rpcs3/Emu/Cell/lv2/sys_spu.cpp b/rpcs3/Emu/Cell/lv2/sys_spu.cpp index eb4c4e24d9..4d0561d3c5 100644 --- a/rpcs3/Emu/Cell/lv2/sys_spu.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_spu.cpp @@ -17,7 +17,7 @@ -logs::channel sys_spu("sys_spu"); +LOG_CHANNEL(sys_spu); void sys_spu_image::load(const fs::file& stream) { diff --git a/rpcs3/Emu/Cell/lv2/sys_ss.cpp b/rpcs3/Emu/Cell/lv2/sys_ss.cpp index aa76c39e15..4a5ac822f7 100644 --- a/rpcs3/Emu/Cell/lv2/sys_ss.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_ss.cpp @@ -30,7 +30,7 @@ const HCRYPTPROV s_crypto_provider = []() -> HCRYPTPROV -logs::channel sys_ss("sys_ss"); +LOG_CHANNEL(sys_ss); error_code sys_ss_random_number_generator(u32 arg1, vm::ptr buf, u64 size) { diff --git a/rpcs3/Emu/Cell/lv2/sys_time.cpp b/rpcs3/Emu/Cell/lv2/sys_time.cpp index c99bc94256..2af01bd2b5 100644 --- a/rpcs3/Emu/Cell/lv2/sys_time.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_time.cpp @@ -105,7 +105,7 @@ static int clock_gettime(int clk_id, struct timespec* tp) -logs::channel sys_time("sys_time"); +LOG_CHANNEL(sys_time); static const u64 g_timebase_freq = /*79800000*/ 80000000; // 80 Mhz diff --git a/rpcs3/Emu/Cell/lv2/sys_timer.cpp b/rpcs3/Emu/Cell/lv2/sys_timer.cpp index a71da1a9ce..3df2ff98a0 100644 --- a/rpcs3/Emu/Cell/lv2/sys_timer.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_timer.cpp @@ -13,7 +13,7 @@ -logs::channel sys_timer("sys_timer"); +LOG_CHANNEL(sys_timer); extern u64 get_system_time(); diff --git a/rpcs3/Emu/Cell/lv2/sys_trace.cpp b/rpcs3/Emu/Cell/lv2/sys_trace.cpp index 9dc76af187..1f251bcec1 100644 --- a/rpcs3/Emu/Cell/lv2/sys_trace.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_trace.cpp @@ -7,7 +7,7 @@ -logs::channel sys_trace("sys_trace"); +LOG_CHANNEL(sys_trace); s32 sys_trace_create() { diff --git a/rpcs3/Emu/Cell/lv2/sys_tty.cpp b/rpcs3/Emu/Cell/lv2/sys_tty.cpp index 7953515353..2788d9b372 100644 --- a/rpcs3/Emu/Cell/lv2/sys_tty.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_tty.cpp @@ -4,7 +4,7 @@ #include #include -logs::channel sys_tty("sys_tty"); +LOG_CHANNEL(sys_tty); extern fs::file g_tty; extern atomic_t g_tty_size; diff --git a/rpcs3/Emu/Cell/lv2/sys_usbd.cpp b/rpcs3/Emu/Cell/lv2/sys_usbd.cpp index 9195bd9994..99ef850799 100644 --- a/rpcs3/Emu/Cell/lv2/sys_usbd.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_usbd.cpp @@ -7,7 +7,7 @@ #include "sys_ppu_thread.h" -logs::channel sys_usbd("sys_usbd"); +LOG_CHANNEL(sys_usbd); std::vector devices = { // System devices diff --git a/rpcs3/Emu/Cell/lv2/sys_vm.cpp b/rpcs3/Emu/Cell/lv2/sys_vm.cpp index 98fb528776..059c8f8022 100644 --- a/rpcs3/Emu/Cell/lv2/sys_vm.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_vm.cpp @@ -4,7 +4,7 @@ -logs::channel sys_vm("sys_vm"); +LOG_CHANNEL(sys_vm); error_code sys_vm_memory_map(u32 vsize, u32 psize, u32 cid, u64 flag, u64 policy, vm::ptr addr) { diff --git a/rpcs3/Loader/PSF.cpp b/rpcs3/Loader/PSF.cpp index 0a2097f239..b0788efe3a 100644 --- a/rpcs3/Loader/PSF.cpp +++ b/rpcs3/Loader/PSF.cpp @@ -19,8 +19,6 @@ void fmt_class_string::format(std::string& out, u64 arg) namespace psf { - logs::channel log("PSF"); - struct header_t { le_t magic; @@ -178,7 +176,7 @@ namespace psf else { // Possibly unsupported format, entry ignored - log.error("Unknown entry format (key='%s', fmt=0x%x, len=0x%x, max=0x%x)", key, indices[i].param_fmt, indices[i].param_len, indices[i].param_max); + LOG_ERROR(LOADER, "Unknown entry format (key='%s', fmt=0x%x, len=0x%x, max=0x%x)", key, indices[i].param_fmt, indices[i].param_len, indices[i].param_max); } } @@ -252,7 +250,7 @@ namespace psf if (value.size() + (fmt == format::string) > max) { // TODO: check real limitations of PSF format - log.error("Entry value shrinkage (key='%s', value='%s', size=0x%zx, max=0x%x)", entry.first, value, size, max); + LOG_ERROR(LOADER, "Entry value shrinkage (key='%s', value='%s', size=0x%zx, max=0x%x)", entry.first, value, size, max); } stream.write(value);