From 7f725e065531fed44e9bd536b467ff58dadf1fb2 Mon Sep 17 00:00:00 2001 From: Eladash Date: Fri, 27 Sep 2019 12:34:51 +0300 Subject: [PATCH] sys_rsx: Format special sys_rsx invalid param error, warning fixes --- rpcs3/Emu/Cell/lv2/sys_rsx.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/lv2/sys_rsx.cpp b/rpcs3/Emu/Cell/lv2/sys_rsx.cpp index ee5f3d1b82..ad90f31641 100644 --- a/rpcs3/Emu/Cell/lv2/sys_rsx.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_rsx.cpp @@ -16,7 +16,24 @@ extern u64 get_timebased_time(); static shared_mutex s_rsxmem_mtx; // Unknown error code returned by sys_rsx_context_attribute -constexpr unsigned SYS_RSX_CONTEXT_ATTRIBUTE_ERROR = -17u; +enum sys_rsx_error : s32 +{ + SYS_RSX_CONTEXT_ATTRIBUTE_ERROR = -17 +}; + +template<> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](auto error) + { + switch (error) + { + STR_CASE(SYS_RSX_CONTEXT_ATTRIBUTE_ERROR); + } + + return unknown; + }); +} u64 rsxTimeStamp() {