mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-31 20:41:45 +01:00
Move some format functions
This commit is contained in:
parent
89f16548f3
commit
b1fdbc7fcc
@ -44,38 +44,6 @@ error_code cellCameraReadEx(s32 dev_num, vm::ptr<CellCameraReadEx> read);
|
||||
// * HLE helper functions *
|
||||
// ************************
|
||||
|
||||
template <>
|
||||
void fmt_class_string<camera_handler>::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<fake_camera_type>::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)
|
||||
|
@ -136,26 +136,6 @@ struct gem_config
|
||||
}
|
||||
};
|
||||
|
||||
// ************************
|
||||
// * HLE helper functions *
|
||||
// ************************
|
||||
|
||||
template <>
|
||||
void fmt_class_string<move_handler>::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
|
||||
|
@ -10,23 +10,6 @@
|
||||
|
||||
LOG_CHANNEL(cellMic);
|
||||
|
||||
template <>
|
||||
void fmt_class_string<microphone_handler>::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)
|
||||
|
@ -38,24 +38,6 @@ extern void sys_initialize_tls(ppu_thread&, u64, u32, u32, u32);
|
||||
// HLE function name cache
|
||||
std::vector<std::string> g_ppu_function_names;
|
||||
|
||||
template <>
|
||||
void fmt_class_string<lib_loading_type>::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
|
||||
|
@ -88,22 +88,6 @@ void fmt_class_string<ppu_join_status>::format(std::string& out, u64 arg)
|
||||
});
|
||||
}
|
||||
|
||||
template <>
|
||||
void fmt_class_string<ppu_decoder_type>::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<ppu_interpreter_precise> g_ppu_interpreter_precise;
|
||||
constexpr ppu_decoder<ppu_interpreter_fast> g_ppu_interpreter_fast;
|
||||
|
||||
|
@ -93,39 +93,6 @@ extern u64 get_system_time();
|
||||
|
||||
extern thread_local u64 g_tls_fault_spu;
|
||||
|
||||
template <>
|
||||
void fmt_class_string<spu_decoder_type>::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<spu_block_size_type>::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
|
||||
|
@ -11,25 +11,6 @@
|
||||
#include <thread>
|
||||
#include <atomic>
|
||||
|
||||
template <>
|
||||
void fmt_class_string<frame_limit_type>::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;
|
||||
|
@ -236,3 +236,154 @@ void fmt_class_string<np_psn_status>::format(std::string& out, u64 arg)
|
||||
});
|
||||
}
|
||||
|
||||
template <>
|
||||
void fmt_class_string<spu_decoder_type>::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<spu_block_size_type>::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<frame_limit_type>::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<microphone_handler>::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<camera_handler>::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<fake_camera_type>::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<move_handler>::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<lib_loading_type>::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<ppu_decoder_type>::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;
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user