From 5efd149ad56efb2a00332af5a791b403e7f70273 Mon Sep 17 00:00:00 2001 From: archshift Date: Wed, 18 Feb 2015 22:18:47 -0800 Subject: Remove the useless msg_handler compilation unit that was left over from Dolphin --- src/core/core_timing.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index cabe2a074..6f716b1ca 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp @@ -147,7 +147,7 @@ void RestoreRegisterEvent(int event_type, const char* name, TimedCallback callba void UnregisterAllEvents() { if (first) - PanicAlert("Cannot unregister events with events pending"); + LOG_ERROR(Core_Timing, "Cannot unregister events with events pending"); event_types.clear(); } @@ -535,7 +535,7 @@ std::string GetScheduledEventsSummary() { while (event) { unsigned int t = event->type; if (t >= event_types.size()) - PanicAlert("Invalid event type"); // %i", t); + LOG_ERROR(Core_Timing, "Invalid event type"); // %i", t); const char* name = event_types[event->type].name; if (!name) name = "[unknown]"; -- cgit v1.2.3 From 302f0b32f57655dc453d34d30a90a0f06601082a Mon Sep 17 00:00:00 2001 From: archshift Date: Wed, 18 Feb 2015 22:45:46 -0800 Subject: Remove duplication of INSERT_PADDING_WORDS between pica.h and gpu.h --- src/core/hw/gpu.h | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src/core') diff --git a/src/core/hw/gpu.h b/src/core/hw/gpu.h index df9aa0d71..75f524465 100644 --- a/src/core/hw/gpu.h +++ b/src/core/hw/gpu.h @@ -34,13 +34,6 @@ namespace GPU { // MMIO region 0x1EFxxxxx struct Regs { -// helper macro to properly align structure members. -// Calling INSERT_PADDING_WORDS will add a new member variable with a name like "pad121", -// depending on the current source line to make sure variable names are unique. -#define INSERT_PADDING_WORDS_HELPER1(x, y) x ## y -#define INSERT_PADDING_WORDS_HELPER2(x, y) INSERT_PADDING_WORDS_HELPER1(x, y) -#define INSERT_PADDING_WORDS(num_words) u32 INSERT_PADDING_WORDS_HELPER2(pad, __LINE__)[(num_words)] - // helper macro to make sure the defined structures are of the expected size. #if defined(_MSC_VER) // TODO: MSVC does not support using sizeof() on non-static data members even though this @@ -238,10 +231,6 @@ struct Regs { INSERT_PADDING_WORDS(0x9c3); -#undef INSERT_PADDING_WORDS_HELPER1 -#undef INSERT_PADDING_WORDS_HELPER2 -#undef INSERT_PADDING_WORDS - static inline size_t NumIds() { return sizeof(Regs) / sizeof(u32); } -- cgit v1.2.3 From 4fb75d220aeaa66d3e907cc2311acf6c29433800 Mon Sep 17 00:00:00 2001 From: archshift Date: Wed, 18 Feb 2015 22:46:21 -0800 Subject: Misc cleanup of common and related functions --- src/core/hle/kernel/thread.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index f8c834a8d..be1aed615 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -7,6 +7,7 @@ #include #include "common/common.h" +#include "common/math_util.h" #include "common/thread_queue_list.h" #include "core/arm/arm_interface.h" @@ -339,7 +340,7 @@ static void DebugThreadQueue() { ResultVal> Thread::Create(std::string name, VAddr entry_point, s32 priority, u32 arg, s32 processor_id, VAddr stack_top) { if (priority < THREADPRIO_HIGHEST || priority > THREADPRIO_LOWEST) { - s32 new_priority = CLAMP(priority, THREADPRIO_HIGHEST, THREADPRIO_LOWEST); + s32 new_priority = MathUtil::Clamp(priority, THREADPRIO_HIGHEST, THREADPRIO_LOWEST); LOG_WARNING(Kernel_SVC, "(name=%s): invalid priority=%d, clamping to %d", name.c_str(), priority, new_priority); // TODO(bunnei): Clamping to a valid priority is not necessarily correct behavior... Confirm @@ -387,7 +388,7 @@ static void ClampPriority(const Thread* thread, s32* priority) { if (*priority < THREADPRIO_HIGHEST || *priority > THREADPRIO_LOWEST) { DEBUG_ASSERT_MSG(false, "Application passed an out of range priority. An error should be returned."); - s32 new_priority = CLAMP(*priority, THREADPRIO_HIGHEST, THREADPRIO_LOWEST); + s32 new_priority = MathUtil::Clamp(*priority, THREADPRIO_HIGHEST, THREADPRIO_LOWEST); LOG_WARNING(Kernel_SVC, "(name=%s): invalid priority=%d, clamping to %d", thread->name.c_str(), *priority, new_priority); // TODO(bunnei): Clamping to a valid priority is not necessarily correct behavior... Confirm -- cgit v1.2.3