diff --git a/rpcs3/Emu/Cell/Modules/cellCamera.cpp b/rpcs3/Emu/Cell/Modules/cellCamera.cpp index 857567e9b2..e58a36672f 100644 --- a/rpcs3/Emu/Cell/Modules/cellCamera.cpp +++ b/rpcs3/Emu/Cell/Modules/cellCamera.cpp @@ -44,38 +44,6 @@ error_code cellCameraReadEx(s32 dev_num, vm::ptr read); // * HLE helper functions * // ************************ -template <> -void fmt_class_string::format(std::string& out, u64 arg) -{ - format_enum(out, arg, [](auto value) - { - switch (value) - { - case camera_handler::null: return "Null"; - case camera_handler::fake: return "Fake"; - } - - return unknown; - }); -} - -template <> -void fmt_class_string::format(std::string& out, u64 arg) -{ - format_enum(out, arg, [](auto value) - { - switch (value) - { - case fake_camera_type::unknown: return "Unknown"; - case fake_camera_type::eyetoy: return "EyeToy"; - case fake_camera_type::eyetoy2: return "PS Eye"; - case fake_camera_type::uvc1_1: return "UVC 1.1"; - } - - return unknown; - }); -} - static const char* get_camera_attr_name(s32 value) { switch (value) diff --git a/rpcs3/Emu/Cell/Modules/cellGem.cpp b/rpcs3/Emu/Cell/Modules/cellGem.cpp index 3ffe2deda4..d21a633a89 100644 --- a/rpcs3/Emu/Cell/Modules/cellGem.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGem.cpp @@ -136,26 +136,6 @@ struct gem_config } }; -// ************************ -// * HLE helper functions * -// ************************ - -template <> -void fmt_class_string::format(std::string& out, u64 arg) -{ - format_enum(out, arg, [](auto value) - { - switch (value) - { - case move_handler::null: return "Null"; - case move_handler::fake: return "Fake"; - case move_handler::mouse: return "Mouse"; - } - - return unknown; - }); -} - /** * \brief Verifies that a Move controller id is valid * \param gem_num Move controler ID to verify diff --git a/rpcs3/Emu/Cell/Modules/cellMic.cpp b/rpcs3/Emu/Cell/Modules/cellMic.cpp index 6d608c82eb..5908b93295 100644 --- a/rpcs3/Emu/Cell/Modules/cellMic.cpp +++ b/rpcs3/Emu/Cell/Modules/cellMic.cpp @@ -10,23 +10,6 @@ LOG_CHANNEL(cellMic); -template <> -void fmt_class_string::format(std::string& out, u64 arg) -{ - format_enum(out, arg, [](auto value) { - switch (value) - { - case microphone_handler::null: return "Null"; - case microphone_handler::standard: return "Standard"; - case microphone_handler::singstar: return "SingStar"; - case microphone_handler::real_singstar: return "Real SingStar"; - case microphone_handler::rocksmith: return "Rocksmith"; - } - - return unknown; - }); -} - void mic_context::operator()() { while (thread_ctrl::state() != thread_state::aborting) diff --git a/rpcs3/Emu/Cell/PPUModule.cpp b/rpcs3/Emu/Cell/PPUModule.cpp index ffdbe12e9a..6f0b89a49b 100644 --- a/rpcs3/Emu/Cell/PPUModule.cpp +++ b/rpcs3/Emu/Cell/PPUModule.cpp @@ -38,24 +38,6 @@ extern void sys_initialize_tls(ppu_thread&, u64, u32, u32, u32); // HLE function name cache std::vector g_ppu_function_names; -template <> -void fmt_class_string::format(std::string& out, u64 arg) -{ - format_enum(out, arg, [](lib_loading_type value) - { - switch (value) - { - case lib_loading_type::manual: return "Manually load selected libraries"; - case lib_loading_type::hybrid: return "Load automatic and manual selection"; - case lib_loading_type::liblv2only: return "Load liblv2.sprx only"; - case lib_loading_type::liblv2both: return "Load liblv2.sprx and manual selection"; - case lib_loading_type::liblv2list: return "Load liblv2.sprx and strict selection"; - } - - return unknown; - }); -} - extern u32 ppu_generate_id(const char* name) { // Symbol name suffix diff --git a/rpcs3/Emu/Cell/PPUThread.cpp b/rpcs3/Emu/Cell/PPUThread.cpp index 4c21533fcb..98293f3be6 100644 --- a/rpcs3/Emu/Cell/PPUThread.cpp +++ b/rpcs3/Emu/Cell/PPUThread.cpp @@ -88,22 +88,6 @@ void fmt_class_string::format(std::string& out, u64 arg) }); } -template <> -void fmt_class_string::format(std::string& out, u64 arg) -{ - format_enum(out, arg, [](ppu_decoder_type type) - { - switch (type) - { - case ppu_decoder_type::precise: return "Interpreter (precise)"; - case ppu_decoder_type::fast: return "Interpreter (fast)"; - case ppu_decoder_type::llvm: return "Recompiler (LLVM)"; - } - - return unknown; - }); -} - constexpr ppu_decoder g_ppu_interpreter_precise; constexpr ppu_decoder g_ppu_interpreter_fast; diff --git a/rpcs3/Emu/Cell/SPUThread.cpp b/rpcs3/Emu/Cell/SPUThread.cpp index f602aeea8f..4aea4710c8 100644 --- a/rpcs3/Emu/Cell/SPUThread.cpp +++ b/rpcs3/Emu/Cell/SPUThread.cpp @@ -93,39 +93,6 @@ extern u64 get_system_time(); extern thread_local u64 g_tls_fault_spu; -template <> -void fmt_class_string::format(std::string& out, u64 arg) -{ - format_enum(out, arg, [](spu_decoder_type type) - { - switch (type) - { - case spu_decoder_type::precise: return "Interpreter (precise)"; - case spu_decoder_type::fast: return "Interpreter (fast)"; - case spu_decoder_type::asmjit: return "Recompiler (ASMJIT)"; - case spu_decoder_type::llvm: return "Recompiler (LLVM)"; - } - - return unknown; - }); -} - -template <> -void fmt_class_string::format(std::string& out, u64 arg) -{ - format_enum(out, arg, [](spu_block_size_type type) - { - switch (type) - { - case spu_block_size_type::safe: return "Safe"; - case spu_block_size_type::mega: return "Mega"; - case spu_block_size_type::giga: return "Giga"; - } - - return unknown; - }); -} - namespace spu { namespace scheduler diff --git a/rpcs3/Emu/RSX/rsx_methods.cpp b/rpcs3/Emu/RSX/rsx_methods.cpp index c1f4b5232d..fa1f110994 100644 --- a/rpcs3/Emu/RSX/rsx_methods.cpp +++ b/rpcs3/Emu/RSX/rsx_methods.cpp @@ -11,25 +11,6 @@ #include #include -template <> -void fmt_class_string::format(std::string& out, u64 arg) -{ - format_enum(out, arg, [](frame_limit_type value) - { - switch (value) - { - case frame_limit_type::none: return "Off"; - case frame_limit_type::_59_94: return "59.94"; - case frame_limit_type::_50: return "50"; - case frame_limit_type::_60: return "60"; - case frame_limit_type::_30: return "30"; - case frame_limit_type::_auto: return "Auto"; - } - - return unknown; - }); -} - namespace rsx { rsx_state method_registers; diff --git a/rpcs3/Emu/system_config_types.cpp b/rpcs3/Emu/system_config_types.cpp index 179dabf7a4..cbafec747a 100644 --- a/rpcs3/Emu/system_config_types.cpp +++ b/rpcs3/Emu/system_config_types.cpp @@ -236,3 +236,154 @@ void fmt_class_string::format(std::string& out, u64 arg) }); } +template <> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](spu_decoder_type type) + { + switch (type) + { + case spu_decoder_type::precise: return "Interpreter (precise)"; + case spu_decoder_type::fast: return "Interpreter (fast)"; + case spu_decoder_type::asmjit: return "Recompiler (ASMJIT)"; + case spu_decoder_type::llvm: return "Recompiler (LLVM)"; + } + + return unknown; + }); +} + +template <> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](spu_block_size_type type) + { + switch (type) + { + case spu_block_size_type::safe: return "Safe"; + case spu_block_size_type::mega: return "Mega"; + case spu_block_size_type::giga: return "Giga"; + } + + return unknown; + }); +} + +template <> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](frame_limit_type value) + { + switch (value) + { + case frame_limit_type::none: return "Off"; + case frame_limit_type::_59_94: return "59.94"; + case frame_limit_type::_50: return "50"; + case frame_limit_type::_60: return "60"; + case frame_limit_type::_30: return "30"; + case frame_limit_type::_auto: return "Auto"; + } + + return unknown; + }); +} + +template <> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto value) + { + switch (value) + { + case microphone_handler::null: return "Null"; + case microphone_handler::standard: return "Standard"; + case microphone_handler::singstar: return "SingStar"; + case microphone_handler::real_singstar: return "Real SingStar"; + case microphone_handler::rocksmith: return "Rocksmith"; + } + + return unknown; + }); +} + +template <> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto value) + { + switch (value) + { + case camera_handler::null: return "Null"; + case camera_handler::fake: return "Fake"; + } + + return unknown; + }); +} + +template <> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto value) + { + switch (value) + { + case fake_camera_type::unknown: return "Unknown"; + case fake_camera_type::eyetoy: return "EyeToy"; + case fake_camera_type::eyetoy2: return "PS Eye"; + case fake_camera_type::uvc1_1: return "UVC 1.1"; + } + + return unknown; + }); +} + +template <> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto value) + { + switch (value) + { + case move_handler::null: return "Null"; + case move_handler::fake: return "Fake"; + case move_handler::mouse: return "Mouse"; + } + + return unknown; + }); +} + +template <> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](lib_loading_type value) + { + switch (value) + { + case lib_loading_type::manual: return "Manually load selected libraries"; + case lib_loading_type::hybrid: return "Load automatic and manual selection"; + case lib_loading_type::liblv2only: return "Load liblv2.sprx only"; + case lib_loading_type::liblv2both: return "Load liblv2.sprx and manual selection"; + case lib_loading_type::liblv2list: return "Load liblv2.sprx and strict selection"; + } + + return unknown; + }); +} + +template <> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](ppu_decoder_type type) + { + switch (type) + { + case ppu_decoder_type::precise: return "Interpreter (precise)"; + case ppu_decoder_type::fast: return "Interpreter (fast)"; + case ppu_decoder_type::llvm: return "Recompiler (LLVM)"; + } + + return unknown; + }); +}